浏览代码

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

zhaoxian 4 年之前
父节点
当前提交
637ef192f4

+ 6 - 6
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}, '%')
@@ -63,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
@@ -73,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>
 
@@ -102,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>