WgResultMapper.xml
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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.sincere.xiaoanSearch.mapper.WgResultMapper">
<insert id="insertPassFail" parameterType="com.sincere.xiaoanSearch.model.PassFail">
INSERT INTO WG_PassFail (cardNum, deviceID, direction, resultIntro, createTime , schoolID,inTime)
VALUES (#{cardNum},#{deviceId},#{direction},#{resultIntro},#{createTime},#{schoolId},#{inTime})
</insert>
<insert id="insertSendSuccess" parameterType="com.sincere.xiaoanSearch.model.SendSuccess">
INSERT INTO WG_SendSuccess (deviceID, cardNum, oldCardNum, cardType, customerID, userType, classID, schoolName,
studentType, openFlag, status, updateID, createTime, sex, name,schoolID,shiduan)
values (#{deviceId} , #{cardNum},
#{oldCardNum},#{cardType},#{customerId},#{userType},#{classId},#{schoolName},#{studentType},#{openFlag},#{status},#{updateId},#{createTime},#{sex},#{name},#{schoolId},#{shiduan})
</insert>
<update id="updateSendSuccess" parameterType="com.sincere.xiaoanSearch.model.SendSuccess">
update WG_SendSuccess set status = 0
<where>
<if test="deviceId != null">
and deviceID = #{deviceId}
</if>
<if test="cardNum != null">
and cardNum = #{cardNum}
</if>
<if test="shiduan != 0">
and shiduan = #{shiduan}
</if>
</where>
</update>
<insert id="insertSendFail" parameterType="com.sincere.xiaoanSearch.model.SendFail">
INSERT INTO WG_SendFail (deviceID, cardNum, cardType, customerID, userType, classID, schoolName, studentType,
openFlag, status, updateID, createTime, sex, name , failType, failContent,schoolID,shiduan)
values (#{deviceId} , #{cardNum},
#{cardType},#{customerId},#{userType},#{classId},#{schoolName},#{studentType},#{openFlag},#{status},#{updateId},#{createTime},#{sex},#{name},#{failType},#{failContent},#{schoolId},#{shiduan})
</insert>
<delete id="deleteSendFail" parameterType="com.sincere.xiaoanSearch.model.SendFail">
delete WG_SendFail where deviceID = #{deviceId} and cardNum = #{cardNum} and shiduan=#{shiduan}
</delete>
<select id="selectCountByDeviceNo" parameterType="java.lang.String" resultType="java.lang.Integer">
select count(DISTINCT cardNum) from WG_SendSuccess where deviceID = #{deviceId}
</select>
<select id="selectCountByDaceDeviceNo" parameterType="java.lang.String" resultType="java.lang.Integer">
select count(DISTINCT Num) from Face_SendSuccess where deviceID = #{deviceId}
</select>
</mapper>