master
liuxinxin 5 years ago
parent 2f9a2b46ef
commit db1f6275e5

@ -774,7 +774,7 @@
SELECT c.client_moniker,c.short_name,c.create_time,c.bd_user_name,c.approve_result,c.approve_time,c.open_status, SELECT c.client_moniker,c.short_name,c.create_time,c.bd_user_name,c.approve_result,c.approve_time,c.open_status,
c.source AS client_source,c.refuse_remark,a.* FROM sys_clients c LEFT JOIN client_authfile_compliance a ON c.client_id = a.client_id AND a.type=2 c.source AS client_source,c.refuse_remark,a.* FROM sys_clients c LEFT JOIN client_authfile_compliance a ON c.client_id = a.client_id AND a.type=2
<if test="bd_user!=null"> <if test="bd_user!=null">
INNER JOIN sys_client_bd d ON a.client_id = d.client_id AND d.bd_id = #{bd_user} and INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and
date(d.start_date)&lt;= date(now()) and (d.end_date is null or date(d.end_date)&gt;= date(now())) and date(d.start_date)&lt;= date(now()) and (d.end_date is null or date(d.end_date)&gt;= date(now())) and
d.is_valid=1 d.is_valid=1
</if> </if>
@ -801,13 +801,13 @@
<select id="countKycClients" resultType="int"> <select id="countKycClients" resultType="int">
SELECT count(1) FROM sys_clients c SELECT count(1) FROM sys_clients c
<where>
and c.is_valid=1
<if test="bd_user!=null"> <if test="bd_user!=null">
INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and
date(d.start_date)&lt;= date(now()) and (d.end_date is null or date(d.end_date)&gt;= date(now())) and date(d.start_date)&lt;= date(now()) and (d.end_date is null or date(d.end_date)&gt;= date(now())) and
d.is_valid=1 d.is_valid=1
</if> </if>
<where>
and c.is_valid=1
<if test="bd_group!=null">and c.client_id in <if test="bd_group!=null">and c.client_id in
(SELECT b.client_id FROM sys_client_bd b (SELECT b.client_id FROM sys_client_bd b
INNER JOIN financial_bd_config fb ON fb.manager_id=b.bd_id INNER JOIN financial_bd_config fb ON fb.manager_id=b.bd_id

Loading…
Cancel
Save