|
|
|
@@ -822,8 +822,8 @@ |
|
|
|
<select id="findVoList1" resultMap="VoBaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="allVoColumns"/> |
|
|
|
,(select ifnull(sum(credit.credit_num),0) amount from wx_credit_history${tenantEntity.shardFinalTableSuffix} credit |
|
|
|
where credit.`tenant_id` = #{tenantInfo.finalTenantId} |
|
|
|
,(select ifnull(sum(credit.credit_num),0) amount from wx_credit_history${basicInfo.shardFinalTableSuffix} credit |
|
|
|
where credit.`tenant_id` = #{basicInfo.finalTenantId} |
|
|
|
and credit.credit_num > 0 and credit.c_user_id = cu.id |
|
|
|
<if test=" null != basicInfo.creditStartTime "> |
|
|
|
and credit.create_date >= #{basicInfo.creditStartTime} |
|
|
|
@@ -831,8 +831,8 @@ |
|
|
|
<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${tenantEntity.shardFinalTableSuffix} credit |
|
|
|
where credit.`tenant_id` = #{tenantInfo.finalTenantId} |
|
|
|
(select ifnull(sum(credit.credit_num),0) amount from wx_credit_history${basicInfo.shardFinalTableSuffix} credit |
|
|
|
where credit.`tenant_id` = #{basicInfo.finalTenantId} |
|
|
|
and credit.credit_num < 0 and credit.c_user_id = cu.id |
|
|
|
<if test=" null != basicInfo.creditStartTime "> |
|
|
|
and credit.create_date >= #{basicInfo.creditStartTime} |
|
|
|
@@ -841,7 +841,7 @@ |
|
|
|
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` |
|
|
|
left join wx_c_user_tags${basicInfo.shardFinalTableSuffix} cut on cut.`id` = cu.`tag_id` |
|
|
|
<include refid="dynamicVoWhereConditions1"/> |
|
|
|
<if test=" null != basicInfo.begin "> |
|
|
|
limit #{basicInfo.begin}, #{basicInfo.limit} |
|
|
|
|