123456789101112131415161718192021222324252627282930 |
- <?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.css.simulation.resource.home.mapper.HomePageMapper" >
- <select id="selectRunTaskChart" parameterType="java.util.Map" resultType="api.common.pojo.vo.home.LineChartVO">
- select
- COUNT(id) as num,
- DATE(run_start_time) as toDate
- FROM simulation_manual_project_task
- WHERE run_start_time >= #{dateBegin,jdbcType=VARCHAR}
- and create_user_id = #{createUserId,jdbcType=VARCHAR}
- GROUP BY DATE(run_start_time)
- ORDER BY toDate ASC
- </select>
- <select id="selectRunProjectChart" parameterType="java.util.Map" resultType="api.common.pojo.vo.home.LineChartVO">
- SELECT
- COUNT(1) as num,
- DATE(t.start_time) as toDate
- FROM(
- SELECT start_time FROM simulation_manual_project
- WHERE start_time >= #{dateBegin,jdbcType=VARCHAR} and create_user_id = #{createUserId,jdbcType=VARCHAR}
- UNION ALL
- SELECT start_time FROM simulation_automatic_subproject
- WHERE start_time >= #{dateBegin,jdbcType=VARCHAR} and create_user_id = #{createUserId,jdbcType=VARCHAR}) as t
- GROUP BY DATE(t.start_time)
- ORDER BY toDate ASC
- </select>
- </mapper>
|