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.
93 lines
3.1 KiB
XML
93 lines
3.1 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.udi.admin.dao.publish.UdiProductDao">
|
|
|
|
|
|
<insert id="insertUdiProduct"
|
|
parameterType="com.glxp.udi.admin.entity.publish.UdiProductEntity">
|
|
insert INTO udi_product
|
|
(UDI_ProductOID,productName,UDI_Customer_FK,SYS_Created,SYS_LAST_UPD,Text1,status)
|
|
values
|
|
(
|
|
#{UDI_ProductOID},
|
|
#{productName},
|
|
#{UDI_Customer_FK},
|
|
#{SYS_Created},
|
|
#{SYS_LAST_UPD},
|
|
#{Text1},
|
|
#{status}
|
|
)
|
|
</insert>
|
|
|
|
|
|
<insert id="insertUdiProductList" keyProperty="id"
|
|
parameterType="com.glxp.udi.admin.entity.publish.UdiProductEntity">
|
|
insert INTO udi_product
|
|
(UDI_ProductOID,productName,UDI_Customer_FK,SYS_Created,SYS_LAST_UPD,Text1,status)
|
|
VALUES
|
|
<foreach collection="udiProductEntities" item="item" index="index"
|
|
separator=",">
|
|
(
|
|
#{item.UDI_ProductOID},
|
|
#{item.productName},
|
|
#{item.UDI_Customer_FK},
|
|
#{item.SYS_Created},
|
|
#{item.SYS_LAST_UPD}, #{Text1},#{status}
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
|
|
<delete id="deleteUdiProduct" parameterType="com.glxp.udi.admin.req.publish.DeleteUdiProductRequest">
|
|
delete from udi_product where UDI_ProductOID = #{id}
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<update id="modifyUdiProduct" parameterType="com.glxp.udi.admin.entity.publish.UdiProductEntity">
|
|
UPDATE udi_product
|
|
<set>
|
|
<if test="productName != null">productName=#{productName},</if>
|
|
<if test="UDI_Customer_FK != null">`UDI_Customer_FK`=#{UDI_Customer_FK},</if>
|
|
<if test="SYS_Created != null">SYS_Created=#{SYS_Created},</if>
|
|
<if test="Text1 != null">Text1=#{Text1},</if>
|
|
<if test="SYS_LAST_UPD != null">`SYS_LAST_UPD`=#{SYS_LAST_UPD},</if>
|
|
<if test="status != null">status=#{status},</if>
|
|
</set>
|
|
WHERE UDI_ProductOID = #{UDI_ProductOID}
|
|
</update>
|
|
|
|
<select id="selectByCustomerId" parameterType="java.lang.Long"
|
|
resultType="com.glxp.udi.admin.entity.publish.UdiProductEntity">
|
|
select * FROM udi_product WHERE UDI_Customer_FK = #{customerId}
|
|
</select>
|
|
|
|
<select id="filterAll" parameterType="com.glxp.udi.admin.req.publish.FilterUdiProductRequest"
|
|
resultType="com.glxp.udi.admin.entity.publish.UdiProductEntity">
|
|
select *
|
|
from udi_product
|
|
<where>
|
|
<if test="productName != null and productName != ''">
|
|
and productName like concat('%',#{productName},'%')
|
|
</if>
|
|
|
|
<if test="customerId != null and customerId != ''">
|
|
and UDI_Customer_FK = #{customerId}
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
<select id="selectById" parameterType="java.lang.String"
|
|
resultType="com.glxp.udi.admin.entity.publish.UdiProductEntity">
|
|
select *
|
|
from udi_product
|
|
where UDI_ProductOID = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|