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