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.
68 lines
2.3 KiB
XML
68 lines
2.3 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.UdiDeviceSrgDao">
|
|
|
|
|
|
<insert id="insertUdiDeviceSrg"
|
|
parameterType="com.glxp.udi.admin.entity.publish.UdiDeviceSrgEntity">
|
|
replace INTO udi_devicesrg
|
|
(UDI_DeviceSrgOID,storageType,lowValue,highValue,unit,UDI_SubProduct_FK)
|
|
values
|
|
(
|
|
#{UDI_DeviceSrgOID},
|
|
#{storageType},
|
|
#{lowValue},
|
|
#{highValue},
|
|
#{unit},
|
|
#{UDI_SubProduct_FK}
|
|
)
|
|
</insert>
|
|
|
|
|
|
<insert id="insertUdiDeviceSrgList" keyProperty="id"
|
|
parameterType="com.glxp.udi.admin.entity.publish.UdiDeviceSrgEntity">
|
|
replace INTO udi_devicesrg
|
|
(UDI_DeviceSrgOID,storageType,lowValue,highValue,unit,UDI_SubProduct_FK)
|
|
VALUES
|
|
<foreach collection="udiDeviceSrgEntities" item="item" index="index"
|
|
separator=",">
|
|
(
|
|
#{item.UDI_DeviceSrgOID},
|
|
#{item.storageType},
|
|
#{item.lowValue},
|
|
#{item.highValue},
|
|
#{item.unit},
|
|
#{item.UDI_SubProduct_FK}
|
|
)
|
|
</foreach>
|
|
</insert>
|
|
|
|
<delete id="deleteUdiDeviceSrg" parameterType="com.glxp.udi.admin.req.publish.DeleteUdiDeviceCliRequest">
|
|
delete from udi_devicesrg where UDI_DeviceSrgOID = #{id}
|
|
</delete>
|
|
|
|
|
|
<update id="modifyUdiDeviceSrg" parameterType="com.glxp.udi.admin.entity.publish.UdiDeviceSrgEntity">
|
|
UPDATE udi_devicesrg
|
|
<set>
|
|
<if test="storageType != null">storageType=#{storageType},</if>
|
|
<if test="lowValue != null">`lowValue`=#{lowValue},</if>
|
|
<if test="highValue != null">highValue=#{highValue},</if>
|
|
<if test="unit != null">unit=#{unit},</if>
|
|
<if test="UDI_SubProduct_FK != null">`UDI_SubProduct_FK`=#{UDI_SubProduct_FK},</if>
|
|
</set>
|
|
WHERE UDI_DeviceSrgOID=#{UDI_DeviceSrgOID}
|
|
</update>
|
|
|
|
<select id="selectBySubProduct" parameterType="java.lang.String"
|
|
resultType="com.glxp.udi.admin.entity.publish.UdiDeviceSrgEntity">
|
|
select * FROM udi_devicesrg WHERE UDI_SubProduct_FK = #{subProductId}
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|