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