<?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.smartSearch.mapper.AttendaceMapper"> <resultMap id="BaseResultMap" type="com.sincere.common.dto.smartCampus.SZ_AttendanceDto"> <id column="clint_id" property="clint_id"/> <result column="name" property="name"/> <result column="clint_type" property="clint_type"/> <result column="intime" property="intime"/> <result column="school_id" property="school_id"/> <result column="isConnection" property="isConnection"/> <result column="state" property="state"/> <result column="IsKaoqin" property="IsKaoqin"/> <result column="OutOrIn" property="outOrIn"/> </resultMap> <select id="selectDevice" resultMap="BaseResultMap"> select * from SZ_Attendance where clint_id = #{client_id} </select> <select id="getAttensWithIsKaoqin" resultMap="BaseResultMap"> select * from SZ_Attendance where IsKaoqin = #{IsKaoqin} </select> <insert id="insertAttendance" parameterType="com.sincere.common.dto.smartCampus.SZ_AttendanceDto"> insert into SZ_Attendance(clint_id , clint_type , ip , port , intime ,school_id , state) values (#{clint_id},#{clint_type},#{ip} , #{port},#{intime},#{school_id},#{state}) </insert> <update id="updateAttendance" parameterType="java.lang.String"> update SZ_Attendance set lastlogin_time = GETDATE() , isConnection = 1 where clint_id = #{clint_id} </update> <select id="selectRoomAttendance" parameterType="java.lang.Integer" resultType="java.lang.String"> select KaoQinAttendance from XA_PlaceAttendance where PlaceId = #{placeId} </select> <select id="selectCloudAttendance" resultType="java.lang.Integer"> select DISTINCT school_id from SZ_Attendance where school_id != -1 and ( clint_type = 18 or clint_type = 22 or clint_id like '253%' ) </select> <select id="selectCloudAttendanceBySchoolId" parameterType="java.lang.Integer" resultMap="BaseResultMap"> select * from SZ_Attendance where school_id = #{schoolId} and ( clint_type = 18 or clint_type = 22 or clint_id like '253%' ) </select> </mapper>