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.
154 lines
5.7 KiB
XML
154 lines
5.7 KiB
XML
4 years ago
|
<?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.basic.UdiInfoDao">
|
||
|
|
||
|
<select id="filterUdiInfo" parameterType="com.glxp.api.admin.req.basic.FilterUdiInfoRequest"
|
||
|
resultType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
|
||
|
SELECT * FROM basic_products
|
||
|
<where>
|
||
|
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
|
||
|
AND ylqxzcrbarmc LIKE concat(#{ylqxzcrbarmc},'%')
|
||
|
</if>
|
||
|
<if test="cpmctymc != '' and cpmctymc != null">
|
||
|
AND cpmctymc LIKE concat(#{cpmctymc},'%')
|
||
|
</if>
|
||
|
<if test="nameCode != '' and nameCode != null">
|
||
|
AND nameCode LIKE concat(#{nameCode},'%')
|
||
|
</if>
|
||
|
<if test="uuid != '' and uuid != null">
|
||
|
AND uuid = #{uuid}
|
||
|
</if>
|
||
|
</where>
|
||
|
|
||
|
</select>
|
||
|
|
||
|
<select id="findByUuid" parameterType="java.lang.String"
|
||
|
resultType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
|
||
|
SELECT * FROM basic_products WHERE (
|
||
|
uuid = #{uuid} ) limit 1
|
||
|
</select>
|
||
|
|
||
|
<select id="findByUuids" parameterType="java.lang.String"
|
||
|
resultType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
|
||
|
SELECT * FROM basic_products WHERE (
|
||
|
uuid = #{uuid} )
|
||
|
</select>
|
||
|
<select id="findByNameCode" parameterType="java.lang.String"
|
||
|
resultType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
|
||
|
SELECT * FROM basic_products WHERE (
|
||
|
nameCode = #{nameCode} ) limit 1
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertUdiInfo" keyProperty="id" parameterType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
|
||
|
replace INTO basic_products
|
||
|
(
|
||
|
nameCode,packRatio,packLevel,bhxjsl,
|
||
|
bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,addType,deviceRecordKey,
|
||
|
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber
|
||
|
,diType
|
||
|
)
|
||
|
values
|
||
|
(
|
||
|
#{nameCode},
|
||
|
#{packRatio},
|
||
|
#{packLevel},
|
||
|
#{bhxjsl},
|
||
|
#{bhzxxsbzsl},
|
||
|
#{zxxsbzbhsydysl},
|
||
|
#{bhxjcpbm},
|
||
|
#{bzcj},
|
||
|
#{addType},
|
||
|
#{deviceRecordKey},
|
||
|
#{cpmctymc},
|
||
|
#{cplb},
|
||
|
#{flbm},
|
||
|
#{ggxh},
|
||
|
#{qxlb},
|
||
|
#{tyshxydm},
|
||
|
#{ylqxzcrbarmc},
|
||
|
#{zczbhhzbapzbh},
|
||
|
#{ylqxzcrbarywmc},
|
||
|
#{uuid},
|
||
|
#{sjcpbm},
|
||
|
#{versionNumber},
|
||
|
#{diType}
|
||
|
)
|
||
|
</insert>
|
||
|
|
||
|
<insert id="insertUdiInfos" keyProperty="id" parameterType="java.util.List">
|
||
|
replace INTO basic_products
|
||
|
(
|
||
|
nameCode,packRatio,packLevel,bhxjsl,
|
||
|
bhzxxsbzsl,zxxsbzbhsydysl,bhxjcpbm,bzcj,addType,deviceRecordKey,
|
||
|
cpmctymc,cplb,flbm,ggxh,qxlb,tyshxydm,ylqxzcrbarmc,zczbhhzbapzbh,ylqxzcrbarywmc,uuid,sjcpbm,versionNumber
|
||
|
,diType
|
||
|
)
|
||
|
values
|
||
|
|
||
|
<foreach collection="udiInfoEntities" item="item" index="index"
|
||
|
separator=",">
|
||
|
(
|
||
|
#{item.nameCode},
|
||
|
#{item.packRatio},
|
||
|
#{item.packLevel},
|
||
|
#{item.bhxjsl},
|
||
|
#{item.bhzxxsbzsl},
|
||
|
#{item.zxxsbzbhsydysl},
|
||
|
#{item.bhxjcpbm},
|
||
|
#{item.bzcj},
|
||
|
#{item.addType},
|
||
|
#{item.deviceRecordKey},
|
||
|
#{item.cpmctymc},
|
||
|
#{item.cplb},
|
||
|
#{item.flbm},
|
||
|
#{item.ggxh},
|
||
|
#{item.qxlb},
|
||
|
#{item.tyshxydm},
|
||
|
#{item.ylqxzcrbarmc},
|
||
|
#{item.zczbhhzbapzbh},
|
||
|
#{item.ylqxzcrbarywmc},
|
||
|
#{item.uuid},
|
||
|
#{item.sjcpbm},
|
||
|
#{item.versionNumber},
|
||
|
#{item.diType}
|
||
|
)
|
||
|
</foreach>
|
||
|
</insert>
|
||
|
|
||
|
<delete id="deleteById" parameterType="Map">
|
||
|
DELETE FROM basic_products WHERE id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteByUuid" parameterType="Map">
|
||
|
DELETE FROM basic_products WHERE uuid = #{uuid}
|
||
|
</delete>
|
||
|
|
||
|
<update id="updateUdiInfo" parameterType="com.glxp.api.admin.entity.basic.UdiInfoEntity">
|
||
|
UPDATE basic_products
|
||
|
<set>
|
||
|
<if test="packRatio != null">packRatio=#{packRatio},</if>
|
||
|
<if test="packLevel != null">packLevel=#{packLevel},</if>
|
||
|
<if test="bhxjsl != null">bhxjsl=#{bhxjsl},</if>
|
||
|
<if test="bhzxxsbzsl != null">bhzxxsbzsl=#{bhzxxsbzsl},</if>
|
||
|
<if test="zxxsbzbhsydysl != null">zxxsbzbhsydysl=#{zxxsbzbhsydysl},</if>
|
||
|
<if test="bhxjcpbm != null">bhxjcpbm=#{bhxjcpbm},</if>
|
||
|
<if test="bzcj != null">bzcj=#{bzcj},</if>
|
||
|
<if test="addType != null">addType=#{addType},</if>
|
||
|
<if test="deviceRecordKey != null">deviceRecordKey=#{deviceRecordKey},</if>
|
||
|
<if test="cpmctymc != null">cpmctymc=#{cpmctymc},</if>
|
||
|
<if test="cplb != null">cplb=#{cplb},</if>
|
||
|
<if test="flbm != null">flbm=#{flbm},</if>
|
||
|
<if test="ggxh != null">ggxh=#{ggxh},</if>
|
||
|
<if test="qxlb != null">qxlb=#{qxlb},</if>
|
||
|
<if test="tyshxydm != null">tyshxydm=#{tyshxydm},</if>
|
||
|
<if test="ylqxzcrbarmc != null">ylqxzcrbarmc=#{ylqxzcrbarmc},</if>
|
||
|
<if test="ylqxzcrbarywmc != null">ylqxzcrbarywmc=#{ylqxzcrbarywmc},</if>
|
||
|
<if test="uuid != null">uuid=#{uuid},</if>
|
||
|
<if test="sjcpbm != null">sjcpbm=#{sjcpbm},</if>
|
||
|
<if test="versionNumber != null">versionNumber=#{versionNumber},</if>
|
||
|
<if test="diType != null">diType=#{diType},</if>
|
||
|
</set>
|
||
|
WHERE nameCode = #{nameCode}
|
||
|
</update>
|
||
|
</mapper>
|