34 lines
1.6 KiB
XML
34 lines
1.6 KiB
XML
<?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.bonus.tool.mapper.TbCertificationMapper">
|
|
|
|
<insert id="addTbCertification" useGeneratedKeys="true" keyProperty="id">
|
|
insert into tb_certification
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="tableName != null and tableName != ''">table_name,</if>
|
|
<if test="tableId != null and tableId != ''">table_id,</if>
|
|
<if test="diploma != null and diploma != ''">diploma,</if>
|
|
<if test="diplomaNum != null and diplomaNum != ''">diploma_num,</if>
|
|
<if test="level != null and level != ''">level,</if>
|
|
del_flag
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="tableName != null and tableName != ''">#{tableName},</if>
|
|
<if test="tableId != null and tableId != ''">#{tableId},</if>
|
|
<if test="diploma != null and diploma != ''">#{diploma},</if>
|
|
<if test="diplomaNum != null and diplomaNum != ''">#{diplomaNum},</if>
|
|
<if test="level != null and level != ''">#{level},</if>
|
|
0
|
|
</trim>
|
|
</insert>
|
|
<delete id="delTbCertification">
|
|
update tb_certification set del_flag=1 where table_id = #{tableId} and table_name = #{tableName}
|
|
</delete>
|
|
<select id="getTbCertificateList" resultType="com.bonus.tool.dto.TbCertificationVo">
|
|
select id,table_name as tableName,table_id as tableId,diploma as diploma,diploma_num as diplomaNum,
|
|
level as level
|
|
from tb_certification where del_flag=0 and table_name = #{tableName} and table_id = #{tableId}
|
|
</select>
|
|
</mapper>
|