|
@@ -4,11 +4,12 @@
|
|
|
|
|
|
<select id="queryPageListTotal" resultType="java.lang.Long">
|
|
<select id="queryPageListTotal" resultType="java.lang.Long">
|
|
SELECT IFNULL(COUNT(1), 0)
|
|
SELECT IFNULL(COUNT(1), 0)
|
|
- FROM ctop_kuaishou_population_package t1
|
|
|
|
|
|
+ FROM
|
|
|
|
+ (SELECT t1.id FROM ctop_kuaishou_population_package t1
|
|
LEFT JOIN ctop_project_member t3 ON t1.project_id = t3.project_id
|
|
LEFT JOIN ctop_project_member t3 ON t1.project_id = t3.project_id
|
|
WHERE t1.data_status =1
|
|
WHERE t1.data_status =1
|
|
<if test="userId !=null">
|
|
<if test="userId !=null">
|
|
- AND t3.user_id =#{userId}
|
|
|
|
|
|
+ AND t3.user_id =#{userId}
|
|
</if>
|
|
</if>
|
|
<if test="orientationName !=null">
|
|
<if test="orientationName !=null">
|
|
AND orientation_name LIKE CONCAT('%', #{orientationName}, '%')
|
|
AND orientation_name LIKE CONCAT('%', #{orientationName}, '%')
|
|
@@ -16,7 +17,10 @@
|
|
<if test="projectId !=null">
|
|
<if test="projectId !=null">
|
|
AND t1.project_id =#{projectId}
|
|
AND t1.project_id =#{projectId}
|
|
</if>
|
|
</if>
|
|
- </select>
|
|
|
|
|
|
+ GROUP BY t1.id
|
|
|
|
+ ) t
|
|
|
|
+ </
|
|
|
|
+ select>
|
|
|
|
|
|
<select id="queryPageList" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="queryPageList" resultType="com.alibaba.fastjson.JSONObject">
|
|
SELECT
|
|
SELECT
|
|
@@ -53,13 +57,14 @@
|
|
<if test="projectId !=null">
|
|
<if test="projectId !=null">
|
|
AND t1.project_id =#{projectId}
|
|
AND t1.project_id =#{projectId}
|
|
</if>
|
|
</if>
|
|
|
|
+ GROUP BY t1.id
|
|
order by t1.create_time desc
|
|
order by t1.create_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="queryUnitCount" resultType="java.lang.Long">
|
|
<select id="queryUnitCount" resultType="java.lang.Long">
|
|
SELECT IFNULL(COUNT(1), 0)
|
|
SELECT IFNULL(COUNT(1), 0)
|
|
FROM ctop_kuaishou_population_group t1
|
|
FROM ctop_kuaishou_population_group t1
|
|
- INNER JOIN ctop_kuaishou_group t3 ON t1.unit_id = t3.unit_id
|
|
|
|
|
|
+ INNER JOIN ctop_kuaishou_group t3 ON t1.unit_id = t3.unit_id
|
|
where orientation_id IN
|
|
where orientation_id IN
|
|
(SELECT orientation_id
|
|
(SELECT orientation_id
|
|
FROM ctop_kuaishou_population_package_rel
|
|
FROM ctop_kuaishou_population_package_rel
|
|
@@ -69,9 +74,9 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="queryListByStatus" resultType="com.alibaba.fastjson.JSONObject">
|
|
<select id="queryListByStatus" resultType="com.alibaba.fastjson.JSONObject">
|
|
- SELECT account_id,project_id
|
|
|
|
|
|
+ SELECT account_id, project_id
|
|
FROM ctop_kuaishou_population_package_rel
|
|
FROM ctop_kuaishou_population_package_rel
|
|
- WHERE data_status =1
|
|
|
|
|
|
+ WHERE data_status = 1
|
|
GROUP BY account_id
|
|
GROUP BY account_id
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -98,7 +103,7 @@
|
|
select orientation_name
|
|
select orientation_name
|
|
from ctop_kuaishou_population_package
|
|
from ctop_kuaishou_population_package
|
|
where signature = #{signature}
|
|
where signature = #{signature}
|
|
- AND data_status = 1
|
|
|
|
-</select>
|
|
|
|
|
|
+ AND data_status = 1
|
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|