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.
udi-wms-java/src/main/resources/mybatis/mapper/system/SysPdaKeyDao.xml

98 lines
3.2 KiB
XML

3 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.dao.auth.SysPdaKeyDao">
3 years ago
<select id="findDeviceKey" parameterType="com.glxp.api.req.system.FilterDeviceKeyRequest"
resultType="com.glxp.api.entity.system.SysPdaKeyEntity">
SELECT * FROM sys_pda_check
3 years ago
<where>
<if test="imei != null and imei != ''">
and imei = #{imei}
</if>
<if test="isCheck != null and isCheck != ''">
and isCheck = #{isCheck}
</if>
</where>
</select>
<select id="findDeviceByImei" parameterType="com.glxp.api.req.system.FilterDeviceKeyRequest"
resultType="com.glxp.api.entity.system.SysPdaKeyEntity">
SELECT * FROM sys_pda_check
3 years ago
<where>
<if test="imei != null and imei != ''">
and imei = #{imei}
</if>
</where>
</select>
<update id="updateDeviceKey" parameterType="com.glxp.api.entity.system.SysPdaKeyEntity">
3 years ago
UPDATE sys_pda_check
3 years ago
<set>
<if test="isCheck != null">isCheck=#{isCheck},</if>
<if test="companyName != null">companyName=#{companyName},</if>
<if test="phone != null">phone=#{phone},</if>
<if test="contact != null">contact=#{contact},</if>
<if test="imeiKey != null">imeiKey=#{imeiKey},</if>
<if test="date != null">date=#{date},</if>
<if test="creditNum != null">creditNum=#{creditNum},</if>
<if test="rgType != null">rgType=#{rgType},</if>
<if test="remark != null">remark=#{remark},</if>
</set>
WHERE id=#{id}
</update>
<update id="updateDeviceKeyByImei" parameterType="com.glxp.api.entity.system.SysPdaKeyEntity">
3 years ago
UPDATE sys_pda_check
3 years ago
<set>
<if test="isCheck != null">isCheck=#{isCheck},</if>
<if test="companyName != null">companyName=#{companyName},</if>
<if test="phone != null">phone=#{phone},</if>
<if test="contact != null">contact=#{contact},</if>
<if test="imeiKey != null">imeiKey=#{imeiKey},</if>
<if test="date != null">date=#{date},</if>
<if test="imei != null">imei=#{imei},</if>
<if test="creditNum != null">creditNum=#{creditNum},</if>
<if test="rgType != null">rgType=#{rgType},</if>
<if test="remark != null">remark=#{remark},</if>
</set>
WHERE imei=#{imei}
</update>
<insert id="insertDeviceKey" parameterType="com.glxp.api.entity.system.SysPdaKeyEntity">
replace
INTO sys_pda_check(
3 years ago
imei,
isCheck,
companyName,
phone,
contact,
date,
imeiKey,creditNum,rgType,remark) values
(
#{imei},
#{isCheck},
#{companyName},
#{phone},
#{contact},
#{date},
#{imeiKey},
#{creditNum},
#{rgType},
#{remark}
3 years ago
)
3 years ago
</insert>
<delete id="deleteDeviceKey" parameterType="Map">
DELETE
FROM sys_pda_check
WHERE id = #{id}
3 years ago
</delete>
</mapper>