烟台政务云平台
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.
 
 
 
 
 

78 lines
2.7 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.ThirdplatformCustomerRegisterDao">
<resultMap type="com.epmet.entity.ThirdplatformCustomerRegisterEntity" id="thirdplatformCustomerRegisterMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="platformId" column="PLATFORM_ID"/>
<result property="customizedPlatformName" column="CUSTOMIZED_PLATFORM_NAME"/>
<result property="customizedPlatformIcon" column="CUSTOMIZED_PLATFORM_ICON"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<select id="getByCustomerIdAndPlatformId"
resultType="com.epmet.entity.ThirdplatformCustomerRegisterEntity">
select tcr.id,
customer_id,
platform_id,
customized_platform_name,
customized_platform_icon,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
from thirdplatform_customer_register tcr
where CUSTOMER_ID = #{customerId}
and PLATFORM_ID = #{platformId}
and DEL_FLAG = 0
</select>
<insert id="batchInsertThirdplatformCustomerRegister" parameterType="map">
insert into thirdplatform_customer_register
(
ID,
CUSTOMER_ID,
PLATFORM_ID,
CUSTOMIZED_PLATFORM_NAME,
CUSTOMIZED_PLATFORM_ICON,
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.platformId},
#{item.customizedPlatformName},
#{item.customizedPlatformIcon},
'0',
0,
'APP_USER',
now(),
'APP_USER',
now()
)
</foreach>
</insert>
<update id="unregisterPlatformCustomer">
UPDATE thirdplatform_customer_register
SET DEL_FLAG = '1'
WHERE
DEL_FLAG = '0'
AND CUSTOMER_ID = #{customerId} AND PLATFORM_ID = #{platformId}
</update>
</mapper>