Merge branch 'bo_household' into 'dev'
[BO] 은행자동이체내역 삭제 오류 수정 See merge request korea-research/korea-research!92
This commit is contained in:
@@ -24,7 +24,8 @@ class RemoveBankAutoTransfersDao implements RemoveBankAutoTransfersPortOut {
|
|||||||
// 삭제
|
// 삭제
|
||||||
removeBankAutoTransfersMapper.remove(outCmd);
|
removeBankAutoTransfersMapper.remove(outCmd);
|
||||||
|
|
||||||
if (!removeBankAutoTransfersMapper.existsBankAutoTransfer(outCmd.getMonthlyInputStatusId())) {
|
if (!removeBankAutoTransfersMapper.existsBankAutoTransfer(
|
||||||
|
outCmd.getMonthlyInputStatusId(), outCmd.getRemoveType())) {
|
||||||
// 수입내역 모두 삭제되었을 경우 입력상태 미등록으로 update
|
// 수입내역 모두 삭제되었을 경우 입력상태 미등록으로 update
|
||||||
if (outCmd.getRemoveType().equals("INCOME")) {
|
if (outCmd.getRemoveType().equals("INCOME")) {
|
||||||
updateMonthlyInputStatusMapper.updateBankInputStatus(
|
updateMonthlyInputStatusMapper.updateBankInputStatus(
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package app.module.admin.usecase.household.tab.bankAutoTransfer.removeBankAutoTranfers.adapters.persistence;
|
package app.module.admin.usecase.household.tab.bankAutoTransfer.removeBankAutoTranfers.adapters.persistence;
|
||||||
|
|
||||||
import app.module.admin.usecase.household.tab.bankAutoTransfer.removeBankAutoTranfers.ports.application.domain.RemoveBankAutoTransfersInCmd;
|
|
||||||
import app.module.admin.usecase.household.tab.bankAutoTransfer.removeBankAutoTranfers.ports.application.domain.RemoveBankAutoTransfersOutCmd;
|
import app.module.admin.usecase.household.tab.bankAutoTransfer.removeBankAutoTranfers.ports.application.domain.RemoveBankAutoTransfersOutCmd;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface RemoveBankAutoTransfersMapper {
|
public interface RemoveBankAutoTransfersMapper {
|
||||||
void remove(RemoveBankAutoTransfersOutCmd cmd);
|
void remove(RemoveBankAutoTransfersOutCmd cmd);
|
||||||
boolean existsBankAutoTransfer(Long monthlyInputStatusId);
|
boolean existsBankAutoTransfer(Long monthlyInputStatusId, String removeType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,12 @@
|
|||||||
FROM bank_auto_transfer
|
FROM bank_auto_transfer
|
||||||
WHERE is_deleted = false
|
WHERE is_deleted = false
|
||||||
AND monthly_input_status_id = #{monthlyInputStatusId}
|
AND monthly_input_status_id = #{monthlyInputStatusId}
|
||||||
|
<if test="removeType == 'INCOME'">
|
||||||
|
AND transfer_type = 'code.bank.input'
|
||||||
|
</if>
|
||||||
|
<if test="removeType == 'EXPENSE'">
|
||||||
|
AND transfer_type = 'code.bank.output'
|
||||||
|
</if>
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user