|
|
@ -142,7 +142,7 @@
|
|
|
|
<if test="text_type=='all'">
|
|
|
|
<if test="text_type=='all'">
|
|
|
|
and (c.client_moniker=#{search_text} or c.short_name like #{name_pattern} or c.company_name like
|
|
|
|
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.business_name like #{name_pattern} or c.remark like
|
|
|
|
#{name_pattern} or c.contact_email=#{search_text})
|
|
|
|
#{name_pattern} or c.contact_email=#{search_text} or c.address = #{search_text})
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="text_type=='client_moniker'">
|
|
|
|
<if test="text_type=='client_moniker'">
|
|
|
|
and c.client_moniker=#{search_text}
|
|
|
|
and c.client_moniker=#{search_text}
|
|
|
@ -162,6 +162,12 @@
|
|
|
|
<if test="text_type=='remark'">
|
|
|
|
<if test="text_type=='remark'">
|
|
|
|
and c.remark like #{name_pattern}
|
|
|
|
and c.remark like #{name_pattern}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="text_type=='email'">
|
|
|
|
|
|
|
|
and c.contact_email like #{name_pattern}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="text_type=='address'">
|
|
|
|
|
|
|
|
and c.address like #{name_pattern}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="org_id!=null and org_ids==null">and c.org_id=#{org_id}</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
|
|
|
|
<if test="org_ids!=null">and c.org_id in
|
|
|
@ -317,7 +323,7 @@
|
|
|
|
<if test="text_type=='all'">
|
|
|
|
<if test="text_type=='all'">
|
|
|
|
and (c.client_moniker=#{search_text} or c.short_name like #{name_pattern} or c.company_name like
|
|
|
|
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.business_name like #{name_pattern} or c.remark like
|
|
|
|
#{name_pattern} or c.contact_email=#{search_text})
|
|
|
|
#{name_pattern} or c.contact_email=#{search_text} or c.address = #{search_text})
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="text_type=='client_moniker'">
|
|
|
|
<if test="text_type=='client_moniker'">
|
|
|
|
and c.client_moniker=#{search_text}
|
|
|
|
and c.client_moniker=#{search_text}
|
|
|
@ -337,6 +343,12 @@
|
|
|
|
<if test="text_type=='remark'">
|
|
|
|
<if test="text_type=='remark'">
|
|
|
|
and c.remark like #{name_pattern}
|
|
|
|
and c.remark like #{name_pattern}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="text_type=='email'">
|
|
|
|
|
|
|
|
and c.contact_email like #{name_pattern}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="text_type=='address'">
|
|
|
|
|
|
|
|
and c.address like #{name_pattern}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="org_id!=null and org_ids==null">and c.org_id=#{org_id}</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
|
|
|
|
<if test="org_ids!=null">and c.org_id in
|
|
|
@ -675,24 +687,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--此处多分组一次t表,是因为查询的结果会存在误操作的记录-->
|
|
|
|
<select id="findCountByBd" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
<select id="findCountByBd" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
SELECT *
|
|
|
|
SELECT *
|
|
|
|
FROM (
|
|
|
|
FROM (
|
|
|
|
SELECT count(*) yesterday_count
|
|
|
|
SELECT count(client_id) yesterday_count
|
|
|
|
FROM sys_clients
|
|
|
|
FROM (
|
|
|
|
WHERE creator = #{bd_group}
|
|
|
|
SELECT bd.client_id
|
|
|
|
AND create_time >= #{yesterday}
|
|
|
|
FROM sys_client_bd AS bd
|
|
|
|
AND create_time < #{today}
|
|
|
|
WHERE
|
|
|
|
AND is_valid = 1
|
|
|
|
bd.is_valid = 1
|
|
|
|
) a,
|
|
|
|
AND bd.bd_id = #{bd_group}
|
|
|
|
(
|
|
|
|
AND bd.create_time >= #{yesterday}
|
|
|
|
SELECT count(*) month_count
|
|
|
|
AND bd.create_time < #{today}
|
|
|
|
FROM sys_clients
|
|
|
|
AND bd.client_id IN (
|
|
|
|
WHERE creator = #{bd_group}
|
|
|
|
SELECT client_id FROM sys_clients
|
|
|
|
AND create_time >= #{month}
|
|
|
|
WHERE is_valid = 1
|
|
|
|
AND create_time < #{today}
|
|
|
|
AND approve_result = 1)
|
|
|
|
AND is_valid = 1
|
|
|
|
GROUP BY bd.client_id,bd_id
|
|
|
|
) b
|
|
|
|
) t
|
|
|
|
|
|
|
|
) a,
|
|
|
|
|
|
|
|
(
|
|
|
|
|
|
|
|
SELECT count(client_id) month_count
|
|
|
|
|
|
|
|
FROM (
|
|
|
|
|
|
|
|
SELECT bd.client_id
|
|
|
|
|
|
|
|
FROM sys_client_bd AS bd
|
|
|
|
|
|
|
|
WHERE
|
|
|
|
|
|
|
|
bd.is_valid = 1
|
|
|
|
|
|
|
|
AND bd.bd_id = #{bd_group}
|
|
|
|
|
|
|
|
AND bd.create_time >= #{month}
|
|
|
|
|
|
|
|
AND bd.create_time < #{today}
|
|
|
|
|
|
|
|
AND bd.client_id IN (
|
|
|
|
|
|
|
|
SELECT client_id FROM sys_clients
|
|
|
|
|
|
|
|
WHERE is_valid = 1
|
|
|
|
|
|
|
|
AND approve_result = 1)
|
|
|
|
|
|
|
|
GROUP BY bd.client_id,bd_id
|
|
|
|
|
|
|
|
) t
|
|
|
|
|
|
|
|
) b
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="findSamePhone" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
<select id="findSamePhone" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
@ -738,4 +769,6 @@
|
|
|
|
and client_id >= #{start}
|
|
|
|
and client_id >= #{start}
|
|
|
|
and client_id < #{end}
|
|
|
|
and client_id < #{end}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|