fix compliance listpartners

master
luoyang 6 years ago
parent 1e09f24b85
commit 6255041194

@ -38,6 +38,8 @@ public interface ClientMapper {
PageList<JSONObject> listPartners(JSONObject params, PageBounds pagination); PageList<JSONObject> listPartners(JSONObject params, PageBounds pagination);
PageList<JSONObject> comListPartners(JSONObject params, PageBounds pagination);
List<JSONObject> listClientsIdAndMoniker(); List<JSONObject> listClientsIdAndMoniker();

@ -101,6 +101,75 @@
<bind name="suburb_pattern" value="'%'+suburb+'%'"/> <bind name="suburb_pattern" value="'%'+suburb+'%'"/>
and c.suburb like #{suburb_pattern} and c.suburb like #{suburb_pattern}
</if> </if>
<if test="state!=null">
and c.state=#{state}
</if>
<if test="merchant_id!=null">
and c.merchant_id=#{merchant_id}
</if>
<if test="temp_mch_id!=null">
and locate(c.sub_merchant_id,#{temp_mch_id})&gt;0 and cc.skip_clearing=0 and
locate(c.client_moniker,#{temp_mch_id_source})&lt;=0
</if>
<if test="greenChannelBdTodo">
and ((c.source=1 or c.source=2) and c.approve_result=2 and (c.open_status is null or c.open_status=3))
</if>
<if test="search_text!=null">
<bind name="name_pattern" value="'%'+search_text+'%'"/>
<if test="text_type=='all'">
and (c.client_moniker=#{search_text} or c.short_name like #{name_pattern} or c.company_name like
#{name_pattern} or c.business_name like #{name_pattern} or c.remark like
#{name_pattern} or c.contact_email=#{search_text})
</if>
<if test="text_type=='client_moniker'">
and c.client_moniker=#{search_text}
</if>
<if test="text_type=='client_name'">
and c.short_name like #{name_pattern}
</if>
<if test="text_type=='company_name'">
and c.company_name like #{name_pattern}
</if>
<if test="text_type=='business_name'">
and c.business_name like #{name_pattern}
</if>
<if test="text_type=='contact_email'">
and c.contact_email = #{search_text}
</if>
<if test="text_type=='remark'">
and c.remark like #{name_pattern}
</if>
</if>
<if test="org_id!=null and org_ids==null">and c.org_id=#{org_id}</if>
<if test="org_ids!=null">and c.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
</if>
<if test="referrer_id!=null">and c.referrer_id=#{referrer_id}</if>
<if test="is_valid">and c.is_valid=1</if>
</where>
</select>
<select id="comListPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT DISTINCT c.*,o.name org_name
FROM sys_clients c
inner join sys_client_config cc on cc.client_id = c.client_id
inner join sys_org o
on o.org_id=c.org_id
<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
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
</if>
<where>
<if test="client_moniker !=null">c.client_moniker=#{client_moniker}</if>
<if test="sub_merchant_id!=null">and c.sub_merchant_id=#{sub_merchant_id}</if>
<if test="approving"> <if test="approving">
and ((c.approve_result=4 and c.open_status is null) or (c.approve_result=3 and c.open_status is null) or and ((c.approve_result=4 and c.open_status is null) or (c.approve_result=3 and c.open_status is null) or
c.open_status=1 or c.open_status=2 or c.open_status=4) c.open_status=1 or c.open_status=2 or c.open_status=4)
@ -170,6 +239,7 @@
<if test="is_valid">and c.is_valid=1</if> <if test="is_valid">and c.is_valid=1</if>
</where> </where>
</select> </select>
<select id="passPartners" resultType="com.alibaba.fastjson.JSONObject"> <select id="passPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT SELECT
company_name,short_name,client_moniker,ali_sub_merchant_id,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,merchant_introduction,logo_url,company_photo company_name,short_name,client_moniker,ali_sub_merchant_id,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,merchant_introduction,logo_url,company_photo

Loading…
Cancel
Save