60 lines
2.1 KiB
XML
60 lines
2.1 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.updateHousehold.adapters.persistence.UpdateHouseholdMapper">
|
|
|
|
<update id="updateHousehold">
|
|
/* updateHousehold : 임가 정보 수정 */
|
|
UPDATE household
|
|
SET
|
|
owner_name = #{ownerName},
|
|
owner_age = #{ownerAge},
|
|
tel = #{tel},
|
|
phone = #{phone},
|
|
region_main_code = #{regionMainCode},
|
|
region_sub_code = #{regionSubCode},
|
|
region_detail_code = #{regionDetailCode},
|
|
address = #{address},
|
|
industry_large_code = #{industryLargeCode},
|
|
industry_middle_code = #{industryMiddleCode},
|
|
industry_sub_middle = #{industrySubMiddle},
|
|
industry_detail = #{industryDetail},
|
|
is_panel = #{isPanel},
|
|
<if test="usageType != null and usageType != ''">
|
|
usage_type = #{usageType},
|
|
</if>
|
|
<if test="employmentType != null and employmentType != ''">
|
|
employment_type = #{employmentType},
|
|
</if>
|
|
memo = #{memo},
|
|
<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> |