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.
61 lines
1.6 KiB
61 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.ScreenUserJoinDao">
|
|
|
|
<delete id="deleteUserJoin">
|
|
delete from screen_user_join
|
|
where CUSTOMER_ID = #{customerId}
|
|
AND ORG_ID IN
|
|
<foreach item="item" collection="orgIds" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<insert id="batchInsertUserJoin" parameterType="java.util.List">
|
|
insert into screen_user_join
|
|
(
|
|
ID,
|
|
CUSTOMER_ID,
|
|
ORG_TYPE,
|
|
ORG_ID,
|
|
PARENT_ID,
|
|
ORG_NAME,
|
|
JOIN_TOTAL,
|
|
JOIN_TOTAL_UP_RATE,
|
|
AVG_ISSUE,
|
|
AVG_ISSUE_UP_RATE,
|
|
AVG_JOIN,
|
|
AGVG_JOIN_UP_RATE,
|
|
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),
|
|
#{item.customerId},
|
|
#{item.orgType},
|
|
#{item.orgId},
|
|
#{item.parentId},
|
|
#{item.orgName},
|
|
#{item.joinTotal},
|
|
#{item.joinTotalUpRate},
|
|
#{item.avgIssue},
|
|
#{item.avgIssueUpRate},
|
|
#{item.avgJoin},
|
|
#{item.avgJoinUpRate},
|
|
0,
|
|
0,
|
|
'APP_USER',
|
|
now(),
|
|
'APP_USER',
|
|
now()
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
|
|
</mapper>
|
|
|