You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

63 lines
1.6 KiB

<?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="com.epmet.dao.screen.ScreenCustomerAgencyDao">
<delete id="deleteCustomerAgency">
delete from screen_customer_agency
where CUSTOMER_ID = #{customerId}
AND AGENCY_ID IN
<foreach item="item" collection="agencyIds" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="batchInsertCustomerAgency" parameterType="map">
insert into screen_customer_agency
(
ID,
CUSTOMER_ID,
AGENCY_ID,
AGENCY_NAME,
PID,
PIDS,
ALL_PARENT_NAMES,
AREA_MARKS,
CENTER_MARK,
PARTY_MARK,
`LEVEL`,
AREA_CODE,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DATA_END_TIME
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.agencyId},
#{item.agencyName},
#{item.pid},
#{item.pids},
#{item.allParentNames},
#{item.areaMarks},
#{item.centerMark},
#{item.partyMark},
#{item.level},
#{item.areaCode},
0,
0,
'APP_USER',
now(),
'APP_USER',
now(),
#{item.dataEndTime}
)
</foreach>
</insert>
</mapper>