|
|
@@ -2,18 +2,6 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fdkankan.manage.mapper.IDataMapper">
|
|
|
|
|
|
- <select id="userDataGroupByDay" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y-%m-%d') AS groupKey, count(id) AS count FROM t_user WHERE rec_status = 'A' GROUP BY groupKey
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="userDataGroupByMouth" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y-%m') AS groupKey, count(id) AS count FROM t_user WHERE rec_status = 'A' GROUP BY groupKey
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="userDataGroupByYear" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y') AS groupKey, count(id) AS count FROM t_user WHERE rec_status = 'A' GROUP BY groupKey
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="cameraDataUnBindGroupByType" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
SELECT type AS groupKey, count(id) AS count FROM t_camera_detail WHERE rec_status = 'A' AND user_id IS NUll GROUP BY type
|
|
|
</select>
|
|
|
@@ -22,34 +10,31 @@
|
|
|
SELECT type AS groupKey, count(id) AS count FROM t_camera_detail WHERE rec_status = 'A' AND user_id IS NOT NUll GROUP BY type
|
|
|
</select>
|
|
|
|
|
|
- <select id="incrementDataGroupByDay" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y-%m-%d') AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_increment_order
|
|
|
- WHERE rec_status = 'A' and pay_status = 1 GROUP BY groupKey
|
|
|
+ <select id="userDataGroupBy" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
+ SELECT DATE_FORMAT(create_time,#{dateFormat}) AS groupKey, count(id) AS count FROM t_user WHERE rec_status = 'A' GROUP BY groupKey
|
|
|
</select>
|
|
|
|
|
|
- <select id="incrementDataGroupByMouth" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y-%m') AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_increment_order
|
|
|
+ <select id="incrementDataGroupBy" resultType="com.fdkankan.manage.vo.response.OrderDataGroupByCount">
|
|
|
+ SELECT DATE_FORMAT(create_time,#{dateFormat}) AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_increment_order
|
|
|
WHERE rec_status = 'A' and pay_status = 1 GROUP BY groupKey
|
|
|
</select>
|
|
|
|
|
|
- <select id="incrementDataGroupByYear" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y') AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_increment_order
|
|
|
+ <select id="downDataGroupBy" resultType="com.fdkankan.manage.vo.response.OrderDataGroupByCount">
|
|
|
+ SELECT DATE_FORMAT(create_time,#{dateFormat}) AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_download_order
|
|
|
WHERE rec_status = 'A' and pay_status = 1 GROUP BY groupKey
|
|
|
</select>
|
|
|
|
|
|
- <select id="downDataGroupByDay" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y-%m-%d') AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_download_order
|
|
|
- WHERE rec_status = 'A' and pay_status = 1 GROUP BY groupKey
|
|
|
- </select>
|
|
|
+ <select id="sceneNumDataGroupBy" resultType="com.fdkankan.manage.vo.response.SceneDataGroupByCount">
|
|
|
+ SELECT DATE_FORMAT(create_time,#{dateFormat}) AS groupKey, count(id) AS count ,sum(view_count) AS viewCount,sum(shoot_count) AS shootCount
|
|
|
+ FROM t_scene_pro WHERE rec_status = 'A'
|
|
|
+ <if test="type == 0">
|
|
|
+ and scene_source in (1,2,12,13,14)
|
|
|
+ </if>
|
|
|
+ <if test="type == 1">
|
|
|
+ and scene_source = 3
|
|
|
+ </if>
|
|
|
+ GROUP BY groupKey
|
|
|
|
|
|
- <select id="downDataGroupByMouth" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y-%m') AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_download_order
|
|
|
- WHERE rec_status = 'A' and pay_status = 1 GROUP BY groupKey
|
|
|
</select>
|
|
|
|
|
|
- <select id="downDataGroupByYear" resultType="com.fdkankan.manage.vo.response.DataGroupByCount">
|
|
|
- SELECT @groupTime:=DATE_FORMAT(create_time,'%Y') AS groupKey, count(id) AS count ,sum(amount) AS amount FROM t_download_order
|
|
|
- WHERE rec_status = 'A' and pay_status = 1 GROUP BY groupKey
|
|
|
- </select>
|
|
|
-
|
|
|
</mapper>
|