|
@@ -11,10 +11,10 @@
|
|
|
|
|
|
<select id="userDataSumGroupBy" resultType="com.fdkankan.manage.vo.response.DataGroupBySum">
|
|
|
SELECT DATE_FORMAT(create_time,#{dateFormat}) AS groupKey,
|
|
|
- <if test="tb == t_order">
|
|
|
+ <if test="tb == 't_order'">
|
|
|
sum(total_amount) AS count
|
|
|
</if>
|
|
|
- <if test="tb != t_order">
|
|
|
+ <if test="tb != 't_order'">
|
|
|
sum(amount) AS count
|
|
|
</if>
|
|
|
FROM ${tb} WHERE rec_status = 'A'
|
|
@@ -36,10 +36,10 @@
|
|
|
SELECT groupKey ,sum(amount) as count FROM (
|
|
|
select
|
|
|
|
|
|
- <if test="tb == t_order">
|
|
|
+ <if test="tb == 't_order'">
|
|
|
total_amount as amount
|
|
|
</if>
|
|
|
- <if test="tb != t_order">
|
|
|
+ <if test="tb != 't_order'">
|
|
|
amount
|
|
|
</if>
|
|
|
,date_format(date_add(create_time,interval-(weekday(create_time ))day),'%Y-%m-%d') as groupKey
|