|
@@ -3,7 +3,7 @@
|
|
<mapper namespace="cn.com.ctop.kuaishou.modules.ai.mapper.KuaishouCrowdPackMapper">
|
|
<mapper namespace="cn.com.ctop.kuaishou.modules.ai.mapper.KuaishouCrowdPackMapper">
|
|
|
|
|
|
<select id="getTotal" resultType="java.lang.Long">
|
|
<select id="getTotal" resultType="java.lang.Long">
|
|
- SELECT COUNT(1) FROM(
|
|
|
|
|
|
+ SELECT IFNULL(COUNT(1),0) FROM(
|
|
SELECT 1
|
|
SELECT 1
|
|
FROM ctop_kuaishou_crowd_package t1
|
|
FROM ctop_kuaishou_crowd_package t1
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
@@ -14,8 +14,8 @@
|
|
<if test="orientationName !=null">
|
|
<if test="orientationName !=null">
|
|
AND orientation_name LIKE CONCAT('%',#{orientationName},'%')
|
|
AND orientation_name LIKE CONCAT('%',#{orientationName},'%')
|
|
</if>
|
|
</if>
|
|
- <if test="accountName !=null">
|
|
|
|
- AND t2.auth_name LIKE CONCAT('%',#{accountName},'%')
|
|
|
|
|
|
+ <if test="accountId !=null">
|
|
|
|
+ AND t2.account_id = #{accountId}
|
|
</if>
|
|
</if>
|
|
<if test="status !=null">
|
|
<if test="status !=null">
|
|
AND t1.`status` =#{status}
|
|
AND t1.`status` =#{status}
|
|
@@ -105,8 +105,8 @@
|
|
<if test="orientationName !=null">
|
|
<if test="orientationName !=null">
|
|
AND orientation_name LIKE CONCAT('%',#{orientationName},'%')
|
|
AND orientation_name LIKE CONCAT('%',#{orientationName},'%')
|
|
</if>
|
|
</if>
|
|
- <if test="accountName !=null">
|
|
|
|
- AND t2.auth_name LIKE CONCAT('%',#{accountName},'%')
|
|
|
|
|
|
+ <if test="accountId !=null">
|
|
|
|
+ AND t2.account_id =#{accountId}
|
|
</if>
|
|
</if>
|
|
<if test="status !=null">
|
|
<if test="status !=null">
|
|
AND t1.`status` =#{status}
|
|
AND t1.`status` =#{status}
|
|
@@ -125,8 +125,8 @@
|
|
<if test="orientationName !=null">
|
|
<if test="orientationName !=null">
|
|
AND orientation_name LIKE CONCAT('%',#{orientationName},'%')
|
|
AND orientation_name LIKE CONCAT('%',#{orientationName},'%')
|
|
</if>
|
|
</if>
|
|
- <if test="accountName !=null">
|
|
|
|
- AND t2.auth_name LIKE CONCAT('%',#{accountName},'%')
|
|
|
|
|
|
+ <if test="accountId !=null">
|
|
|
|
+ AND t2.account_id =#{accountId}
|
|
</if>
|
|
</if>
|
|
<if test="status !=null">
|
|
<if test="status !=null">
|
|
AND t4.`status` =#{status}
|
|
AND t4.`status` =#{status}
|
|
@@ -249,7 +249,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="queryProjectCount" resultType="java.lang.Integer">
|
|
<select id="queryProjectCount" resultType="java.lang.Integer">
|
|
- SELECT COUNT(1)
|
|
|
|
|
|
+ SELECT IFNULL(COUNT(1),0)
|
|
FROM (SELECT t2.project_id
|
|
FROM (SELECT t2.project_id
|
|
FROM ctop_kuaishou_crowd_package t1
|
|
FROM ctop_kuaishou_crowd_package t1
|
|
INNER JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
INNER JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
@@ -260,7 +260,7 @@
|
|
GROUP BY project_id) t
|
|
GROUP BY project_id) t
|
|
</select>
|
|
</select>
|
|
<select id="queryAccountCount" resultType="java.lang.Integer">
|
|
<select id="queryAccountCount" resultType="java.lang.Integer">
|
|
- SELECT COUNT(1)
|
|
|
|
|
|
+ SELECT IFNULL(COUNT(1),0)
|
|
FROM (
|
|
FROM (
|
|
SELECT account_id
|
|
SELECT account_id
|
|
FROM ctop_kuaishou_crowd_package
|
|
FROM ctop_kuaishou_crowd_package
|