15 changed files with 128 additions and 22 deletions
@ -0,0 +1,48 @@ |
|||||
|
<?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.ccsens.health.persist.dao.RealNameAuthDao"> |
||||
|
<resultMap id="resultMap_trackInfo" type="com.ccsens.health.bean.vo.UserVo$TrackInfo"> |
||||
|
<id column="id" property="id"/> |
||||
|
<result column="userId" property="userId"/> |
||||
|
<result column="name" property="name"/> |
||||
|
<result column="wkno" property="wkno"/> |
||||
|
<collection property="clockInList" ofType="com.ccsens.health.bean.vo.UserVo$ClockIn"> |
||||
|
<id column="cId" property="id"/> |
||||
|
<result column="cName" property="name"/> |
||||
|
<result column="cTime" property="time"/> |
||||
|
<result column="cType" property="type"/> |
||||
|
</collection> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="selectTrackInfoByWkno" resultMap="resultMap_trackInfo" parameterType="java.util.Map"> |
||||
|
select |
||||
|
m.id as id, |
||||
|
m.name as name, |
||||
|
m.wkno as wkno, |
||||
|
s.id as cId, |
||||
|
s.site_name as cName, |
||||
|
sc.time as cTime, |
||||
|
sq.out_or_in as cType |
||||
|
from |
||||
|
t_site s right JOIN t_site_qrcode sq on sq.site_id = s.id |
||||
|
right JOIN t_site_clock_in sc on sc.qrcode_id = sq.id |
||||
|
right JOIN t_real_name_auth r on sc.user_id = r.user_id |
||||
|
right join t_member m on r.no = m.wkno |
||||
|
where |
||||
|
m.rec_status = 0 |
||||
|
<if test="name != null"> |
||||
|
and |
||||
|
m.name = #{name} |
||||
|
</if> |
||||
|
<if test="wkno != null"> |
||||
|
and |
||||
|
m.wkno = #{wkno} |
||||
|
</if> |
||||
|
and |
||||
|
sc.time <= #{endTime} |
||||
|
and |
||||
|
sc.time >= #{startTime} |
||||
|
ORDER By sc.time DESC |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue