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.
55 lines
1.8 KiB
XML
55 lines
1.8 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.auth.AuthCheckDao">
|
||
|
|
||
|
<select id="filterDevices" parameterType="com.glxp.api.admin.req.auth.AuthCheckRequest"
|
||
|
resultType="com.glxp.api.admin.entity.auth.AuthCheckEntity">
|
||
|
SELECT *
|
||
|
FROM auth_device_check
|
||
|
<where>
|
||
|
<if test="machineInfo != null">
|
||
|
AND machineInfo = #{machineInfo}
|
||
|
</if>
|
||
|
<if test="registerCode != null">
|
||
|
AND registerCode = #{registerCode}
|
||
|
</if>
|
||
|
<if test="id != null">
|
||
|
AND id = #{id}
|
||
|
</if>
|
||
|
</where>
|
||
|
ORDER BY id
|
||
|
DESC
|
||
|
</select>
|
||
|
|
||
|
<select id="findByMachine" parameterType="hashmap" resultType="com.glxp.api.admin.entity.auth.AuthCheckEntity">
|
||
|
SELECT *
|
||
|
FROM auth_device_check
|
||
|
<where>
|
||
|
machineInfo = #{machineInfo}
|
||
|
</where>
|
||
|
LIMIT 1
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<insert id="insertDevices" keyProperty="id" parameterType="com.glxp.api.admin.entity.auth.AuthCheckEntity">
|
||
|
INSERT INTO auth_device_check
|
||
|
(machineInfo, remark, registerCode, createDate)
|
||
|
values (#{machineInfo},
|
||
|
#{remark},
|
||
|
#{registerCode}, #{createDate})
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateDevices" parameterType="com.glxp.api.admin.entity.auth.AuthCheckEntity">
|
||
|
UPDATE auth_device_check
|
||
|
<trim prefix="set" suffixOverrides=",">
|
||
|
<if test="remark != null">remark=#{remark},</if>
|
||
|
<if test="registerCode != null">registerCode=#{registerCode},</if>
|
||
|
<if test="createDate != null">createDate=#{createDate},</if>
|
||
|
|
||
|
</trim>
|
||
|
WHERE machineInfo=#{machineInfo}
|
||
|
</update>
|
||
|
|
||
|
|
||
|
</mapper>
|