| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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.template.mapper.SmartAttendanceMapper">
- <select id="getGroup" resultType="java.lang.Integer">
- SELECT
- `status`
- FROM
- `smart_attendance`
- GROUP BY
- `status`
- </select>
- <select id="askForLeavePage" resultType="com.template.model.vo.AskForLeaveVo">
- SELECT
- sa.id,
- su.head_image,
- sa.xw_user_name,
- su.card_no,
- sa.start_time,
- sa.end_time,
- sa.reason,
- sa.if_verification,
- sa.initiate_time
- FROM
- `smart_attendance` sa
- LEFT JOIN smart_user su ON su.id = sa.user_id
- WHERE
- sa.`status` = 6
- AND sa.deleted = 0
- <if test="name != null and name != ''">
- and sa.xw_user_name = #{name}
- </if>
- <if test="cardNo != null and cardNo != ''">
- and su.card_no = #{cardNo}
- </if>
- <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
- and sa.initiate_time >= #{startTime} and sa.initiate_time <= #{endTime}
- </if>
- <if test="ifVerification != null and ifVerification != ''">
- and sa.if_verification = #{ifVerification}
- </if>
- ORDER BY sa.initiate_time
- </select>
- </mapper>
|