移风店镇项目初始化
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.

72 lines
1.8 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.ScreenCpcBaseDataDao">
<delete id="deleteCpcBaseData">
delete from screen_cpc_base_data
where CUSTOMER_ID = #{customerId}
AND ORG_ID IN
<foreach item="item" collection="orgIds" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
<insert id="batchInsertCpcBaseData" parameterType="map">
insert into screen_cpc_base_data
(
ID,
CUSTOMER_ID,
ORG_TYPE,
ORG_ID,
PARENT_ID,
ORG_NAME,
DATA_END_TIME,
REGISTER_USER_COUNT,
RESI_TOTAL,
PARTY_MEMBER_COUNT,
AGE_LEVEL_1,
AGE_LEVEL_2,
AGE_LEVEL_3,
AGE_LEVEL_4,
AGE_LEVEL_5,
AGE_LEVEL_6,
DEL_FLAG,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME
) values
<foreach collection="list" item="item" index="index" separator=",">
(
(SELECT REPLACE(UUID(), '-', '') AS id),
#{customerId},
#{item.orgType},
#{item.orgId},
#{item.parentId},
#{item.orgName},
#{item.dataEndTime},
#{item.registerUserCount},
#{item.resiTotal},
#{item.partyMemberCount},
#{item.ageLevel1},
#{item.ageLevel2},
#{item.ageLevel3},
#{item.ageLevel4},
#{item.ageLevel5},
#{item.ageLevel6},
0,
0,
'APP_USER',
now(),
'APP_USER',
now()
)
</foreach>
</insert>
</mapper>