|
@@ -21,6 +21,7 @@
|
21
|
21
|
<if test="startDate == null or endDate == null">
|
22
|
22
|
AND tp.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
|
23
|
23
|
</if>
|
|
24
|
+
|
24
|
25
|
</select>
|
25
|
26
|
<select id="selectPersonFromGroupByDay"
|
26
|
27
|
resultType="com.huiju.estateagents.statistic.entity.TsPersonFromStatistic">
|
|
@@ -41,4 +42,25 @@
|
41
|
42
|
GROUP BY
|
42
|
43
|
DATE_FORMAT( tp.create_date, '%Y-%m-%d' )
|
43
|
44
|
</select>
|
|
45
|
+ <select id="selectPersonFromGroupByData"
|
|
46
|
+ resultType="com.huiju.estateagents.statistic.entity.TsPersonFromStatistic">
|
|
47
|
+ SELECT
|
|
48
|
+ sum( tp.from_num ) AS from_num,
|
|
49
|
+ sum( tp.registered_num ) AS registered_num,
|
|
50
|
+ DATE_FORMAT( tp.create_date, '%Y-%m-%d' ) AS create_time,
|
|
51
|
+ tp.scene_type
|
|
52
|
+ FROM
|
|
53
|
+ ts_person_from_statistic tp
|
|
54
|
+ WHERE
|
|
55
|
+ tp.org_id = #{orgId}
|
|
56
|
+ <if test="startDate != null or endDate != null">
|
|
57
|
+ AND tp.create_date BETWEEN #{startDate} and #{endDate}
|
|
58
|
+ </if>
|
|
59
|
+ <if test="startDate == null or endDate == null">
|
|
60
|
+ AND tp.create_date BETWEEN DATE_SUB(now(),INTERVAL 7 DAY) and now()
|
|
61
|
+ </if>
|
|
62
|
+ GROUP BY
|
|
63
|
+ DATE_FORMAT( tp.create_date, '%Y-%m-%d' ),
|
|
64
|
+ tp.scene_type
|
|
65
|
+ </select>
|
44
|
66
|
</mapper>
|