Переглянути джерело

【快手视频报表】素材分内外部、增加筛选条件

zhaoxian 4 роки тому
батько
коміт
61a988916a

+ 6 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KsVideoReportCtrl.java

@@ -108,6 +108,9 @@ public class KsVideoReportCtrl {
             if (!Check.isNull(requestBody.getString("order"))) {
                 requestMap.put("order", requestBody.getString("order"));
             }
+            if (!Check.isNull(requestBody.getString("channelName"))) {
+                requestMap.put("channelName", requestBody.getString("channelName"));
+            }
             PageInfo<JSONObject> listData = ksVideoReportService.getKuaiShouVideoPageReportByMap(requestMap, pageSize, pageNo);
             if (Check.isNull(listData)) {
                 throw new Exception("暂无素材相关信息,请检查账户");
@@ -290,6 +293,9 @@ public class KsVideoReportCtrl {
             if (!Check.isNull(requestBody.getString("order"))) {
                 requestMap.put("order", requestBody.getString("order"));
             }
+            if (!Check.isNull(requestBody.getString("channelName"))) {
+                requestMap.put("channelName", requestBody.getString("channelName"));
+            }
 
             JSONArray columns2 = new JSONArray();
             columns2.add(0, "materialName");
@@ -321,7 +327,6 @@ public class KsVideoReportCtrl {
                 }
                 excelList.add(temp);
             }
-
             try {
                 String[] strings = titles.toArray(new String[]{});
                 OutputStream os = response.getOutputStream();
@@ -335,8 +340,6 @@ public class KsVideoReportCtrl {
             } catch (IOException e) {
                 log.error(e.getMessage());
             }
-
-
             result.setSuccess(true);
 
         } catch (Exception e) {

+ 19 - 13
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KsVideoReportMapper.xml

@@ -40,6 +40,12 @@
         <if test="leaderId !=null and leaderId != ''">
             AND t2.design_team_leader_id = #{leaderId}
         </if>
+        <if test="channelName ='内部'">
+            AND (t2.channel_name = #{channelName} or t2.channel_name = '自产')
+        </if>
+        <if test="channelName ='素造'">
+            AND t2.channel_name = #{channelName}
+        </if>
         <if test="clipId !=null and clipId != ''">
             AND t2.clip_id = #{clipId}
         </if>
@@ -176,22 +182,22 @@
     </select>
 
     <select id="getDesignList" resultType="com.alibaba.fastjson.JSONObject">
-    SELECT
-	t1.user_id AS 'userId',
+        SELECT t1.user_id AS 'userId',
 	LEFT (t1.company_name, 2) AS 'companyName',
 	t3.role_name AS 'ruleName',
 	t1.user_name AS 'userName'
-    FROM
-	user_company t1
-    LEFT JOIN sys_user_role t2 ON t1.user_id = t2.user_id
-    LEFT JOIN sys_role t3 ON t2.role_id = t3.id
-    WHERE
-	t3.role_code IN (
-		'plan',
-		'shot',
-		'clip',
-		'designTeamLeader'
-	)
+        FROM
+            user_company t1
+            LEFT JOIN sys_user_role t2
+        ON t1.user_id = t2.user_id
+            LEFT JOIN sys_role t3 ON t2.role_id = t3.id
+        WHERE
+            t3.role_code IN (
+            'plan'
+            , 'shot'
+            , 'clip'
+            , 'designTeamLeader'
+            )
     </select>