|
|
|
@ -675,24 +675,43 @@
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!--此处多分组一次t表,是因为查询的结果会存在误操作的记录-->
|
|
|
|
|
<select id="findCountByBd" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
SELECT *
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT count(*) yesterday_count
|
|
|
|
|
FROM sys_clients
|
|
|
|
|
WHERE creator = #{bd_group}
|
|
|
|
|
AND create_time >= #{yesterday}
|
|
|
|
|
AND create_time < #{today}
|
|
|
|
|
AND is_valid = 1
|
|
|
|
|
) a,
|
|
|
|
|
(
|
|
|
|
|
SELECT count(*) month_count
|
|
|
|
|
FROM sys_clients
|
|
|
|
|
WHERE creator = #{bd_group}
|
|
|
|
|
AND create_time >= #{month}
|
|
|
|
|
AND create_time < #{today}
|
|
|
|
|
AND is_valid = 1
|
|
|
|
|
) b
|
|
|
|
|
SELECT count(client_id) yesterday_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 >= #{yesterday}
|
|
|
|
|
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
|
|
|
|
|
) a,
|
|
|
|
|
(
|
|
|
|
|
SELECT count(client_id) yesterday_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 id="findSamePhone" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
@ -738,4 +757,6 @@
|
|
|
|
|
and client_id >= #{start}
|
|
|
|
|
and client_id < #{end}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|