From 96a415a0de73542ddb5da7eaa61e4d7e55065ae3 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期六, 12 一月 2019 15:30:55 +0800 Subject: [PATCH] Merge branch 'div1' --- fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml index 0a1cee0..a1a849b 100644 --- a/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml +++ b/fanli/src/main/java/com/yeshi/fanli/mapping/UserInfoMapper.xml @@ -216,11 +216,10 @@ <select id="query" resultMap="BaseResultMap"> SELECT u.* <if test="orderField != null and orderField != 5 and orderField != 6"> - ,(SELECT COUNT(hb.id) FROM `yeshi_ec_hongbao` hb - WHERE hb.uid = u.id AND TYPE IN (1,2) + ,(SELECT COUNT(hb.hb_id) FROM `yeshi_ec_hongbao_v2` hb + WHERE hb.hb_uid = u.id AND (hb.hb_type = 1 or hb.hb_type = 2) <if test="orderMode == 2"> - <!-- AND TO_DAYS(FROM_UNIXTIME(hb.`createtime`/1000)) = TO_DAYS(NOW()) --> - AND DATE_FORMAT( FROM_UNIXTIME(hb.`createtime`/1000), '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' ) + AND DATE_FORMAT(hb.`hb_create_time`,'%Y%m') = DATE_FORMAT(CURDATE(),'%Y%m') </if> )AS total </if> -- Gitblit v1.8.0