AttendanceRuleCategoryMapper.xml 1.2 KB

1234567891011121314151617181920
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.attendance.mapper.AttendanceRuleCategoryMapper">
  6. <select id="getExistCount" parameterType="com.xjrsoft.module.attendance.dto.AddAttendanceRuleCategoryDto" resultType="java.lang.Integer">
  7. SELECT count(*) FROM attendance_rule_category WHERE delete_mark = 0
  8. AND role_id = #{dto.roleId} AND attendance_range = #{dto.attendanceRange}
  9. AND (( #{dto.startDate} BETWEEN start_date AND end_date) OR ( #{dto.endDate} BETWEEN start_date AND end_date))
  10. </select>
  11. <select id="getExistCountNEId" parameterType="com.xjrsoft.module.attendance.dto.UpdateAttendanceRuleCategoryDto" resultType="java.lang.Integer">
  12. SELECT count(*) FROM attendance_rule_category WHERE delete_mark = 0
  13. AND role_id = #{dto.roleId} AND attendance_range = #{dto.attendanceRange}
  14. AND (( #{dto.startDate} BETWEEN start_date AND end_date) OR ( #{dto.endDate} BETWEEN start_date AND end_date))
  15. and id != #{dto.id}
  16. </select>
  17. </mapper>