市北互联平台后端仓库
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.
 
 
 
 
 

42 lines
1.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.BadgeCertificationConfigDao">
<resultMap type="com.epmet.entity.BadgeCertificationConfigEntity" id="badgeCertificationConfigMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="badgeId" column="BADGE_ID"/>
<result property="certificationType" column="CERTIFICATION_TYPE"/>
<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>
<delete id="deleteConfig">
DELETE a
FROM
badge_certification_config a
WHERE
EXISTS (
SELECT
*
FROM
( SELECT ID FROM badge_certification_config
WHERE CUSTOMER_ID = #{customerId}
AND BADGE_ID = #{badgeId}
AND DEL_FLAG = '0' ) b
WHERE
a.ID = b.ID)
</delete>
<select id="getCertificationType" resultType="java.lang.String">
select CERTIFICATION_TYPE from badge_certification_config
where CUSTOMER_ID = #{customerId}
and BADGE_ID = #{badgeId}
and DEL_FLAG = '0'
</select>
</mapper>