Bläddra i källkod

批量搭建素材选择界面增加md5搜索

xuzuoyun 4 år sedan
förälder
incheckning
5090c241c2

+ 6 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouVideoGetController.java

@@ -87,6 +87,7 @@ public class KuaiShouVideoGetController {
                                                              String endDate,
                                                              String materialType,
                                                              String channelType,
+                                                             String signatures,
                                                              String orderBy,
                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@@ -107,6 +108,7 @@ public class KuaiShouVideoGetController {
             if (Check.isNull(orderBy)) {
                 throw new Exception("请传入排序方式");
             }
+
             List<KuaiShouVideoGetVo> list = new ArrayList<>();
             PageHelper.startPage(pageNo, pageSize);
             Map<String, Object> requestMap = new HashMap<>();
@@ -114,6 +116,10 @@ public class KuaiShouVideoGetController {
             requestMap.put("orderBy", orderBy);
             requestMap.put("materialType", materialType);
             requestMap.put("channelType", channelType);
+            if(!Check.isNull(signatures)){
+                String[] signatureArray =  signatures.split(",");
+                requestMap.put("signatureList", signatureArray);
+            }
             if ("time".equals(orderBy)) {
                 if (!Check.isNull(startDate) && !Check.isNull(endDate)) {
                     requestMap.put("startDate", startDate);

+ 7 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml

@@ -334,7 +334,13 @@
         <if test="endDate != null and endDate != '' ">
             and t1.stat_date &lt;= #{endDate}
         </if>
-
+        <if test="signatureList != null and signatureList != '' ">
+            and t1.signature in
+            <foreach collection="signatureList" item="item" separator=","
+                     open="(" close=")">
+                #{item}
+            </foreach>
+        </if>
         GROUP BY
         signature
         ORDER BY

+ 7 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml

@@ -58,6 +58,13 @@
         <if test="endDate != null and endDate != '' ">
             and stat_date &lt;= #{endDate}
         </if>
+        <if test="signatureList != null and signatureList != '' ">
+            and signature in
+              <foreach collection="signatureList" item="item" separator=","
+                             open="(" close=")">
+                    #{item}
+                </foreach>
+        </if>
         group by signature
         order by stat_date desc
     </select>