Explorar o código

物料池查询功能添加人员权限约束-优化sql

zhaoxian %!s(int64=4) %!d(string=hai) anos
pai
achega
dfe382f8ba

+ 7 - 8
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/KuaishouPopulationPackageMapper.xml

@@ -9,7 +9,7 @@
         LEFT JOIN ctop_project_member t3 ON t1.project_id = t3.project_id
         WHERE t1.data_status =1
         <if test="userId !=null">
-            AND t3.user_id =#{userId}
+          AND t3.user_id =#{userId}
         </if>
         <if test="orientationName !=null">
             AND orientation_name LIKE CONCAT('%', #{orientationName}, '%')
@@ -19,8 +19,7 @@
         </if>
         GROUP BY t1.id
         ) t
-    </
-            select>
+    </select>
 
     <select id="queryPageList" resultType="com.alibaba.fastjson.JSONObject">
         SELECT
@@ -64,7 +63,7 @@
     <select id="queryUnitCount" resultType="java.lang.Long">
         SELECT IFNULL(COUNT(1), 0)
         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
               (SELECT orientation_id
                FROM ctop_kuaishou_population_package_rel
@@ -74,9 +73,9 @@
     </select>
 
     <select id="queryListByStatus" resultType="com.alibaba.fastjson.JSONObject">
-        SELECT account_id, project_id
+        SELECT account_id,project_id
         FROM ctop_kuaishou_population_package_rel
-        WHERE data_status = 1
+        WHERE data_status =1
         GROUP BY account_id
     </select>
 
@@ -103,7 +102,7 @@
         select orientation_name
         from ctop_kuaishou_population_package
         where signature = #{signature}
-          AND data_status = 1
-    </select>
+        AND data_status = 1
+</select>
 
 </mapper>