From 7b0c54ca228360c7fde03e7cc8a8cb864693292e Mon Sep 17 00:00:00 2001 From: Tankaikai Date: Tue, 1 Apr 2025 09:05:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E5=89=A7=E6=96=B0=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/ext/ExtSysDao.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/resources/mapper/ext/ExtSysDao.xml b/src/main/resources/mapper/ext/ExtSysDao.xml index 7cdc6418..b313cecf 100644 --- a/src/main/resources/mapper/ext/ExtSysDao.xml +++ b/src/main/resources/mapper/ext/ExtSysDao.xml @@ -10,8 +10,8 @@ t1.avatar, ifnull(t2.signInNum,0) as signInNum, ifnull(t2.awardAmount,0) as awardAmount - from v_tb_user t1 - left JOIN (select x_user_id,sum(money) as awardAmount,sum(case when title = '签到奖励' then 1 else 0 end) as signInNum from v_user_money_details where classify = 6 group by x_user_id) t2 on t1.x_user_id = t2.x_user_id + from tb_user t1 + left JOIN (select x_user_id,sum(money) as awardAmount,sum(case when title = '签到奖励' then 1 else 0 end) as signInNum from user_money_details where classify = 6 group by x_user_id) t2 on t1.x_user_id = t2.x_user_id and (t1.user_name like concat('%',#{keywords},'%') or t1.phone like concat('%',#{keywords},'%')) @@ -24,7 +24,7 @@ t1.by_user_id AS userId, MIN( t1.create_time ) as createTime FROM - v_user_money_details t1 + user_money_details t1 WHERE 1=1 AND t1.user_id = #{userId} AND t1.classify = 6 @@ -39,7 +39,7 @@ t2.phone as userPhone, t1.create_time as createTime FROM - v_user_money_details t1 + user_money_details t1 LEFT JOIN tb_user t2 on t1.by_user_id = t2.user_id WHERE t1.user_id = #{userId} @@ -60,14 +60,14 @@ ifnull( t3.residueDrawCount, 0 ) AS residueDrawCount, ifnull( t3.todayDrawCount, 0 ) AS todayDrawCount FROM - v_tb_user t1 + tb_user t1 LEFT JOIN ( SELECT user_id, count( 1 ) AS unlocked, sum(CASE WHEN pay_time >= DATE_FORMAT(CURDATE(), '%Y-%m-%d 00:00:00') and pay_time <= DATE_FORMAT(CURDATE(), '%Y-%m-%d 23:59:59') then 1 else 0 end) as todayUnlocked FROM - v_orders + orders WHERE STATUS = 1 AND pay_way = 9 GROUP BY user_id ) t2 on t1.user_id = t2.user_id @@ -77,8 +77,8 @@ count(x.orders_id) as totalDrawCount, sum(case when y.source_id is null then 1 else 0 end) as residueDrawCount, sum(case when y.source_id is not null and DATE_FORMAT(y.create_time,'%Y-%m-%d') = CURDATE() then 1 else 0 end) as todayDrawCount - FROM v_orders x - LEFT JOIN v_disc_spinning_record y ON x.orders_id = y.source_id + FROM orders x + LEFT JOIN disc_spinning_record y ON x.orders_id = y.source_id AND y.source = 'order' WHERE 1 = 1 AND x.status = 1 @@ -97,7 +97,7 @@ t1.name, t1.number, t1.create_time - from v_disc_spinning_record t1 + from disc_spinning_record t1 where t1.user_id = #{userId} order by t1.id asc