68 lines
2.5 KiB
XML
68 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
<mapper namespace="app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.adapters.persistence.UpdateDailyNoneMapper">
|
|
|
|
<select id="getDailyRecordSeq">
|
|
select id
|
|
from daily_record
|
|
where is_deleted = false
|
|
and record_month = #{searchMonth}
|
|
and day_group_no = #{groupNo}
|
|
and household_seq = #{householdSeq}
|
|
</select>
|
|
|
|
<select id="removeDailyIncome">
|
|
<if test="dailyRecordSeq != null and dailyRecordSeq != ''">
|
|
update daily_income set
|
|
<include refid="common.fields.DeleteBaseSet"/>
|
|
where is_deleted = false
|
|
and daily_record_seq = #{dailyRecordSeq}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="removeDailyWork">
|
|
<if test="dailyRecordSeq != null and dailyRecordSeq != ''">
|
|
update daily_work set
|
|
<include refid="common.fields.DeleteBaseSet"/>
|
|
where is_deleted = false
|
|
and daily_record_seq = #{dailyRecordSeq}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="removeDailyExpense">
|
|
<if test="dailyRecordSeq != null and dailyRecordSeq != ''">
|
|
update daily_expense set
|
|
<include refid="common.fields.DeleteBaseSet"/>
|
|
where is_deleted = false
|
|
and daily_record_seq = #{dailyRecordSeq}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="removeDailyPower">
|
|
<if test="dailyRecordSeq != null and dailyRecordSeq != ''">
|
|
update daily_power set
|
|
<include refid="common.fields.DeleteBaseSet"/>
|
|
where is_deleted = false
|
|
and daily_record_seq = #{dailyRecordSeq}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="removeDailyForestry">
|
|
<if test="dailyRecordSeq != null and dailyRecordSeq != ''">
|
|
update daily_forestry set
|
|
<include refid="common.fields.DeleteBaseSet"/>
|
|
where is_deleted = false
|
|
and daily_record_seq = #{dailyRecordSeq}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="removeDailyFarming">
|
|
<if test="dailyRecordSeq != null and dailyRecordSeq != ''">
|
|
update daily_farming set
|
|
<include refid="common.fields.DeleteBaseSet"/>
|
|
where is_deleted = false
|
|
and daily_record_seq = #{dailyRecordSeq}
|
|
</if>
|
|
</select>
|
|
|
|
</mapper> |