|
|
|
@@ -825,20 +825,20 @@ |
|
|
|
,(select ifnull(sum(credit.credit_num),0) amount from wx_credit_history credit |
|
|
|
where credit.`tenant_id` = #{tenantInfo.tenantId} |
|
|
|
and credit.credit_num > 0 and credit.c_user_id = cu.id |
|
|
|
<if test=" null != startTime "> |
|
|
|
and credit.create_date >= #{startTime} |
|
|
|
<if test=" null != basicInfo.creditStartTime "> |
|
|
|
and credit.create_date >= #{basicInfo.creditStartTime} |
|
|
|
</if> |
|
|
|
<if test=" null != endTime"> |
|
|
|
and credit.create_date < #{endTime} |
|
|
|
<if test=" null != basicInfo.creditEndTime"> |
|
|
|
and credit.create_date < #{basicInfo.creditEndTime} |
|
|
|
</if>) as addCredit, |
|
|
|
(select ifnull(sum(credit.credit_num),0) amount from wx_credit_history credit |
|
|
|
where credit.`tenant_id` = #{tenantInfo.tenantId} |
|
|
|
and credit.credit_num < 0 and credit.c_user_id = cu.id |
|
|
|
<if test=" null != startTime "> |
|
|
|
and credit.create_date >= #{startTime} |
|
|
|
<if test=" null != basicInfo.creditStartTime "> |
|
|
|
and credit.create_date >= #{basicInfo.creditStartTime} |
|
|
|
</if> |
|
|
|
<if test=" null != endTime"> |
|
|
|
and credit.create_date < #{endTime} |
|
|
|
<if test=" null != basicInfo.creditEndTime"> |
|
|
|
and credit.create_date < #{basicInfo.creditEndTime} |
|
|
|
</if>) as lesCredit |
|
|
|
from wx_c_user_basic_info cu |
|
|
|
left join wx_c_user_tags cut on cut.`id` = cu.`tag_id` |
|
|
|
|