|
|
@ -4,6 +4,18 @@ |
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.qs.serve.modules.bir.mapper.BirTbsVtbPayJoinMapper"> |
|
|
|
|
|
|
|
<update id="updateActivityAllCenters"> |
|
|
|
update tbs_activity |
|
|
|
left join ( |
|
|
|
select activity_id, |
|
|
|
GROUP_CONCAT(DISTINCT center_name SEPARATOR ', ') AS center_name |
|
|
|
from tbs_activity_center where del_flag = 0 and cost_apply_id > #{maxCostId} |
|
|
|
GROUP BY activity_id |
|
|
|
) tmp on tmp.activity_id = tbs_activity.id |
|
|
|
set all_center_names = tmp.center_name |
|
|
|
where cost_apply_id > #{maxCostId} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="selectSumVtbAmount" resultType="com.qs.serve.modules.bir.entity.dto.BirTbsVtbPayJoinDTO"> |
|
|
|
select |
|
|
|
activity_id, |
|
|
@ -62,17 +74,12 @@ |
|
|
|
|
|
|
|
act.activity_code as activity_code, |
|
|
|
act.act_title as activity_title, |
|
|
|
|
|
|
|
<if test="query.centerName != null and query.centerName != ''"> |
|
|
|
ac.center_name, |
|
|
|
</if> |
|
|
|
|
|
|
|
act.all_center_names as center_name, |
|
|
|
act.act_start_date as act_start_date, |
|
|
|
act.act_end_date as act_end_date, |
|
|
|
act.total_amount as activity_amount, |
|
|
|
act.release_amount as release_amount |
|
|
|
|
|
|
|
|
|
|
|
<if test="query.showType == 0 or query.showType == 2"> |
|
|
|
,v.id as vtb_id, |
|
|
|
v.verification_code as vtb_code, |
|
|
@ -96,15 +103,6 @@ |
|
|
|
LEFT JOIN vtb_verification v ON v.activity_id = act.id |
|
|
|
LEFT JOIN pay_payment_item p ON p.verification_id = v.id |
|
|
|
|
|
|
|
<if test="query.centerName != null and query.centerName != ''"> |
|
|
|
left join |
|
|
|
(select activity_id, GROUP_CONCAT(DISTINCT center_name SEPARATOR ', ') AS center_name |
|
|
|
from tbs_activity_center where |
|
|
|
center_name LIKE CONCAT('%', #{query.centerName}, '%') and tbs_activity_center.del_flag = 0 |
|
|
|
GROUP BY activity_id |
|
|
|
) as ac on act.id = ac.activity_id |
|
|
|
</if> |
|
|
|
|
|
|
|
WHERE |
|
|
|
1=1 |
|
|
|
and a.del_flag = 0 |
|
|
@ -113,8 +111,9 @@ |
|
|
|
and (act.del_flag = 0 or act.id is null ) |
|
|
|
and (v.del_flag = 0 or v.id is null ) |
|
|
|
and (p.del_flag = 0 or p.id is null ) |
|
|
|
|
|
|
|
<if test="query.centerName != null and query.centerName != ''"> |
|
|
|
AND ac.center_name is not null |
|
|
|
AND act.all_center_names LIKE CONCAT('%', #{query.centerName}, '%') |
|
|
|
</if> |
|
|
|
<if test="query.contractFlag != null and query.contractFlag != ''"> |
|
|
|
AND a.contract_flag = #{query.contractFlag} |
|
|
|