PlaneTaskMapper.xml 763 B

123456789101112131415161718192021222324
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.keystar.plane.inspection.mapper.PlaneTaskMapper">
  4. <select id="queryAllTask" resultType="int">
  5. SELECT
  6. COUNT(DISTINCT mission_id)
  7. FROM
  8. kr_plane_task
  9. </select>
  10. <select id="queryFinishedTask" resultType="com.keystar.plane.inspection.vo.PlaneTaskVo" parameterType="com.keystar.plane.inspection.bo.DateBo">
  11. SELECT
  12. mission_id, COUNT(*) AS num_records
  13. FROM
  14. kr_plane_task
  15. WHERE
  16. data BETWEEN #{startTime} AND #{endTime}
  17. GROUP BY
  18. mission_id;
  19. </select>
  20. </mapper>