You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udiwms-java/api-admin/src/main/resources/mybatis/mapper/purchase/SupCertSetDao.xml

63 lines
2.2 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.glxp.api.admin.dao.purchase.SupCertSetDao">
<select id="filterCertSets" parameterType="com.glxp.api.admin.req.purchase.FilterCertSetsRequest"
resultType="com.glxp.api.admin.entity.purchase.SupCertSetEntity">
select * from sup_cert_set
<where>
<if test="name != '' and name!=null">
and `name` = #{name}
</if>
<if test="type!=null">
and `type` = #{type}
</if>
<if test="need!=null">
and `need` = #{need}
</if>
</where>
ORDER BY id DESC
</select>
<delete id="deleteById" parameterType="Map">
DELETE
FROM sup_cert_set
WHERE id = #{id}
</delete>
<update id="updateCertSet" parameterType="com.glxp.api.admin.entity.purchase.SupCertSetEntity">
UPDATE sup_cert_set
<trim prefix="set" suffixOverrides=",">
<if test="name != null">name=#{name},</if>
<if test="need != null">`need`=#{need},</if>
<if test="foreign != null">`foreign`=#{foreign},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="cplx != null">cplx=#{cplx},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="hchzsb != null">hchzsb=#{hchzsb},</if>
<if test="flbm != null">flbm=#{flbm},</if>
<if test="imports != null">`imports`=#{imports},</if>
<if test="type != null">`type`=#{type},</if>
</trim>
WHERE id = #{id}
</update>
<insert id="insertCertSet" parameterType="com.glxp.api.admin.entity.purchase.SupCertSetEntity">
INSERT INTO sup_cert_set(`name`, `need`, `foreign`, remark, cplx, updateTime, hchzsb, flbm, imports, `type`)
values (#{name},
#{need},
#{foreign},
#{remark},
#{cplx},
#{updateTime},
#{hchzsb},
#{flbm},
#{imports}, #{type})
</insert>
</mapper>