EnvThresholdMapper.xml 772 B

12345678910111213141516171819
  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.zhgd.scs.mapper.EnvThresholdMapper">
  6. <select id="getRepetition" resultType="com.zhgd.scs.domain.EnvThreshold">
  7. SELECT *
  8. FROM `env_threshold`
  9. WHERE project_id = #{projectId}
  10. AND name != #{name}
  11. <foreach collection="week" index="index" item="w" open=" " close=" ">
  12. AND `week` like CONCAT('%', #{w} ,'%')
  13. </foreach>
  14. AND (
  15. (start_time &lt;= TIME(#{startTime}) AND end_time >= TIME(#{startTime}))
  16. OR (start_time &lt;= TIME(#{endTime}) AND end_time >= TIME(#{endTime}))
  17. )
  18. </select>
  19. </mapper>