Explorar el Código

Merge remote-tracking branch 'origin/V1.1.5' into V1.1.5

yumeng hace 4 años
padre
commit
b448978fef

+ 13 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouBatchCampaignPreviewController.java

@@ -24,7 +24,13 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
@@ -76,7 +82,13 @@ public class KuaishouBatchCampaignPreviewController {
                                                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                                      HttpServletRequest req) {
         Result<IPage<KuaishouBatchCampaignPreview>> result = new Result<>();
+        String statDate = kuaishouBatchCampaignPreview.getStatDate();
+        kuaishouBatchCampaignPreview.setStatDate(null);
         QueryWrapper<KuaishouBatchCampaignPreview> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouBatchCampaignPreview, req.getParameterMap());
+        if (!Check.isNull(statDate)) {
+            queryWrapper.like("create_time", statDate);
+        }
+        queryWrapper.orderByDesc("create_time");
         Page<KuaishouBatchCampaignPreview> page = new Page<KuaishouBatchCampaignPreview>(pageNo, pageSize);
         IPage<KuaishouBatchCampaignPreview> pageList = kuaishouBatchCampaignPreviewService.page(page, queryWrapper);
         result.setSuccess(true);

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

@@ -1,6 +1,7 @@
 package cn.com.ctop.kuaishou.modules.batch.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouBatchCreativePreview;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouBatchCreativePreviewService;
@@ -66,7 +67,13 @@ public class KuaishouBatchCreativePreviewController {
                                                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                                      HttpServletRequest req) {
         Result<IPage<KuaishouBatchCreativePreview>> result = new Result<>();
+        String statDate = kuaishouBatchCreativePreview.getStatDate();
+        kuaishouBatchCreativePreview.setStatDate(null);
         QueryWrapper<KuaishouBatchCreativePreview> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouBatchCreativePreview, req.getParameterMap());
+        if (!Check.isNull(statDate)) {
+            queryWrapper.like("create_time", statDate);
+        }
+        queryWrapper.orderByDesc("create_time");
         Page<KuaishouBatchCreativePreview> page = new Page<KuaishouBatchCreativePreview>(pageNo, pageSize);
         IPage<KuaishouBatchCreativePreview> pageList = kuaishouBatchCreativePreviewService.page(page, queryWrapper);
         result.setSuccess(true);

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

@@ -71,7 +71,13 @@ public class KuaishouBatchGroupPreviewController {
                                                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                                                   HttpServletRequest req) {
         Result<IPage<KuaishouBatchGroupPreview>> result = new Result<>();
+        String statDate = kuaishouBatchGroupPreview.getStatDate();
+        kuaishouBatchGroupPreview.setStatDate(null);
         QueryWrapper<KuaishouBatchGroupPreview> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouBatchGroupPreview, req.getParameterMap());
+        if (!Check.isNull(statDate)) {
+            queryWrapper.like("create_time", statDate);
+        }
+        queryWrapper.orderByDesc("create_time");
         Page<KuaishouBatchGroupPreview> page = new Page<KuaishouBatchGroupPreview>(pageNo, pageSize);
         IPage<KuaishouBatchGroupPreview> pageList = kuaishouBatchGroupPreviewService.page(page, queryWrapper);
         result.setSuccess(true);

+ 3 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaishouBatchCampaignPreview.java

@@ -115,6 +115,9 @@ public class KuaishouBatchCampaignPreview {
     private Long campaignId;
 
     @TableField(exist = false)
+    private String statDate;
+
+    @TableField(exist = false)
     private List<KuaishouBatchGroupPreview> kuaishouBatchGroupPreviews;
 
 }

+ 3 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaishouBatchCreativePreview.java

@@ -1,5 +1,6 @@
 package cn.com.ctop.kuaishou.modules.batch.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -197,5 +198,6 @@ public class KuaishouBatchCreativePreview {
      * 创建成功后的创意ID
      */
     private Long creativeId;
-
+    @TableField(exist = false)
+    private String statDate;
 }

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaishouBatchGroupPreview.java

@@ -259,4 +259,6 @@ public class KuaishouBatchGroupPreview {
     @TableField(exist = false)
     private Long siteId;
 
+    @TableField(exist = false)
+    private String statDate;
 }