|
|
|
@ -10,7 +10,8 @@
|
|
|
|
|
]]>
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="countNewClientsHistory" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
@ -29,7 +30,8 @@
|
|
|
|
|
]]>
|
|
|
|
|
<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>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bd_group!=null">and c.client_id in
|
|
|
|
|
(SELECT b.client_id FROM sys_client_bd b
|
|
|
|
|
INNER JOIN financial_bd_config c ON c.manager_id=b.bd_id
|
|
|
|
@ -50,7 +52,8 @@
|
|
|
|
|
]]>
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!--显示所有的商户,包括禁用的-->
|
|
|
|
@ -77,7 +80,8 @@
|
|
|
|
|
]]>
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
GROUP BY YEAR(create_time),MONTH(create_time),DAY(create_time) ORDER BY create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -90,7 +94,8 @@
|
|
|
|
|
]]>
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="countTradedPartners" resultType="java.lang.Integer">
|
|
|
|
|
<![CDATA[
|
|
|
|
@ -101,7 +106,8 @@
|
|
|
|
|
]]>
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and p.org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and p.org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="countTradePartnersHistory" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
@ -113,7 +119,8 @@
|
|
|
|
|
]]>
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and p.org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and p.org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bd_group!=null">and p.client_id in
|
|
|
|
|
(SELECT b.client_id FROM sys_client_bd b
|
|
|
|
|
INNER JOIN financial_bd_config c ON c.manager_id=b.bd_id
|
|
|
|
@ -239,7 +246,8 @@
|
|
|
|
|
is_valid = 1 and industry <'400' AND approve_result=1
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bd_group!=null">and c.client_id in
|
|
|
|
|
(SELECT b.client_id FROM sys_client_bd b
|
|
|
|
|
INNER JOIN financial_bd_config c ON c.manager_id=b.bd_id
|
|
|
|
@ -254,6 +262,7 @@
|
|
|
|
|
|
|
|
|
|
<select id="notTradeSubMerchantId" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
|
|
SELECT COUNT(DISTINCT c.client_id) client_count,
|
|
|
|
|
c.sub_merchant_id,
|
|
|
|
|
c.merchant_id
|
|
|
|
@ -269,6 +278,7 @@
|
|
|
|
|
|
|
|
|
|
<select id="tradeSubMerchantIdBy60Days" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
|
|
SELECT COUNT(DISTINCT c.client_id) client_count,
|
|
|
|
|
c.sub_merchant_id,
|
|
|
|
|
c.merchant_id,
|
|
|
|
@ -302,7 +312,8 @@
|
|
|
|
|
(c.approve_result = 1 OR c.approve_result= 2) AND c.is_valid = 1
|
|
|
|
|
<if test="org_id!=null and org_ids==null">and org_id=#{org_id}</if>
|
|
|
|
|
<if test="org_ids!=null">and org_id in
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
|
|
|
|
|
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bd_group!=null">and c.client_id in
|
|
|
|
|
(SELECT b.client_id FROM sys_client_bd b
|
|
|
|
|
INNER JOIN financial_bd_config c ON c.manager_id=b.bd_id
|
|
|
|
@ -319,9 +330,13 @@
|
|
|
|
|
<if test="eng!=null">
|
|
|
|
|
o.date > #{end}
|
|
|
|
|
</if>
|
|
|
|
|
</where>)
|
|
|
|
|
</where>
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP by c.clean_days
|
|
|
|
|
</select>
|
|
|
|
|
<select id="listSecurePayMchs" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
SELECT * FROM sys_clients sc where sc.org_id in (112,113) and is_valid=1
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|