[BO] 임가현황 작업 중 (12) - 임가리스트, 상세, 임가수정, 임가등록, 조사원매핑 작업
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?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.updateHousehold.adapters.persistence.UpdateHouseholdMapper">
|
||||
|
||||
<update id="updateHousehold">
|
||||
/* updateHousehold : 임가 정보 수정 */
|
||||
UPDATE household
|
||||
SET
|
||||
owner_name = #{ownerName},
|
||||
owner_age = #{ownerAge},
|
||||
<if test="tel != null and tel != ''">
|
||||
tel = #{tel},
|
||||
</if>
|
||||
phone = #{phone},
|
||||
region_main_code = #{regionMainCode},
|
||||
region_sub_code = #{regionSubCode},
|
||||
region_detail_code = #{regionDetailCode},
|
||||
address = #{address},
|
||||
<if test="industryLargeCode != null and industryLargeCode != ''">
|
||||
industry_large_code = #{industryLargeCode},
|
||||
</if>
|
||||
<if test="industryMiddleCode != null and industryMiddleCode != ''">
|
||||
industry_middle_code = #{industryMiddleCode},
|
||||
</if>
|
||||
<if test="industrySubMiddle != null and industrySubMiddle != ''">
|
||||
industry_sub_middle = #{industrySubMiddle},
|
||||
</if>
|
||||
<if test="industryDetail != null and industryDetail != ''">
|
||||
industry_detail = #{industryDetail},
|
||||
</if>
|
||||
is_panel = #{isPanel},
|
||||
<if test="memo != null and memo != ''">
|
||||
memo = #{memo},
|
||||
</if>
|
||||
<include refid="common.fields.UpdateBaseSet"/>
|
||||
WHERE seq = #{householdSeq}
|
||||
</update>
|
||||
|
||||
<update id="deleteResearcherHasHousehold">
|
||||
/* deleteResearcherHasHousehold : 임가에 매핑된 담당 조사원 삭제 */
|
||||
UPDATE researcher_has_household
|
||||
SET <include refid="common.fields.DeleteBaseSet"/>
|
||||
WHERE is_deleted = false
|
||||
AND household_seq = #{householdSeq}
|
||||
</update>
|
||||
|
||||
<insert id="createResearcherHasHousehold">
|
||||
/* createResearcherHasHousehold : 임가에 담당 조사원 매핑 */
|
||||
INSERT INTO researcher_has_household
|
||||
(
|
||||
id,
|
||||
admin_seq,
|
||||
household_seq,
|
||||
<include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
nextval('researcher_has_household_seq'),
|
||||
#{researcherSeq},
|
||||
#{householdSeq},
|
||||
<include refid="common.fields.CreateUpdateBaseValues"/>
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user