yumeng 4 éve
szülő
commit
cb29fa37e0
89 módosított fájl, 2668 hozzáadás és 2724 törlés
  1. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaiShouAppInfoController.java
  2. 192 183
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaishouAdvertiserStrategyController.java
  3. 2 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/CrossAccountBatchController.java
  4. 0 4
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouActionBarTextController.java
  5. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouAdvertiserBaseInfoController.java
  6. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouAppInfoController.java
  7. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouAppListController.java
  8. 2 9
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchCampaignTemplateController.java
  9. 2 10
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchCreativeTemplateController.java
  10. 2 10
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchGroupTemplateController.java
  11. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouCampaignController.java
  12. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouCampaignTemplateController.java
  13. 43 43
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouController.java
  14. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouConversionInfosController.java
  15. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouConversionTypesController.java
  16. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouCreativeController.java
  17. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouCreativeTagCollectionController.java
  18. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouDailyFlowsController.java
  19. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouDailyReportTaskController.java
  20. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouDirectionalTemplateController.java
  21. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupBidController.java
  22. 4 12
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupController.java
  23. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupDayBudgetController.java
  24. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupTargetController.java
  25. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupTemplateController.java
  26. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouImageGetController.java
  27. 5 5
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouInterfaceController.java
  28. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouRegionListChildrenController.java
  29. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouRegionListParentController.java
  30. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouReportTaskController.java
  31. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouScheduleController.java
  32. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouTargetingTagsController.java
  33. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouTitleCollectionController.java
  34. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouTrackUrlCollectionController.java
  35. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouVideoGetController.java
  36. 115 108
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouAccountBudgetController.java
  37. 2 8
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouBatchCampaignPreviewController.java
  38. 16 20
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouBatchCreativePreviewController.java
  39. 2 9
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouBatchGroupPreviewController.java
  40. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouCampaignCopyDataController.java
  41. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouPopulationController.java
  42. 2 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouProgramCreativeController.java
  43. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouReportDailyCreativeStatisticController.java
  44. 3 4
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouTemplateController.java
  45. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouTemplateTargetController.java
  46. 2 10
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouVideoRelateCreativesController.java
  47. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/MaterialRefuseController.java
  48. 2 14
      module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatCheckinDataController.java
  49. 2 10
      module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatDepartmentController.java
  50. 3 15
      module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatNoListController.java
  51. 1 1
      module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatUserListController.java
  52. 2 9
      module-shiwan/src/main/java/cn/com/ctop/shiwan/modules/controller/ShiwanFileUploadController.java
  53. 112 109
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/CreateAdlabController.java
  54. 115 116
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/CtopAdlabProjectController.java
  55. 8 11
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/CtopAdlabProjectDetailController.java
  56. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/PlanAnalyzeReportController.java
  57. 20 17
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/ByteDanceBatchController.java
  58. 4 4
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceAreaInfoController.java
  59. 4 3
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceAudienceTemplateController.java
  60. 124 117
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceIndustryInfoController.java
  61. 1 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceInterestCategoryController.java
  62. 13 13
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceAdvertisePlanController.java
  63. 1 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceAdvertiserController.java
  64. 109 111
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceAudiencePackageController.java
  65. 36 31
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCampaignController.java
  66. 2 9
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCreativeController.java
  67. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCreativeMaterialController.java
  68. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceVideoInfoController.java
  69. 131 124
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/BytedanceEffectVideoInfoController.java
  70. 194 187
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/BytedanceImageInfoController.java
  71. 1 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/ByteDanceCleanMaterialReportController.java
  72. 1110 1110
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/ByteDanceVideoReportDailyController.java
  73. 32 29
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAccountReportCtrl.java
  74. 2 9
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAdvertiserDailyReportController.java
  75. 1 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAdvertiserHourlyReportController.java
  76. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCampaignDailyReportController.java
  77. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCampaignHourlyReportController.java
  78. 4 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCreativeDailyReportController.java
  79. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCreativeHourlyReportController.java
  80. 14 13
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceHomepageReportCtrl.java
  81. 6 5
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceInterfaceController.java
  82. 1 1
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedancePlanDailyReportController.java
  83. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedancePlanHourlyReportController.java
  84. 72 69
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportController.java
  85. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportMaterialDailyController.java
  86. 2 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportMaterialRetryController.java
  87. 21 21
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceVideoReportCtrl.java
  88. 63 58
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/tool/controller/ByteDanceQueryToolController.java
  89. 14 14
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/tool/controller/ParseInstallPackageController.java

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaiShouAppInfoController.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaiShouAppInfo;
 import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaiShouAppInfoService;
 import com.alibaba.fastjson.JSON;
@@ -15,7 +16,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 192 - 183
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaishouAdvertiserStrategyController.java

@@ -2,6 +2,7 @@ package cn.com.ctop.kuaishou.modules.ai.controller;
 
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.service.IUserAllocationService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.ResultMapUtils;
 import cn.com.ctop.common.module.utils.StatusCode;
 import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAdvertiserStrategy;
@@ -13,7 +14,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -22,203 +22,212 @@ import java.util.*;
 
 /**
  * 快手账户策略设置信息表
+ *
  * @author jeecg-boot
- * @date   2021-01-25
  * @version V1.0
+ * @date 2021-01-25
  */
 @Slf4j
 @RestController
 @RequestMapping("/ctop/aiKuaishouAdvertiserStrategy")
 public class AiKuaishouAdvertiserStrategyController {
-	@Autowired
-	private IAiKuaishouAdvertiserStrategyService aiKuaishouAdvertiserStrategyService;
+    @Autowired
+    private IAiKuaishouAdvertiserStrategyService aiKuaishouAdvertiserStrategyService;
 
-	/**
-	  * 分页列表查询
-	 * @param aiKuaishouAdvertiserStrategy
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@ApiOperation(value="快手账户策略设置信息表-分页列表查询", notes="快手账户策略设置信息表-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<AiKuaishouAdvertiserStrategy>> queryPageList(AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy,
-																	 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-																	 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-																	 HttpServletRequest req) {
-		Result<IPage<AiKuaishouAdvertiserStrategy>> result = new Result<>();
-		QueryWrapper<AiKuaishouAdvertiserStrategy> queryWrapper = QueryGenerator.initQueryWrapper(aiKuaishouAdvertiserStrategy, req.getParameterMap());
-		Page<AiKuaishouAdvertiserStrategy> page = new Page<>(pageNo, pageSize);
-		queryWrapper.orderByDesc("id");
-		IPage<AiKuaishouAdvertiserStrategy> pageList = aiKuaishouAdvertiserStrategyService.page(page, queryWrapper);
-		List<AiKuaishouAdvertiserStrategy> records = pageList.getRecords();
-		List<AiKuaishouAdvertiserStrategy> setData = new ArrayList<>();
-		if(null!=records&&!records.isEmpty()){
-			records.forEach(record->{
-				Long accountId = record.getAccountId();
-				UserAllocation allocation = allocationService.getByAccountId(accountId);
-				if(null !=allocation){
-					record.setAuthName(allocation.getAuthName());
-				}
-				setData.add(record);
-			});
-			pageList.setRecords(setData);
-		}
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
+    /**
+     * 分页列表查询
+     *
+     * @param aiKuaishouAdvertiserStrategy
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "快手账户策略设置信息表-分页列表查询", notes = "快手账户策略设置信息表-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<AiKuaishouAdvertiserStrategy>> queryPageList(AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy,
+                                                                     @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                     @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                     HttpServletRequest req) {
+        Result<IPage<AiKuaishouAdvertiserStrategy>> result = new Result<>();
+        QueryWrapper<AiKuaishouAdvertiserStrategy> queryWrapper = QueryGenerator.initQueryWrapper(aiKuaishouAdvertiserStrategy, req.getParameterMap());
+        Page<AiKuaishouAdvertiserStrategy> page = new Page<>(pageNo, pageSize);
+        queryWrapper.orderByDesc("id");
+        IPage<AiKuaishouAdvertiserStrategy> pageList = aiKuaishouAdvertiserStrategyService.page(page, queryWrapper);
+        List<AiKuaishouAdvertiserStrategy> records = pageList.getRecords();
+        List<AiKuaishouAdvertiserStrategy> setData = new ArrayList<>();
+        if (null != records && !records.isEmpty()) {
+            records.forEach(record -> {
+                Long accountId = record.getAccountId();
+                UserAllocation allocation = allocationService.getByAccountId(accountId);
+                if (null != allocation) {
+                    record.setAuthName(allocation.getAuthName());
+                }
+                setData.add(record);
+            });
+            pageList.setRecords(setData);
+        }
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
 
-	@Autowired
-	private IUserAllocationService allocationService;
+    @Autowired
+    private IUserAllocationService allocationService;
 
-	/**
-	 *   添加
-	 * @param aiKuaishouAdvertiserStrategy
-	 * @return
-	 */
-	@ApiOperation(value="快手账户策略设置信息表-添加", notes="快手账户策略设置信息表-添加")
-	@PostMapping(value = "/add")
-	public Result<AiKuaishouAdvertiserStrategy> add(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
-		Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
-		try {
-			Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
-			if(null!=singleAppId&&singleAppId==1){
-				Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));
-				aiKuaishouAdvertiserStrategy.setAppId(appId);
-			}
-			aiKuaishouAdvertiserStrategyService.save(aiKuaishouAdvertiserStrategy);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
+    /**
+     * 添加
+     *
+     * @param aiKuaishouAdvertiserStrategy
+     * @return
+     */
+    @ApiOperation(value = "快手账户策略设置信息表-添加", notes = "快手账户策略设置信息表-添加")
+    @PostMapping(value = "/add")
+    public Result<AiKuaishouAdvertiserStrategy> add(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        try {
+            Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
+            if (null != singleAppId && singleAppId == 1) {
+                Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));
+                aiKuaishouAdvertiserStrategy.setAppId(appId);
+            }
+            aiKuaishouAdvertiserStrategyService.save(aiKuaishouAdvertiserStrategy);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
 
-	/**
-	  *  编辑
-	 * @param aiKuaishouAdvertiserStrategy
-	 * @return
-	 */
-	@PostMapping(value = "/edit")
-	public Result<AiKuaishouAdvertiserStrategy> edit(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
-		Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
-		AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(aiKuaishouAdvertiserStrategy.getId());
-		if(aiKuaishouAdvertiserStrategyEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategy);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
+    /**
+     * 编辑
+     *
+     * @param aiKuaishouAdvertiserStrategy
+     * @return
+     */
+    @PostMapping(value = "/edit")
+    public Result<AiKuaishouAdvertiserStrategy> edit(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(aiKuaishouAdvertiserStrategy.getId());
+        if (aiKuaishouAdvertiserStrategyEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategy);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
 
-		return result;
-	}
+        return result;
+    }
 
-	/**
-	 *  开启
-	 * @return
-	 */
-	@GetMapping(value = "/oprateStatus")
-	public Map<String,Object> oprateStatus(Long id, Integer status) {
-		Map<String,Object>result = new HashMap<>();
-		if(null == id||status == null){
-			ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
-			return result;
-		}
-		AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(id);
-		if(aiKuaishouAdvertiserStrategyEntity==null) {
-			ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
-			return result;
-		}
-		if(status!=0){
-			status = 1;
-		}
-		aiKuaishouAdvertiserStrategyEntity.setStatus(status);
-		aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategyEntity);
-		ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
-		return result;
-	}
+    /**
+     * 开启
+     *
+     * @return
+     */
+    @GetMapping(value = "/oprateStatus")
+    public Map<String, Object> oprateStatus(Long id, Integer status) {
+        Map<String, Object> result = new HashMap<>();
+        if (null == id || status == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(id);
+        if (aiKuaishouAdvertiserStrategyEntity == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        if (status != 0) {
+            status = 1;
+        }
+        aiKuaishouAdvertiserStrategyEntity.setStatus(status);
+        aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategyEntity);
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
 
-	/**
-	 *  开启
-	 * @return
-	 */
-	@GetMapping(value = "/oprateCreativeStatus")
-	public Map<String,Object> oprateCreativeStatus(Long id, Integer status) {
-		Map<String,Object>result = new HashMap<>();
-		if(null == id||status == null){
-			ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
-			return result;
-		}
-		AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(id);
-		if(aiKuaishouAdvertiserStrategyEntity==null) {
-			ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
-			return result;
-		}
-		if(status!=0){
-			status = 1;
-		}
-		aiKuaishouAdvertiserStrategyEntity.setOpenProgramCreate(status);
-		aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategyEntity);
-		ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
-		return result;
-	}
+    /**
+     * 开启
+     *
+     * @return
+     */
+    @GetMapping(value = "/oprateCreativeStatus")
+    public Map<String, Object> oprateCreativeStatus(Long id, Integer status) {
+        Map<String, Object> result = new HashMap<>();
+        if (null == id || status == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(id);
+        if (aiKuaishouAdvertiserStrategyEntity == null) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            return result;
+        }
+        if (status != 0) {
+            status = 1;
+        }
+        aiKuaishouAdvertiserStrategyEntity.setOpenProgramCreate(status);
+        aiKuaishouAdvertiserStrategyService.updateById(aiKuaishouAdvertiserStrategyEntity);
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+        return result;
+    }
 
-	/**
-	 * 通过id删除
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="快手账户策略设置信息表-通过id删除", notes="快手账户策略设置信息表-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			aiKuaishouAdvertiserStrategyService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "快手账户策略设置信息表-通过id删除", notes = "快手账户策略设置信息表-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            aiKuaishouAdvertiserStrategyService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
 
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@ApiOperation(value="快手账户策略设置信息表-批量删除", notes="快手账户策略设置信息表-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<AiKuaishouAdvertiserStrategy> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.aiKuaishouAdvertiserStrategyService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @ApiOperation(value = "快手账户策略设置信息表-批量删除", notes = "快手账户策略设置信息表-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<AiKuaishouAdvertiserStrategy> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.aiKuaishouAdvertiserStrategyService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
 
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="快手账户策略设置信息表-通过id查询", notes="快手账户策略设置信息表-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<AiKuaishouAdvertiserStrategy> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
-		AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy = aiKuaishouAdvertiserStrategyService.getById(id);
-		if(aiKuaishouAdvertiserStrategy==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(aiKuaishouAdvertiserStrategy);
-			result.setSuccess(true);
-		}
-		return result;
-	}
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "快手账户策略设置信息表-通过id查询", notes = "快手账户策略设置信息表-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<AiKuaishouAdvertiserStrategy> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
+        AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy = aiKuaishouAdvertiserStrategyService.getById(id);
+        if (aiKuaishouAdvertiserStrategy == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(aiKuaishouAdvertiserStrategy);
+            result.setSuccess(true);
+        }
+        return result;
+    }
 }

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/CrossAccountBatchController.java

@@ -243,7 +243,7 @@ public class CrossAccountBatchController {
                     createUnitArr = crossAccountBatchService.assembleUnitArray(oauthToken, createUnitArr, campaignList);
                 }
             }
-            System.err.println("组装数据:"+createUnitArr);
+            System.err.println("组装数据:" + createUnitArr);
             JSONArray returnArray = crossAccountBatchService.createUnit(createUnitArr);
             System.err.println(returnArray);
             result.setSuccess(true);
@@ -276,7 +276,7 @@ public class CrossAccountBatchController {
                 JSONObject accountJson = accountArr.getJSONObject(i);
                 creativeArray = crossAccountBatchService.assembleCreativeJson(creativeArray, accountJson);
             }
-            System.err.println("组装数据:"+creativeArray);
+            System.err.println("组装数据:" + creativeArray);
             JSONArray returnArray = crossAccountBatchService.createCreative(creativeArray);
             System.err.println(returnArray);
             result.setSuccess(true);

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

@@ -1,13 +1,9 @@
 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.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouActionBarText;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouActionBarTextService;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouAdvertiserBaseInfoController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouAdvertiserBaseInfo;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouAdvertiserBaseInfoService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouAppInfoController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouAppInfo;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouAppInfoService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouAppListController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouAppList;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouAppListService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 2 - 9
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchCampaignTemplateController.java

@@ -2,6 +2,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.KuaiShouBatchCampaignTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCampaignTemplateService;
 import com.alibaba.fastjson.JSON;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -18,14 +18,7 @@ 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.DeleteMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

+ 2 - 10
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchCreativeTemplateController.java

@@ -2,6 +2,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.KuaiShouBatchCreativeTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCreativeTemplateService;
 import com.alibaba.fastjson.JSON;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -20,15 +20,7 @@ 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.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

+ 2 - 10
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouBatchGroupTemplateController.java

@@ -2,6 +2,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.KuaiShouBatchGroupTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchGroupTemplateService;
 import com.alibaba.fastjson.JSON;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -20,15 +20,7 @@ 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.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouCampaignController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouCampaign;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouCampaignService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

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

@@ -2,6 +2,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.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouCampaignTemplate;
 import cn.com.ctop.kuaishou.modules.batch.mapper.KuaiShouCampaignTemplateMapper;
@@ -15,7 +16,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;

+ 43 - 43
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouController.java

@@ -85,23 +85,23 @@ public class KuaiShouController {
         Result<PageInfo<ProjectAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
-        if(dto.getPageSize() == 0){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<ProjectAccountDTO> projectAccountDTOList = accountService.getKuaishouProjectInfo(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(),dto.getPageSize(),dto.getPageNum(), "", dto.getYn());
+        try {
+            PageInfo<ProjectAccountDTO> projectAccountDTOList = accountService.getKuaishouProjectInfo(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(), dto.getPageSize(), dto.getPageNum(), "", dto.getYn());
             result.setResult(projectAccountDTOList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
-        }finally {
+        } finally {
         }
         return result;
     }
@@ -112,19 +112,19 @@ public class KuaiShouController {
         Result<PageInfo<ProjectAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
-        if(dto.getPageSize() == 0){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<ProjectAccountDTO> projectAccountDTOList = accountService.getKuaishouSaleProjectInfo(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(),dto.getPageSize(),dto.getPageNum(), "",dto.getYn());
+        try {
+            PageInfo<ProjectAccountDTO> projectAccountDTOList = accountService.getKuaishouSaleProjectInfo(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(), dto.getPageSize(), dto.getPageNum(), "", dto.getYn());
             result.setResult(projectAccountDTOList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
@@ -138,13 +138,13 @@ public class KuaiShouController {
         Result<PageInfo<ProjectAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
-            return ;
+            return;
         }
         //查询总的消耗信息
-        SheetInfoVo totalSheetVo = accountService.getKuaishouSaleProjectInfoSheetVO(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(),dto.getPageNum(),dto.getPageSize(),"", dto.getYn());
+        SheetInfoVo totalSheetVo = accountService.getKuaishouSaleProjectInfoSheetVO(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(), dto.getPageNum(), dto.getPageSize(), "", dto.getYn());
         OutputStream outputStream = response.getOutputStream();
         String date = DateUtils.formatDate(new Date());
         HttpUtils.setResponseHeader(response, "快手销售报表" + date + ".xlsx");
@@ -162,24 +162,24 @@ public class KuaiShouController {
         Result<PageInfo<KuaishouReportDailyAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
 
-        if(dto.getPageSize() == 0){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<KuaishouReportDailyAccountDTO> kuaishouReportDailyAccountDTOList = accountService.getKuaishouAccountInfoByProjectId(dto.getProjectId(),dto.getProjectList(), dto.getStartDate(), dto.getEndDate(),dto.getPageSize(),dto.getPageNum(),dto.getYn());
+        try {
+            PageInfo<KuaishouReportDailyAccountDTO> kuaishouReportDailyAccountDTOList = accountService.getKuaishouAccountInfoByProjectId(dto.getProjectId(), dto.getProjectList(), dto.getStartDate(), dto.getEndDate(), dto.getPageSize(), dto.getPageNum(), dto.getYn());
             result.setResult(kuaishouReportDailyAccountDTOList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
-        }finally {
+        } finally {
         }
 
         return result;
@@ -190,24 +190,24 @@ public class KuaiShouController {
         Result<PageInfo<KuaishouReportDailyAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
 
-        if(dto.getPageSize() == 0){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<KuaishouReportDailyAccountDTO> kuaishouReportDailyAccountDTOList = accountService.getKuaishouSaleAccountInfoByProjectId(dto.getProjectList(), dto.getProjectId(), dto.getStartDate(), dto.getEndDate(),dto.getPageSize(),dto.getPageNum(),dto.getYn());
+        try {
+            PageInfo<KuaishouReportDailyAccountDTO> kuaishouReportDailyAccountDTOList = accountService.getKuaishouSaleAccountInfoByProjectId(dto.getProjectList(), dto.getProjectId(), dto.getStartDate(), dto.getEndDate(), dto.getPageSize(), dto.getPageNum(), dto.getYn());
             result.setResult(kuaishouReportDailyAccountDTOList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
-        }finally {
+        } finally {
         }
 
         return result;
@@ -218,24 +218,24 @@ public class KuaiShouController {
         Result<PageInfo<KuaishouReportDailyAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
 
-        if(dto.getPageSize() == 0){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<KuaishouReportDailyAccountDTO> kuaishouCampaignInfoList = accountService.getKuaishouCampaignInfoByAccountId(dto.getProjectList(), dto.getAccountId(), dto.getStartDate(), dto.getEndDate(),dto.getPageSize(),dto.getPageNum(),dto.getYn());
+        try {
+            PageInfo<KuaishouReportDailyAccountDTO> kuaishouCampaignInfoList = accountService.getKuaishouCampaignInfoByAccountId(dto.getProjectList(), dto.getAccountId(), dto.getStartDate(), dto.getEndDate(), dto.getPageSize(), dto.getPageNum(), dto.getYn());
             result.setResult(kuaishouCampaignInfoList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
-        }finally {
+        } finally {
         }
 
         return result;
@@ -246,23 +246,23 @@ public class KuaiShouController {
         Result<PageInfo<KuaishouReportDailyAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
-        if(dto.getPageSize() == 0){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<KuaishouReportDailyAccountDTO> kuaishouCampaignInfoList = accountService.getKuaishouUnitInfoByCampaignId(dto.getProjectList(), dto.getCampaignId(), dto.getStartDate(), dto.getEndDate(),dto.getPageSize(),dto.getPageNum(),dto.getYn());
+        try {
+            PageInfo<KuaishouReportDailyAccountDTO> kuaishouCampaignInfoList = accountService.getKuaishouUnitInfoByCampaignId(dto.getProjectList(), dto.getCampaignId(), dto.getStartDate(), dto.getEndDate(), dto.getPageSize(), dto.getPageNum(), dto.getYn());
             result.setResult(kuaishouCampaignInfoList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
-        }finally {
+        } finally {
         }
 
         return result;
@@ -273,20 +273,20 @@ public class KuaiShouController {
         Result<PageInfo<KuaishouReportDailyAccountDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
-        if(dto.getPageSize() == 0){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<KuaishouReportDailyAccountDTO> kuaishouCampaignInfoList = accountService.getKuaishouCreativeInfoByUnitId(dto.getProjectList(), dto.getUnitId(), dto.getStartDate(), dto.getEndDate(),dto.getPageSize(),dto.getPageNum(),dto.getYn());
+        try {
+            PageInfo<KuaishouReportDailyAccountDTO> kuaishouCampaignInfoList = accountService.getKuaishouCreativeInfoByUnitId(dto.getProjectList(), dto.getUnitId(), dto.getStartDate(), dto.getEndDate(), dto.getPageSize(), dto.getPageNum(), dto.getYn());
             result.setResult(kuaishouCampaignInfoList);
             return result;
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouConversionInfosController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouConversionInfos;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouConversionInfosService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouConversionTypesController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouConversionTypes;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouConversionTypesService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouCreativeController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouCreative;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouCreativeService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouCreativeTagCollectionController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouCreativeTagCollection;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouCreativeTagCollectionService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouDailyFlowsController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouDailyFlows;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyFlowsService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouDailyReportTaskController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouDailyReportTask;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouDirectionalTemplateController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouDirectionalTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDirectionalTemplateService;
 import com.alibaba.fastjson.JSON;
@@ -9,7 +10,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupBidController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouGroupBid;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupBidService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 4 - 12
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouGroup;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -20,15 +20,7 @@ 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.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
@@ -192,8 +184,8 @@ public class KuaiShouGroupController {
     @GetMapping(value = "/queryToDayBuiltCount")
     public Result<Object> queryToDayBuiltCount(Long accountId) {
         try {
-            int count =  kuaiShouGroupService.queryToDayBuiltCount(accountId);
-            return Result.ok(600-count);
+            int count = kuaiShouGroupService.queryToDayBuiltCount(accountId);
+            return Result.ok(600 - count);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupDayBudgetController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouGroupDayBudget;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupDayBudgetService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouGroupTargetController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouGroupTarget;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupTargetService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

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

@@ -2,6 +2,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.KuaiShouGroupTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupTemplateService;
 import com.alibaba.fastjson.JSON;
@@ -13,7 +14,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.DateUtils;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouImageGetController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouImageGet;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouImageGetService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 5 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouInterfaceController.java

@@ -31,22 +31,22 @@ public class KuaiShouInterfaceController {
     static ExecutorService executorService = Executors.newFixedThreadPool(5);
 
     @GetMapping(value = "/getOperationRecord")
-    public Result getOperationRecord(@Param("accountId")Long accountId, @Param("operationTarget")Integer operationTarget, @Param("startDate")String startDate, @Param("endDate")String endDate){
+    public Result getOperationRecord(@Param("accountId") Long accountId, @Param("operationTarget") Integer operationTarget, @Param("startDate") String startDate, @Param("endDate") String endDate) {
         Result result = new Result();
         try {
-            if(StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
+            if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
                 result.setSuccess(false);
                 result.setMessage("时间参数不能为空");
                 return result;
 
             }
 
-            if(operationTarget == null){
+            if (operationTarget == null) {
                 result.setSuccess(false);
                 result.setMessage("类型不能为空");
                 return result;
             }
-            if(accountId == null){
+            if (accountId == null) {
                 //1:查询当日数据
                 QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
                 queryWrapper.eq("media_id", 2);
@@ -70,7 +70,7 @@ public class KuaiShouInterfaceController {
                         }
                     });
                 });
-            }else{
+            } else {
                 QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
                 queryWrapper.eq("account_id", accountId);
                 CtopOauthToken token = tokenService.getOauthTokenByAccountId(String.valueOf(accountId));

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouRegionListChildrenController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouRegionListChildren;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouRegionListChildrenService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouRegionListParentController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouRegionListParent;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouRegionListParentService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouReportTaskController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouHistoryReportTask;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouScheduleController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouSchedule;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouScheduleService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouTargetingTagsController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouTargetingTags;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouTargetingTagsService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaiShouTitleCollectionController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouTitleCollection;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouTitleCollectionService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

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

@@ -2,6 +2,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.KuaiShouTrackUrlCollection;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouTrackUrlCollectionService;
 import com.alibaba.fastjson.JSON;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

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

@@ -2,6 +2,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.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
 import cn.com.ctop.kuaishou.modules.batch.entity.vo.KuaiShouVideoGetVo;
@@ -19,7 +20,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 115 - 108
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouAccountBudgetController.java

@@ -1,5 +1,6 @@
 package cn.com.ctop.kuaishou.modules.batch.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouAccountBudget;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouAccountBudgetService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -9,141 +10,147 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 
- /**
+/**
  * 账户日预算
+ *
  * @author jeecg-boot
- * @date   2020-04-26
  * @version V1.0
+ * @date 2020-04-26
  */
 @Slf4j
-@Api(tags="账户日预算")
+@Api(tags = "账户日预算")
 @RestController
 @RequestMapping("/batch/kuaishouAccountBudget")
 public class KuaishouAccountBudgetController {
-	@Autowired
-	private IKuaishouAccountBudgetService kuaishouAccountBudgetService;
+    @Autowired
+    private IKuaishouAccountBudgetService kuaishouAccountBudgetService;
 
-	/**
-	  * 分页列表查询
-	 * @param kuaishouAccountBudget
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@ApiOperation(value="账户日预算-分页列表查询", notes="账户日预算-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<KuaishouAccountBudget>> queryPageList(KuaishouAccountBudget kuaishouAccountBudget,
-															  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-															  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-															  HttpServletRequest req) {
+    /**
+     * 分页列表查询
+     *
+     * @param kuaishouAccountBudget
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "账户日预算-分页列表查询", notes = "账户日预算-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<KuaishouAccountBudget>> queryPageList(KuaishouAccountBudget kuaishouAccountBudget,
+                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                              HttpServletRequest req) {
         Result<IPage<KuaishouAccountBudget>> result = new Result<>();
-		QueryWrapper<KuaishouAccountBudget> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouAccountBudget, req.getParameterMap());
+        QueryWrapper<KuaishouAccountBudget> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouAccountBudget, req.getParameterMap());
         Page<KuaishouAccountBudget> page = new Page<>(pageNo, pageSize);
-		IPage<KuaishouAccountBudget> pageList = kuaishouAccountBudgetService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
+        IPage<KuaishouAccountBudget> pageList = kuaishouAccountBudgetService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
 
-	/**
-	  *   添加
-	 * @param kuaishouAccountBudget
-	 * @return
-	 */
-	@ApiOperation(value="账户日预算-添加", notes="账户日预算-添加")
-	@PostMapping(value = "/add")
-	public Result<KuaishouAccountBudget> add(@RequestBody KuaishouAccountBudget kuaishouAccountBudget) {
+    /**
+     * 添加
+     *
+     * @param kuaishouAccountBudget
+     * @return
+     */
+    @ApiOperation(value = "账户日预算-添加", notes = "账户日预算-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaishouAccountBudget> add(@RequestBody KuaishouAccountBudget kuaishouAccountBudget) {
         Result<KuaishouAccountBudget> result = new Result<>();
-		try {
-			kuaishouAccountBudgetService.save(kuaishouAccountBudget);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
+        try {
+            kuaishouAccountBudgetService.save(kuaishouAccountBudget);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
 
-	/**
-	  *  编辑
-	 * @param kuaishouAccountBudget
-	 * @return
-	 */
-	@PutMapping(value = "/edit")
-	public Result<KuaishouAccountBudget> edit(@RequestBody KuaishouAccountBudget kuaishouAccountBudget) {
+    /**
+     * 编辑
+     *
+     * @param kuaishouAccountBudget
+     * @return
+     */
+    @PutMapping(value = "/edit")
+    public Result<KuaishouAccountBudget> edit(@RequestBody KuaishouAccountBudget kuaishouAccountBudget) {
         Result<KuaishouAccountBudget> result = new Result<>();
-		KuaishouAccountBudget kuaishouAccountBudgetEntity = kuaishouAccountBudgetService.getById(kuaishouAccountBudget.getId());
-		if(kuaishouAccountBudgetEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = kuaishouAccountBudgetService.updateById(kuaishouAccountBudget);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
+        KuaishouAccountBudget kuaishouAccountBudgetEntity = kuaishouAccountBudgetService.getById(kuaishouAccountBudget.getId());
+        if (kuaishouAccountBudgetEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaishouAccountBudgetService.updateById(kuaishouAccountBudget);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
 
         return result;
-	}
+    }
 
-     /**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="账户日预算-通过id删除", notes="账户日预算-通过id删除")
-	@DeleteMapping(value = "/delete")
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "账户日预算-通过id删除", notes = "账户日预算-通过id删除")
+    @DeleteMapping(value = "/delete")
     public Result<Object> delete(@RequestParam(name = "id", required = true) String id) {
-		try {
-			kuaishouAccountBudgetService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
+        try {
+            kuaishouAccountBudgetService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
 
-     /**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@ApiOperation(value="账户日预算-批量删除", notes="账户日预算-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<KuaishouAccountBudget> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @ApiOperation(value = "账户日预算-批量删除", notes = "账户日预算-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<KuaishouAccountBudget> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
         Result<KuaishouAccountBudget> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.kuaishouAccountBudgetService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaishouAccountBudgetService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
 
-     /**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="账户日预算-通过id查询", notes="账户日预算-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<KuaishouAccountBudget> queryById(@RequestParam(name="id",required=true) String id) {
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "账户日预算-通过id查询", notes = "账户日预算-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<KuaishouAccountBudget> queryById(@RequestParam(name = "id", required = true) String id) {
         Result<KuaishouAccountBudget> result = new Result<>();
-		KuaishouAccountBudget kuaishouAccountBudget = kuaishouAccountBudgetService.getById(id);
-		if(kuaishouAccountBudget==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(kuaishouAccountBudget);
-			result.setSuccess(true);
-		}
-		return result;
-	}
+        KuaishouAccountBudget kuaishouAccountBudget = kuaishouAccountBudgetService.getById(id);
+        if (kuaishouAccountBudget == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaishouAccountBudget);
+            result.setSuccess(true);
+        }
+        return result;
+    }
 }

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

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouBatchCampaignPreview;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouUpdateService;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouBatchCampaignPreviewService;
@@ -16,7 +17,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -24,13 +24,7 @@ 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.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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

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

@@ -1,43 +1,38 @@
 package cn.com.ctop.kuaishou.modules.batch.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
 import cn.com.ctop.common.module.annotation.AutoLog;
+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;
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
-
-import java.util.Date;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 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.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 快手-广告创意预览信息
@@ -99,6 +94,7 @@ public class KuaishouBatchCreativePreviewController {
         }
         return result;
     }
+
     /**
      * 添加
      *

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

@@ -2,6 +2,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.entity.KuaishouBatchGroupPreview;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouBatchCreativePreviewService;
@@ -15,7 +16,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -23,14 +23,7 @@ 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.DeleteMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

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

@@ -2,6 +2,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.KuaishouCampaignCopyData;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouCampaignCopyDataService;
 import com.alibaba.fastjson.JSON;
@@ -14,7 +15,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouPopulationController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouPopulation;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouPopulationService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouProgramCreativeController.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouProgramCreative;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouProgramCreativeService;
 import com.alibaba.fastjson.JSON;
@@ -16,7 +17,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -147,7 +147,7 @@ public class KuaishouProgramCreativeController {
         Result<JSONArray> result = new Result<>();
         try {
 
-             JSONArray md5Arr = jsonObject.getJSONArray("md5Arr");
+            JSONArray md5Arr = jsonObject.getJSONArray("md5Arr");
 
             if (Check.isNull(md5Arr)) {
                 throw new Exception("请选择视频");

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouReportDailyCreativeStatisticController.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.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyCreativeStatistic;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyCreativeStatisticService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 3 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouTemplateController.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouTemplate;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouTemplateService;
 import com.alibaba.fastjson.JSON;
@@ -13,7 +14,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -57,16 +57,15 @@ public class KuaishouTemplateController {
     @AutoLog(value = "快手-定向模板-分页列表查询")
     @ApiOperation(value = "快手-定向模板-分页列表查询", notes = "快手-定向模板-分页列表查询")
     @GetMapping(value = "/list")
-    public Result<List<JSONObject>> list(Long accountId,Integer platformOs) {
+    public Result<List<JSONObject>> list(Long accountId, Integer platformOs) {
         Result<List<JSONObject>> result = new Result<>();
-        List<JSONObject> list = kuaishouTemplateService.getJsonArrByAccountId(accountId,platformOs);
+        List<JSONObject> list = kuaishouTemplateService.getJsonArrByAccountId(accountId, platformOs);
         result.setSuccess(true);
         result.setResult(list);
         return result;
     }
 
 
-
     /**
      * 分页列表查询
      *

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouTemplateTargetController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouTemplate;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouTemplateTarget;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouTemplateService;
@@ -14,7 +15,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 2 - 10
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/KuaishouVideoRelateCreativesController.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.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouVideoRelateCreatives;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouVideoRelateCreativesService;
 import com.alibaba.fastjson.JSON;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -20,15 +20,7 @@ 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.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

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

@@ -3,6 +3,7 @@ package cn.com.ctop.kuaishou.modules.batch.controller;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.mapper.CtopOauthTokenMapper;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouActionBarText;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouCreative;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouActionBarTextService;
@@ -15,7 +16,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 2 - 14
module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatCheckinDataController.java

@@ -2,6 +2,7 @@ package cn.com.ctop.oa.modules.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.oa.modules.entity.WechatCheckinData;
 import cn.com.ctop.oa.modules.entity.WechatCheckinSubData;
 import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -20,15 +20,7 @@ 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.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
@@ -60,10 +52,6 @@ public class WechatCheckinDataController {
     /**
      * 分页列表查询
      *
-     * @param wechatCheckinData
-     * @param pageNo
-     * @param pageSize
-     * @param req
      * @return
      */
     @AutoLog(value = "考勤打卡明细-分页列表查询")

+ 2 - 10
module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatDepartmentController.java

@@ -2,6 +2,7 @@ package cn.com.ctop.oa.modules.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.oa.modules.entity.WechatDepartment;
 import cn.com.ctop.oa.modules.service.IWechatDepartmentService;
 import com.alibaba.fastjson.JSON;
@@ -13,7 +14,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -21,15 +21,7 @@ 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.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

+ 3 - 15
module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatNoListController.java

@@ -4,6 +4,7 @@ import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.ExportExcelUtils;
 import cn.com.ctop.common.module.utils.HttpUtils;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.oa.modules.entity.WechatAttendance;
 import cn.com.ctop.oa.modules.entity.WechatNoList;
 import cn.com.ctop.oa.modules.service.IWechatNoListService;
@@ -17,7 +18,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -25,15 +25,7 @@ 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.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
@@ -44,11 +36,7 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 审批信息

+ 1 - 1
module-oa/src/main/java/cn/com/ctop/oa/modules/controller/WechatUserListController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.oa.modules.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.oa.modules.entity.WechatUserList;
 import cn.com.ctop.oa.modules.service.IWechatUserListService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;

+ 2 - 9
module-shiwan/src/main/java/cn/com/ctop/shiwan/modules/controller/ShiwanFileUploadController.java

@@ -2,6 +2,7 @@ package cn.com.ctop.shiwan.modules.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.shiwan.modules.entity.ShiwanFileUpload;
 import cn.com.ctop.shiwan.modules.service.IShiwanFileUploadService;
 import com.alibaba.fastjson.JSON;
@@ -13,7 +14,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -21,14 +21,7 @@ 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.DeleteMapping;
-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.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;

+ 112 - 109
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/CreateAdlabController.java

@@ -6,12 +6,13 @@ import cn.com.ctop.toutiao.modules.adlab.service.ICreateProjectService;
 import cn.com.ctop.toutiao.modules.adlab.service.ICtopAdlabProjectDetailService;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+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.RestController;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -31,36 +32,36 @@ public class CreateAdlabController {
 
 
     /**
-     *  投放管家创建项目第一步
+     * 投放管家创建项目第一步
      */
     @PostMapping(value = "/create")
-    public Result<List<JSONObject>> create(@RequestBody JSONObject requestBody){
-        Result<List<JSONObject>> result =new Result<>();
-        JSONArray accountIds=requestBody.getJSONArray("accountIds");
-        if(accountIds.isEmpty()){
-           result.error500("请选择账户再继续操作");
-        }else{
-            List<JSONObject> resultList=new ArrayList<>();
-            accountIds.forEach(accountId->{
+    public Result<List<JSONObject>> create(@RequestBody JSONObject requestBody) {
+        Result<List<JSONObject>> result = new Result<>();
+        JSONArray accountIds = requestBody.getJSONArray("accountIds");
+        if (accountIds.isEmpty()) {
+            result.error500("请选择账户再继续操作");
+        } else {
+            List<JSONObject> resultList = new ArrayList<>();
+            accountIds.forEach(accountId -> {
                 //临时存每一个账户创建后的数据
-                JSONObject repoTemp=new JSONObject();
-                requestBody.put("accountId",accountId);
+                JSONObject repoTemp = new JSONObject();
+                requestBody.put("accountId", accountId);
                 //查询该账户的token
                 CtopOauthToken token = ctopOauthTokenService.getTokenByAccountId((Long) accountId);
                 JSONObject repo = createProjectService.createGroup(token, requestBody);
-                if(repo.getInteger("code")==0){
-                    repoTemp.put("code",0);
-                    repoTemp.put("accountId",accountId);
-                    repoTemp.put("groupId",repo.getJSONObject("data").getLong("group_id"));
+                if (repo.getInteger("code") == 0) {
+                    repoTemp.put("code", 0);
+                    repoTemp.put("accountId", accountId);
+                    repoTemp.put("groupId", repo.getJSONObject("data").getLong("group_id"));
                     //在此塞进去,前端后续会用来做判断条件
-                    repoTemp.put("name",requestBody.getString("name"));
-                    repoTemp.put("adTarget",requestBody.getString("adTarget"));
-                    repoTemp.put("deliveryRange",requestBody.getString("deliveryRange"));
-                    repoTemp.put("landingType",requestBody.getString("landingType"));
-                }else{
-                    repoTemp.put("code",500);
-                    repoTemp.put("message",repo.getString("message"));
-                    repoTemp.put("accountId",accountId);
+                    repoTemp.put("name", requestBody.getString("name"));
+                    repoTemp.put("adTarget", requestBody.getString("adTarget"));
+                    repoTemp.put("deliveryRange", requestBody.getString("deliveryRange"));
+                    repoTemp.put("landingType", requestBody.getString("landingType"));
+                } else {
+                    repoTemp.put("code", 500);
+                    repoTemp.put("message", repo.getString("message"));
+                    repoTemp.put("accountId", accountId);
                 }
                 resultList.add(repoTemp);
             });
@@ -69,141 +70,143 @@ public class CreateAdlabController {
         }
         return result;
     }
+
     /**
-     *  投放管家创建项目第二步,设置项目定向信息
+     * 投放管家创建项目第二步,设置项目定向信息
      */
     @PostMapping(value = "/setConvert")
-    public Result<List<JSONObject>> setConvert(@RequestBody JSONArray requestBody){
-        Result<List<JSONObject>> result =new Result<>();
-        List<JSONObject> resultList=new ArrayList<>();
-        if(requestBody.size()>0){
-            requestBody.forEach(convert->{
-                Map<String,Object> convert2Map=  (Map<String,Object>)convert;
-                JSONObject repoTemp=new JSONObject();
+    public Result<List<JSONObject>> setConvert(@RequestBody JSONArray requestBody) {
+        Result<List<JSONObject>> result = new Result<>();
+        List<JSONObject> resultList = new ArrayList<>();
+        if (requestBody.size() > 0) {
+            requestBody.forEach(convert -> {
+                Map<String, Object> convert2Map = (Map<String, Object>) convert;
+                JSONObject repoTemp = new JSONObject();
                 CtopOauthToken token = ctopOauthTokenService.getTokenByAccountId((Long) convert2Map.get("accountId"));
                 JSONObject repo = createProjectService.updateGroupConvert(token, convert2Map);
-                if(repo.getInteger("code")==0){
-                    repoTemp.put("code",0);
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
-                    repoTemp.put("groupId",repo.getJSONObject("data").getLong("group_id"));
-                    repoTemp.put("name",convert2Map.get("name"));
-                    repoTemp.put("adTarget",convert2Map.get("adTarget"));
-                    repoTemp.put("deliveryRange",convert2Map.get("deliveryRange"));
-                    repoTemp.put("landingType",convert2Map.get("landingType"));
-                }else{
-                    repoTemp.put("code",500);
-                    repoTemp.put("message",repo.getString("message"));
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
+                if (repo.getInteger("code") == 0) {
+                    repoTemp.put("code", 0);
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
+                    repoTemp.put("groupId", repo.getJSONObject("data").getLong("group_id"));
+                    repoTemp.put("name", convert2Map.get("name"));
+                    repoTemp.put("adTarget", convert2Map.get("adTarget"));
+                    repoTemp.put("deliveryRange", convert2Map.get("deliveryRange"));
+                    repoTemp.put("landingType", convert2Map.get("landingType"));
+                } else {
+                    repoTemp.put("code", 500);
+                    repoTemp.put("message", repo.getString("message"));
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
                 }
                 resultList.add(repoTemp);
             });
             result.setResult(resultList);
             result.setSuccess(true);
-        }else {
+        } else {
             result.error500("请选择需要设置转化信息的项目");
         }
         return result;
     }
+
     /**
-     *  投放管家创建项目第三步,设置项目定向信息
+     * 投放管家创建项目第三步,设置项目定向信息
      */
     @PostMapping(value = "/setAudience")
-    public Result<List<JSONObject>> setAudience(@RequestBody JSONArray requestBody){
+    public Result<List<JSONObject>> setAudience(@RequestBody JSONArray requestBody) {
 
-        Result<List<JSONObject>> result =new Result<>();
-        List<JSONObject> resultList=new ArrayList<>();
-        if(requestBody.size()>0){
-            requestBody.forEach(convert->{
-                Map<String,Object> convert2Map= (Map<String,Object>)convert;
-                JSONObject repoTemp=new JSONObject();
+        Result<List<JSONObject>> result = new Result<>();
+        List<JSONObject> resultList = new ArrayList<>();
+        if (requestBody.size() > 0) {
+            requestBody.forEach(convert -> {
+                Map<String, Object> convert2Map = (Map<String, Object>) convert;
+                JSONObject repoTemp = new JSONObject();
                 CtopOauthToken token = ctopOauthTokenService.getTokenByAccountId((Long) convert2Map.get("accountId"));
                 JSONObject repo = createProjectService.updateGroupAudience(token, convert2Map);
-                 if(repo.getInteger("code")==0){
-                    repoTemp.put("code",0);
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
-                    repoTemp.put("groupId",repo.getJSONObject("data").getLong("group_id"));
-                    repoTemp.put("name",convert2Map.get("name"));
-                    repoTemp.put("adTarget",convert2Map.get("adTarget"));
-                    repoTemp.put("deliveryRange",convert2Map.get("deliveryRange"));
-                    repoTemp.put("landingType",convert2Map.get("landingType"));
-                    repoTemp.put("inventoryType",convert2Map.get("inventoryType"));
-                }else{
-                    repoTemp.put("code",500);
-                    repoTemp.put("message",repo.getString("message"));
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
+                if (repo.getInteger("code") == 0) {
+                    repoTemp.put("code", 0);
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
+                    repoTemp.put("groupId", repo.getJSONObject("data").getLong("group_id"));
+                    repoTemp.put("name", convert2Map.get("name"));
+                    repoTemp.put("adTarget", convert2Map.get("adTarget"));
+                    repoTemp.put("deliveryRange", convert2Map.get("deliveryRange"));
+                    repoTemp.put("landingType", convert2Map.get("landingType"));
+                    repoTemp.put("inventoryType", convert2Map.get("inventoryType"));
+                } else {
+                    repoTemp.put("code", 500);
+                    repoTemp.put("message", repo.getString("message"));
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
                 }
                 resultList.add(repoTemp);
             });
             result.setResult(resultList);
             result.setSuccess(true);
-        }else {
+        } else {
             result.error500("请选择需要设置定向信息的项目");
         }
         return result;
     }
 
     /**
-     *  投放管家创建项目第四步,设置项目创意信息
+     * 投放管家创建项目第四步,设置项目创意信息
      */
     @PostMapping(value = "/setCreative")
-    public Result<List<JSONObject>> setCreative(@RequestBody JSONArray requestBody){
-        Result<List<JSONObject>> result =new Result<>();
-        List<JSONObject> resultList=new ArrayList<>();
-        if(requestBody.size()>0){
-            requestBody.forEach(convert->{
-                Map<String,Object> convert2Map=  (Map<String,Object>)convert;
-                JSONObject repoTemp=new JSONObject();
+    public Result<List<JSONObject>> setCreative(@RequestBody JSONArray requestBody) {
+        Result<List<JSONObject>> result = new Result<>();
+        List<JSONObject> resultList = new ArrayList<>();
+        if (requestBody.size() > 0) {
+            requestBody.forEach(convert -> {
+                Map<String, Object> convert2Map = (Map<String, Object>) convert;
+                JSONObject repoTemp = new JSONObject();
                 CtopOauthToken token = ctopOauthTokenService.getTokenByAccountId((Long) convert2Map.get("accountId"));
                 JSONObject repo = createProjectService.updateGroupCreative(token, convert2Map);
 
-                if(repo.getInteger("code")==0){
-                    repoTemp.put("code",0);
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
-                    repoTemp.put("groupId",repo.getJSONObject("data").getLong("group_id"));
-                    repoTemp.put("name",convert2Map.get("name"));
-                    repoTemp.put("adTarget",convert2Map.get("adTarget"));
-                    repoTemp.put("deliveryRange",convert2Map.get("deliveryRange"));
-                    repoTemp.put("landingType",convert2Map.get("landingType"));
-                    repoTemp.put("inventoryType",convert2Map.get("inventoryType"));
-                }else{
-                    repoTemp.put("code",500);
-                    repoTemp.put("message",repo.getString("message"));
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
+                if (repo.getInteger("code") == 0) {
+                    repoTemp.put("code", 0);
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
+                    repoTemp.put("groupId", repo.getJSONObject("data").getLong("group_id"));
+                    repoTemp.put("name", convert2Map.get("name"));
+                    repoTemp.put("adTarget", convert2Map.get("adTarget"));
+                    repoTemp.put("deliveryRange", convert2Map.get("deliveryRange"));
+                    repoTemp.put("landingType", convert2Map.get("landingType"));
+                    repoTemp.put("inventoryType", convert2Map.get("inventoryType"));
+                } else {
+                    repoTemp.put("code", 500);
+                    repoTemp.put("message", repo.getString("message"));
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
                 }
                 resultList.add(repoTemp);
             });
             result.setResult(resultList);
             result.setSuccess(true);
-        }else {
+        } else {
             result.error500("请选择需要设置定向信息的项目");
         }
         return result;
     }
 
     /**
-     *  投放管家创建项目第五步,设置项目预算信息
+     * 投放管家创建项目第五步,设置项目预算信息
      */
     @PostMapping(value = "/setBudget")
-    public Result<List<JSONObject>> setBudget(@RequestBody JSONArray requestBody ){
+    public Result<List<JSONObject>> setBudget(@RequestBody JSONArray requestBody) {
 
-        Result<List<JSONObject>> result =new Result<>();
-        List<JSONObject> resultList=new ArrayList<>();
-        if(requestBody.size()>0){
-            requestBody.forEach(convert->{
-                Map<String,Object> convert2Map=  (Map<String,Object>)convert;
-                JSONObject repoTemp=new JSONObject();
+        Result<List<JSONObject>> result = new Result<>();
+        List<JSONObject> resultList = new ArrayList<>();
+        if (requestBody.size() > 0) {
+            requestBody.forEach(convert -> {
+                Map<String, Object> convert2Map = (Map<String, Object>) convert;
+                JSONObject repoTemp = new JSONObject();
                 CtopOauthToken token = ctopOauthTokenService.getTokenByAccountId((Long) convert2Map.get("accountId"));
                 JSONObject repo = createProjectService.updateGroupBudget(token, convert2Map);
                 log.info(repo.toJSONString());
-                if(repo.getInteger("code")==0){
-                    repoTemp.put("code",0);
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
-                    repoTemp.put("groupId",repo.getJSONObject("data").getLong("group_id"));
-                    repoTemp.put("userId",convert2Map.get("userId"));
-                }else{
-                    repoTemp.put("code",500);
-                    repoTemp.put("message",repo.getString("message"));
-                    repoTemp.put("accountId",convert2Map.get("accountId"));
+                if (repo.getInteger("code") == 0) {
+                    repoTemp.put("code", 0);
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
+                    repoTemp.put("groupId", repo.getJSONObject("data").getLong("group_id"));
+                    repoTemp.put("userId", convert2Map.get("userId"));
+                } else {
+                    repoTemp.put("code", 500);
+                    repoTemp.put("message", repo.getString("message"));
+                    repoTemp.put("accountId", convert2Map.get("accountId"));
                 }
                 resultList.add(repoTemp);
             });
@@ -211,7 +214,7 @@ public class CreateAdlabController {
             adlabProjectDetailService.putStorage(resultList);
             result.setResult(resultList);
             result.setSuccess(true);
-        }else {
+        } else {
             result.error500("请选择需要设置定向信息的项目");
         }
         return result;

+ 115 - 116
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/CtopAdlabProjectController.java

@@ -1,138 +1,137 @@
 package cn.com.ctop.toutiao.modules.adlab.controller;
 
-import java.util.Arrays;
-
-import javax.servlet.http.HttpServletRequest;
-
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.adlab.entity.CtopAdlabProject;
 import cn.com.ctop.toutiao.modules.adlab.service.ICtopAdlabProjectService;
 import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-
-import org.jeecg.common.system.query.QueryGenerator;
+import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import io.swagger.annotations.ApiOperation;
 
- /**
+import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
+
+/**
  * 投放管家项目列表
  */
 @Slf4j
 @RestController
 @RequestMapping("/adlab/ctopAdlabProject")
 public class CtopAdlabProjectController {
-	@Autowired
-	private ICtopAdlabProjectService ctopAdlabProjectService;
-
-	/**
-	  * 分页列表查询
-	 */
-	@GetMapping(value = "/list")
-	public Result<IPage<CtopAdlabProject>> queryPageList(CtopAdlabProject ctopAdlabProject,
-														 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-														 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-														 HttpServletRequest req) {
-		Result<IPage<CtopAdlabProject>> result = new Result<>();
-		QueryWrapper<CtopAdlabProject> queryWrapper = QueryGenerator.initQueryWrapper(ctopAdlabProject, req.getParameterMap());
-		Page<CtopAdlabProject> page = new Page<>(pageNo, pageSize);
-		IPage<CtopAdlabProject> pageList = ctopAdlabProjectService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
-
-	/**
-	  *   添加
-	 */
-	@PostMapping(value = "/add")
-	public Result<CtopAdlabProject> add(@RequestBody CtopAdlabProject ctopAdlabProject) {
-		Result<CtopAdlabProject> result = new Result<>();
-		try {
-			ctopAdlabProjectService.save(ctopAdlabProject);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
-
-	/**
-	  *  编辑
-	 */
-	@PostMapping(value = "/edit")
-	public Result<CtopAdlabProject> edit(@RequestParam JSONArray accountIds,
-										 @RequestParam JSONArray groupIds,
-										 @RequestParam String optStatus) {
-		Result<CtopAdlabProject> result = new Result<CtopAdlabProject>();
-
-
-		return result;
-	}
-
-	/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "投放管家项目列表-通过id删除")
-	@ApiOperation(value="投放管家项目列表-通过id删除", notes="投放管家项目列表-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			ctopAdlabProjectService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
-
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "投放管家项目列表-批量删除")
-	@ApiOperation(value="投放管家项目列表-批量删除", notes="投放管家项目列表-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<CtopAdlabProject> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<CtopAdlabProject> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.ctopAdlabProjectService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
-
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "投放管家项目列表-通过id查询")
-	@ApiOperation(value="投放管家项目列表-通过id查询", notes="投放管家项目列表-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<CtopAdlabProject> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<CtopAdlabProject> result = new Result<>();
-		CtopAdlabProject ctopAdlabProject = ctopAdlabProjectService.getById(id);
-		if(ctopAdlabProject==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(ctopAdlabProject);
-			result.setSuccess(true);
-		}
-		return result;
-	}
-
+    @Autowired
+    private ICtopAdlabProjectService ctopAdlabProjectService;
+
+    /**
+     * 分页列表查询
+     */
+    @GetMapping(value = "/list")
+    public Result<IPage<CtopAdlabProject>> queryPageList(CtopAdlabProject ctopAdlabProject,
+                                                         @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                         HttpServletRequest req) {
+        Result<IPage<CtopAdlabProject>> result = new Result<>();
+        QueryWrapper<CtopAdlabProject> queryWrapper = QueryGenerator.initQueryWrapper(ctopAdlabProject, req.getParameterMap());
+        Page<CtopAdlabProject> page = new Page<>(pageNo, pageSize);
+        IPage<CtopAdlabProject> pageList = ctopAdlabProjectService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     */
+    @PostMapping(value = "/add")
+    public Result<CtopAdlabProject> add(@RequestBody CtopAdlabProject ctopAdlabProject) {
+        Result<CtopAdlabProject> result = new Result<>();
+        try {
+            ctopAdlabProjectService.save(ctopAdlabProject);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     */
+    @PostMapping(value = "/edit")
+    public Result<CtopAdlabProject> edit(@RequestParam JSONArray accountIds,
+                                         @RequestParam JSONArray groupIds,
+                                         @RequestParam String optStatus) {
+        Result<CtopAdlabProject> result = new Result<CtopAdlabProject>();
+
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "投放管家项目列表-通过id删除")
+    @ApiOperation(value = "投放管家项目列表-通过id删除", notes = "投放管家项目列表-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            ctopAdlabProjectService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "投放管家项目列表-批量删除")
+    @ApiOperation(value = "投放管家项目列表-批量删除", notes = "投放管家项目列表-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<CtopAdlabProject> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<CtopAdlabProject> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.ctopAdlabProjectService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "投放管家项目列表-通过id查询")
+    @ApiOperation(value = "投放管家项目列表-通过id查询", notes = "投放管家项目列表-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<CtopAdlabProject> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<CtopAdlabProject> result = new Result<>();
+        CtopAdlabProject ctopAdlabProject = ctopAdlabProjectService.getById(id);
+        if (ctopAdlabProject == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(ctopAdlabProject);
+            result.setSuccess(true);
+        }
+        return result;
+    }
 
 
 }

+ 8 - 11
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/CtopAdlabProjectDetailController.java

@@ -1,12 +1,5 @@
 package cn.com.ctop.toutiao.modules.adlab.controller;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.toutiao.modules.adlab.entity.CtopAdlabProjectDetail;
 import cn.com.ctop.toutiao.modules.adlab.service.ICtopAdlabProjectDetailService;
@@ -16,13 +9,17 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
 /**
  * 投放管家项目详情
  */
@@ -110,7 +107,7 @@ public class CtopAdlabProjectDetailController {
                 params.add(jsonObject);
                 if (repo.getInteger("code") == 0) {
                     if ("DELETED".equals(((Map<String, Object>) it).get("optStatus"))) {
-                    	ctopAdlabProjectDetailService.removeById((Long) temp.get("groupId"));
+                        ctopAdlabProjectDetailService.removeById((Long) temp.get("groupId"));
                     } else {
                         ctopAdlabProjectDetailService.putStorage(params);
                     }

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/adlab/controller/PlanAnalyzeReportController.java

@@ -19,9 +19,9 @@ public class PlanAnalyzeReportController {
 
     @Autowired
     IPlanAnalyzeReportService planAnalyzeReportService;
-    
+
     @GetMapping("/getList")
-    public Result<List<JSONObject>> getPlanAnalyze(@RequestBody JSONObject requestBody){
+    public Result<List<JSONObject>> getPlanAnalyze(@RequestBody JSONObject requestBody) {
         return null;
     }
 

+ 20 - 17
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/ByteDanceBatchController.java

@@ -50,22 +50,24 @@ public class ByteDanceBatchController {
 
     /**
      * 行动号召按钮
+     *
      * @param accountId
      * @param landType
      * @return
      */
     @GetMapping("action/text")
-    public Map<String,Object>getActionText(Long accountId,String landType){
-        return fileInfoService.getActionText(accountId,landType);
+    public Map<String, Object> getActionText(Long accountId, String landType) {
+        return fileInfoService.getActionText(accountId, landType);
     }
 
     @GetMapping("industry/list")
-    public Map<String,Object>getIndustryList(){
+    public Map<String, Object> getIndustryList() {
         return bytedanceIndustryInfoService.getIndustryList();
     }
+
     @GetMapping("load/industry")
-    public Map<String,Object>loadIndustryList(Long accountId,Integer level){
-        return bytedanceIndustryInfoService.getBytedanceIndustryList(accountId,level);
+    public Map<String, Object> loadIndustryList(Long accountId, Integer level) {
+        return bytedanceIndustryInfoService.getBytedanceIndustryList(accountId, level);
     }
 
     @GetMapping(value = "/getVideoList")
@@ -82,13 +84,13 @@ public class ByteDanceBatchController {
                 throw new Exception("账户id不能为空");
             }
             QueryWrapper<ByteDanceVideoInfo> queryWrapper = new QueryWrapper<>();
-            if (null!=startDate&&!"".equals(startDate.trim()) && null!=endDate&&!"".equals(endDate.trim())) {
-                queryWrapper.between("create_time", startDate+" 00:00:00", endDate+" 23:59:59");
+            if (null != startDate && !"".equals(startDate.trim()) && null != endDate && !"".equals(endDate.trim())) {
+                queryWrapper.between("create_time", startDate + " 00:00:00", endDate + " 23:59:59");
             }
-            if(null!=type&&type!=0){
-                queryWrapper.eq("type",type);
+            if (null != type && type != 0) {
+                queryWrapper.eq("type", type);
             }
-            queryWrapper.eq("account_id",accountId);
+            queryWrapper.eq("account_id", accountId);
             queryWrapper.orderByDesc("material_upload_time");
             queryWrapper.groupBy("signature");
             Page<ByteDanceVideoInfo> page = new Page<>(pageNo, pageSize);
@@ -102,13 +104,14 @@ public class ByteDanceBatchController {
         }
         return result;
     }
+
     @Autowired
     private IBytedanceImageInfoService imageInfoService;
 
     @GetMapping(value = "/getImageList")
     public Result<IPage<BytedanceImageInfo>> getBytedqanceVideoList(
             @RequestParam(name = "type") Integer type,
-            @RequestParam(name = "accountId")Long accountId, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+            @RequestParam(name = "accountId") Long accountId, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
             @RequestParam(name = "startDate", defaultValue = "") String startDate,
             @RequestParam(name = "endDate", defaultValue = "") String endDate, HttpServletRequest req) {
@@ -118,13 +121,13 @@ public class ByteDanceBatchController {
                 throw new Exception("账户id不能为空");
             }
             QueryWrapper<BytedanceImageInfo> queryWrapper = new QueryWrapper<>();
-            if(null!=type&&type!=0){
-                queryWrapper.eq("type",type);
+            if (null != type && type != 0) {
+                queryWrapper.eq("type", type);
             }
             if (!Check.isNull(startDate) && !Check.isNull(endDate)) {
-                queryWrapper.between("image_create_time", startDate+" 00:00:00", endDate+" 23:59:59");
+                queryWrapper.between("image_create_time", startDate + " 00:00:00", endDate + " 23:59:59");
             }
-            queryWrapper.eq("account_id",accountId);
+            queryWrapper.eq("account_id", accountId);
             queryWrapper.orderByDesc("image_create_time");
             queryWrapper.groupBy("signature");
             Page<BytedanceImageInfo> page = new Page<>(pageNo, pageSize);
@@ -140,10 +143,10 @@ public class ByteDanceBatchController {
     }
 
     /**
-     *  批量创建创意
+     * 批量创建创意
      */
     @PostMapping("/create/creative")
-    public Map<String,Object>addCreative(@RequestBody JSONObject data){
+    public Map<String, Object> addCreative(@RequestBody JSONObject data) {
         return creativeService.batchCreate(data);
     }
 }

+ 4 - 4
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceAreaInfoController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.batch.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.ResultMapUtils;
 import cn.com.ctop.common.module.utils.StatusCode;
 import cn.com.ctop.toutiao.modules.batch.entity.BytedanceAreaInfo;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -58,11 +58,11 @@ public class BytedanceAreaInfoController {
      * @return
      */
     @GetMapping(value = "/list")
-    public Map<String,Object> queryPageList(BytedanceAreaInfo bytedanceAreaInfo,HttpServletRequest req) {
-        Map<String,Object> result = new HashMap<>();
+    public Map<String, Object> queryPageList(BytedanceAreaInfo bytedanceAreaInfo, HttpServletRequest req) {
+        Map<String, Object> result = new HashMap<>();
         List<BytedanceAreaInfoVO> vos = bytedanceAreaInfoService.getListByParams(bytedanceAreaInfo);
         ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
-        result.put("data",vos);
+        result.put("data", vos);
         return result;
     }
 

+ 4 - 3
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceAudienceTemplateController.java

@@ -14,15 +14,16 @@ import java.util.Map;
 public class BytedanceAudienceTemplateController {
     @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
+
     @PostMapping("/template/create")
-    public Map<String,Object> createAudiencePackageTemplate(HttpServletRequest request, JSONObject data){
-        Map<String,Object> result = new HashMap<>();
+    public Map<String, Object> createAudiencePackageTemplate(HttpServletRequest request, JSONObject data) {
+        Map<String, Object> result = new HashMap<>();
 
         return result;
     }
 
     @GetMapping("list")
-    public Map<String,Object>getAudienceList(@RequestParam(value = "accountId",defaultValue = "")String accountId){
+    public Map<String, Object> getAudienceList(@RequestParam(value = "accountId", defaultValue = "") String accountId) {
         return advertiserDataService.advertiserCustomAudienceSelect(accountId);
     }
 }

+ 124 - 117
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceIndustryInfoController.java

@@ -1,5 +1,6 @@
 package cn.com.ctop.toutiao.modules.batch.controller;
 
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.batch.entity.BytedanceIndustryInfo;
 import cn.com.ctop.toutiao.modules.batch.service.IBytedanceIndustryInfoService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -9,142 +10,148 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 
- /**
+/**
  * 头条行业类别
+ *
  * @author jeecg-boot
- * @date   2020-07-30
  * @version V1.0
+ * @date 2020-07-30
  */
 @Slf4j
-@Api(tags="头条行业类别")
+@Api(tags = "头条行业类别")
 @RestController
 @RequestMapping("/ctop/bytedanceIndustryInfo")
 public class BytedanceIndustryInfoController {
-	@Autowired
-	private IBytedanceIndustryInfoService bytedanceIndustryInfoService;
+    @Autowired
+    private IBytedanceIndustryInfoService bytedanceIndustryInfoService;
 
-	/**
-	  * 分页列表查询
-	 * @param bytedanceIndustryInfo
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@ApiOperation(value="头条行业类别-分页列表查询", notes="头条行业类别-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<BytedanceIndustryInfo>> queryPageList(BytedanceIndustryInfo bytedanceIndustryInfo,
-															  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-															  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-															  HttpServletRequest req) {
-		Result<IPage<BytedanceIndustryInfo>> result = new Result<>();
-		QueryWrapper<BytedanceIndustryInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceIndustryInfo, req.getParameterMap());
-		Page<BytedanceIndustryInfo> page = new Page<BytedanceIndustryInfo>(pageNo, pageSize);
-		IPage<BytedanceIndustryInfo> pageList = bytedanceIndustryInfoService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
+    /**
+     * 分页列表查询
+     *
+     * @param bytedanceIndustryInfo
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @ApiOperation(value = "头条行业类别-分页列表查询", notes = "头条行业类别-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<BytedanceIndustryInfo>> queryPageList(BytedanceIndustryInfo bytedanceIndustryInfo,
+                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                              HttpServletRequest req) {
+        Result<IPage<BytedanceIndustryInfo>> result = new Result<>();
+        QueryWrapper<BytedanceIndustryInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceIndustryInfo, req.getParameterMap());
+        Page<BytedanceIndustryInfo> page = new Page<BytedanceIndustryInfo>(pageNo, pageSize);
+        IPage<BytedanceIndustryInfo> pageList = bytedanceIndustryInfoService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
 
-	/**
-	  *   添加
-	 * @param bytedanceIndustryInfo
-	 * @return
-	 */
-	@ApiOperation(value="头条行业类别-添加", notes="头条行业类别-添加")
-	@PostMapping(value = "/add")
-	public Result<BytedanceIndustryInfo> add(@RequestBody BytedanceIndustryInfo bytedanceIndustryInfo) {
-		Result<BytedanceIndustryInfo> result = new Result<>();
-		try {
-			bytedanceIndustryInfoService.save(bytedanceIndustryInfo);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
+    /**
+     * 添加
+     *
+     * @param bytedanceIndustryInfo
+     * @return
+     */
+    @ApiOperation(value = "头条行业类别-添加", notes = "头条行业类别-添加")
+    @PostMapping(value = "/add")
+    public Result<BytedanceIndustryInfo> add(@RequestBody BytedanceIndustryInfo bytedanceIndustryInfo) {
+        Result<BytedanceIndustryInfo> result = new Result<>();
+        try {
+            bytedanceIndustryInfoService.save(bytedanceIndustryInfo);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
 
-	/**
-	  *  编辑
-	 * @param bytedanceIndustryInfo
-	 * @return
-	 */
-	@ApiOperation(value="头条行业类别-编辑", notes="头条行业类别-编辑")
-	@PutMapping(value = "/edit")
-	public Result<BytedanceIndustryInfo> edit(@RequestBody BytedanceIndustryInfo bytedanceIndustryInfo) {
-		Result<BytedanceIndustryInfo> result = new Result<BytedanceIndustryInfo>();
-		BytedanceIndustryInfo bytedanceIndustryInfoEntity = bytedanceIndustryInfoService.getById(bytedanceIndustryInfo.getId());
-		if(bytedanceIndustryInfoEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = bytedanceIndustryInfoService.updateById(bytedanceIndustryInfo);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
+    /**
+     * 编辑
+     *
+     * @param bytedanceIndustryInfo
+     * @return
+     */
+    @ApiOperation(value = "头条行业类别-编辑", notes = "头条行业类别-编辑")
+    @PutMapping(value = "/edit")
+    public Result<BytedanceIndustryInfo> edit(@RequestBody BytedanceIndustryInfo bytedanceIndustryInfo) {
+        Result<BytedanceIndustryInfo> result = new Result<BytedanceIndustryInfo>();
+        BytedanceIndustryInfo bytedanceIndustryInfoEntity = bytedanceIndustryInfoService.getById(bytedanceIndustryInfo.getId());
+        if (bytedanceIndustryInfoEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = bytedanceIndustryInfoService.updateById(bytedanceIndustryInfo);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
 
-		return result;
-	}
+        return result;
+    }
 
-	/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="头条行业类别-通过id删除", notes="头条行业类别-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			bytedanceIndustryInfoService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "头条行业类别-通过id删除", notes = "头条行业类别-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            bytedanceIndustryInfoService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
 
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@ApiOperation(value="头条行业类别-批量删除", notes="头条行业类别-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<BytedanceIndustryInfo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<BytedanceIndustryInfo> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.bytedanceIndustryInfoService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @ApiOperation(value = "头条行业类别-批量删除", notes = "头条行业类别-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<BytedanceIndustryInfo> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<BytedanceIndustryInfo> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.bytedanceIndustryInfoService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
 
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value="头条行业类别-通过id查询", notes="头条行业类别-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<BytedanceIndustryInfo> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<BytedanceIndustryInfo> result = new Result<>();
-		BytedanceIndustryInfo bytedanceIndustryInfo = bytedanceIndustryInfoService.getById(id);
-		if(bytedanceIndustryInfo==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(bytedanceIndustryInfo);
-			result.setSuccess(true);
-		}
-		return result;
-	}
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "头条行业类别-通过id查询", notes = "头条行业类别-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<BytedanceIndustryInfo> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<BytedanceIndustryInfo> result = new Result<>();
+        BytedanceIndustryInfo bytedanceIndustryInfo = bytedanceIndustryInfoService.getById(id);
+        if (bytedanceIndustryInfo == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(bytedanceIndustryInfo);
+            result.setSuccess(true);
+        }
+        return result;
+    }
 }

+ 1 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/batch/controller/BytedanceInterestCategoryController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.batch.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.batch.entity.BytedanceInterestCategory;
 import cn.com.ctop.toutiao.modules.batch.service.IBytedanceInterestCategoryService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -9,7 +10,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 13 - 13
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceAdvertisePlanController.java

@@ -2,6 +2,7 @@ package cn.com.ctop.toutiao.modules.material.controller;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAdvertisePlan;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertisePlanService;
@@ -11,7 +12,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -41,9 +41,9 @@ public class ByteDanceAdvertisePlanController {
      */
     @GetMapping(value = "/list")
     public Result<IPage<ByteDanceAdvertisePlan>> queryPageList(ByteDanceAdvertisePlan byteDanceAdvertisePlan,
-                                                               @RequestParam(name="status",defaultValue = "")String status,
-                                                               @RequestParam(name="startDate",defaultValue = "")String startDate,
-                                                               @RequestParam(name="endDate",defaultValue = "")String endDate,
+                                                               @RequestParam(name = "status", defaultValue = "") String status,
+                                                               @RequestParam(name = "startDate", defaultValue = "") String startDate,
+                                                               @RequestParam(name = "endDate", defaultValue = "") String endDate,
                                                                @RequestParam(name = "accountId", defaultValue = "") String accountId,
                                                                @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                                @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@@ -53,16 +53,16 @@ public class ByteDanceAdvertisePlanController {
             byteDanceAdvertisePlan.setAccountId(accountId);
         }
         QueryWrapper<ByteDanceAdvertisePlan> queryWrapper = QueryGenerator.initQueryWrapper(byteDanceAdvertisePlan, req.getParameterMap());
-        if(status!=null&&!"".equals(status.trim())){
-            queryWrapper.eq("opt_status","AD_STATUS_"+status);
+        if (status != null && !"".equals(status.trim())) {
+            queryWrapper.eq("opt_status", "AD_STATUS_" + status);
         }
-        if(null!=startDate&&!"".equals(startDate)){
-            queryWrapper.ge("ad_create_time",startDate+" 00:00:00");
+        if (null != startDate && !"".equals(startDate)) {
+            queryWrapper.ge("ad_create_time", startDate + " 00:00:00");
         }
-        if(null!=endDate&&!"".equals(endDate)){
-            queryWrapper.le("ad_create_time",endDate+" 11:59:59");
+        if (null != endDate && !"".equals(endDate)) {
+            queryWrapper.le("ad_create_time", endDate + " 11:59:59");
         }
-        queryWrapper.ne("opt_status","AD_STATUS_DELETE");
+        queryWrapper.ne("opt_status", "AD_STATUS_DELETE");
         Page<ByteDanceAdvertisePlan> page = new Page<>(pageNo, pageSize);
         IPage<ByteDanceAdvertisePlan> pageList = byteDanceAdvertisePlanService.page(page, queryWrapper);
         //处理计划投放状态
@@ -120,9 +120,9 @@ public class ByteDanceAdvertisePlanController {
         Result<ByteDanceAdvertisePlan> result = new Result<>();
         String landingType = byteDanceAdvertisePlan.getLandingType();
         Map<String, Object> map = byteDanceAdvertisePlanService.updateAdvertiserPlan(ctopOauthTokenService.getTokenByAccountId(Long.valueOf(byteDanceAdvertisePlan.getAccountId())), landingType, byteDanceAdvertisePlan);
-        if(!map.get("code").equals(0)){
+        if (!map.get("code").equals(0)) {
             result.error500(map.get("message").toString());
-        }else {
+        } else {
             boolean ok = byteDanceAdvertisePlanService.updateById(byteDanceAdvertisePlan);
             if (ok) {
                 result.success("修改成功!");

+ 1 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceAdvertiserController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.material.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAdvertiser;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;

+ 109 - 111
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceAudiencePackageController.java

@@ -1,8 +1,6 @@
 package cn.com.ctop.toutiao.modules.material.controller;
 
-import java.util.Arrays;
-import javax.servlet.http.HttpServletRequest;
-
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.material.entity.ByteDanceAudiencePackage;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAudiencePackageService;
 import cn.com.ctop.toutiao.modules.tool.util.JsonObjectToJsonStringUtil;
@@ -10,15 +8,15 @@ import cn.com.ctop.toutiao.modules.tool.util.JsonStringToJsonObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-
 import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
- /**
+import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
+
+/**
  * 头条定向包
  */
 @Slf4j
@@ -26,115 +24,115 @@ import org.springframework.web.bind.annotation.*;
 @RequestMapping("/ctop/audiencePackage")
 public class ByteDanceAudiencePackageController {
 
-	@Autowired
-	private IByteDanceAudiencePackageService audiencePackageService;
+    @Autowired
+    private IByteDanceAudiencePackageService audiencePackageService;
 
-	/**
-	 * 分页列表查询
-	 */
-	@GetMapping(value = "/list")
-	public Result<IPage<ByteDanceAudiencePackage>> queryPageList(ByteDanceAudiencePackage byteDanceAudiencePackage,
-																 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-																 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-																 HttpServletRequest req) {
-		Result<IPage<ByteDanceAudiencePackage>> result = new Result<>();
-		QueryWrapper<ByteDanceAudiencePackage> queryWrapper = QueryGenerator.initQueryWrapper(byteDanceAudiencePackage, req.getParameterMap());
-		Page<ByteDanceAudiencePackage> page = new Page<>(pageNo, pageSize);
-		IPage<ByteDanceAudiencePackage> pageList = audiencePackageService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
+    /**
+     * 分页列表查询
+     */
+    @GetMapping(value = "/list")
+    public Result<IPage<ByteDanceAudiencePackage>> queryPageList(ByteDanceAudiencePackage byteDanceAudiencePackage,
+                                                                 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                 HttpServletRequest req) {
+        Result<IPage<ByteDanceAudiencePackage>> result = new Result<>();
+        QueryWrapper<ByteDanceAudiencePackage> queryWrapper = QueryGenerator.initQueryWrapper(byteDanceAudiencePackage, req.getParameterMap());
+        Page<ByteDanceAudiencePackage> page = new Page<>(pageNo, pageSize);
+        IPage<ByteDanceAudiencePackage> pageList = audiencePackageService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
 
-	 /**
-	  * 通过id查询
-	  */
-	 @GetMapping(value = "/queryById")
-	 public Result<ByteDanceAudiencePackage> queryById(@RequestParam(name="id",required=true) Long id) {
-		 Result<ByteDanceAudiencePackage> result = new Result<>();
-		 ByteDanceAudiencePackage byteDanceAudiencePackage = JsonStringToJsonObject.toAudiencePackage(audiencePackageService.getById(id));
-		 result.setResult(byteDanceAudiencePackage);
-		 result.setSuccess(true);
-		 return result;
-	 }
+    /**
+     * 通过id查询
+     */
+    @GetMapping(value = "/queryById")
+    public Result<ByteDanceAudiencePackage> queryById(@RequestParam(name = "id", required = true) Long id) {
+        Result<ByteDanceAudiencePackage> result = new Result<>();
+        ByteDanceAudiencePackage byteDanceAudiencePackage = JsonStringToJsonObject.toAudiencePackage(audiencePackageService.getById(id));
+        result.setResult(byteDanceAudiencePackage);
+        result.setSuccess(true);
+        return result;
+    }
 
-	 /**
-	  * 通过user_id查询
-	  */
-	 @GetMapping(value = "/queryByUserId")
-	 public Result<IPage<ByteDanceAudiencePackage>> queryByUserId(@RequestParam(name="userId",required=true) String userId,
-																 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-																 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
-		 Result<IPage<ByteDanceAudiencePackage>> result = new Result<>();
-		 QueryWrapper<ByteDanceAudiencePackage> wrapper= new QueryWrapper<>();
-		 wrapper.eq("user_id",userId);
-		 Page<ByteDanceAudiencePackage> page = new Page<>(pageNo, pageSize);
-		 IPage<ByteDanceAudiencePackage> byteDanceAudiencePackagePage = audiencePackageService.page(page,wrapper);
-		 result.setResult(byteDanceAudiencePackagePage);
-		 result.setSuccess(true);
-		 return result;
-	 }
+    /**
+     * 通过user_id查询
+     */
+    @GetMapping(value = "/queryByUserId")
+    public Result<IPage<ByteDanceAudiencePackage>> queryByUserId(@RequestParam(name = "userId", required = true) String userId,
+                                                                 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
+        Result<IPage<ByteDanceAudiencePackage>> result = new Result<>();
+        QueryWrapper<ByteDanceAudiencePackage> wrapper = new QueryWrapper<>();
+        wrapper.eq("user_id", userId);
+        Page<ByteDanceAudiencePackage> page = new Page<>(pageNo, pageSize);
+        IPage<ByteDanceAudiencePackage> byteDanceAudiencePackagePage = audiencePackageService.page(page, wrapper);
+        result.setResult(byteDanceAudiencePackagePage);
+        result.setSuccess(true);
+        return result;
+    }
 
-	/**
-	 *  添加
-	 */
-	@PostMapping(value = "/add")
-	public Result<ByteDanceAudiencePackage> add(@RequestBody ByteDanceAudiencePackage byteDanceAudiencePackage) {
-		Result<ByteDanceAudiencePackage> result = new Result<>();
-		try {
-			audiencePackageService.save(JsonObjectToJsonStringUtil.toAudiencePackage(byteDanceAudiencePackage));
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
+    /**
+     * 添加
+     */
+    @PostMapping(value = "/add")
+    public Result<ByteDanceAudiencePackage> add(@RequestBody ByteDanceAudiencePackage byteDanceAudiencePackage) {
+        Result<ByteDanceAudiencePackage> result = new Result<>();
+        try {
+            audiencePackageService.save(JsonObjectToJsonStringUtil.toAudiencePackage(byteDanceAudiencePackage));
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
 
-	/**
-	 *  编辑
-	 */
-	@PostMapping(value = "/edit")
-	public Result<ByteDanceAudiencePackage> edit(@RequestBody ByteDanceAudiencePackage byteDanceAudiencePackage) {
-		Result<ByteDanceAudiencePackage> result = new Result<>();
-		ByteDanceAudiencePackage byteDanceAudiencePackageEntity = audiencePackageService.getById(byteDanceAudiencePackage.getId());
-		if(byteDanceAudiencePackageEntity ==null) {
-			result.error500("未找到数据");
-		}else {
-			boolean ok = audiencePackageService.updateById(JsonObjectToJsonStringUtil.toAudiencePackage(byteDanceAudiencePackage));
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
-		return result;
-	}
+    /**
+     * 编辑
+     */
+    @PostMapping(value = "/edit")
+    public Result<ByteDanceAudiencePackage> edit(@RequestBody ByteDanceAudiencePackage byteDanceAudiencePackage) {
+        Result<ByteDanceAudiencePackage> result = new Result<>();
+        ByteDanceAudiencePackage byteDanceAudiencePackageEntity = audiencePackageService.getById(byteDanceAudiencePackage.getId());
+        if (byteDanceAudiencePackageEntity == null) {
+            result.error500("未找到数据");
+        } else {
+            boolean ok = audiencePackageService.updateById(JsonObjectToJsonStringUtil.toAudiencePackage(byteDanceAudiencePackage));
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+        return result;
+    }
 
-	/**
-	 *  通过id删除
-	 */
-	@PostMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) Long id) {
-		try {
-			audiencePackageService.removeById(id);
-		} catch (Exception e) {
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
+    /**
+     * 通过id删除
+     */
+    @PostMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) Long id) {
+        try {
+            audiencePackageService.removeById(id);
+        } catch (Exception e) {
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
 
-	/**
-	 *  批量删除
-	 */
-	@PostMapping(value = "/deleteBatch")
-	public Result<ByteDanceAudiencePackage> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<ByteDanceAudiencePackage> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.audiencePackageService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
+    /**
+     * 批量删除
+     */
+    @PostMapping(value = "/deleteBatch")
+    public Result<ByteDanceAudiencePackage> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<ByteDanceAudiencePackage> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.audiencePackageService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
 
 }

+ 36 - 31
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCampaignController.java

@@ -40,6 +40,7 @@ public class ByteDanceCampaignController {
 
     /**
      * 分页列表查询
+     *
      * @param pageNo
      * @param pageSize
      * @param req
@@ -49,38 +50,38 @@ public class ByteDanceCampaignController {
     @ApiOperation(value = "今日头条广告组信息-分页列表查询", notes = "今日头条广告组信息-分页列表查询")
     @GetMapping(value = "/list")
     public Result<IPage<ByteDanceCampaign>> queryPageList(
-            @RequestParam(name = "name",defaultValue = "")String name,
-            @RequestParam(name = "accountId",defaultValue = "0")String accountId,
-            @RequestParam(name = "status",defaultValue = "")String status,
+            @RequestParam(name = "name", defaultValue = "") String name,
+            @RequestParam(name = "accountId", defaultValue = "0") String accountId,
+            @RequestParam(name = "status", defaultValue = "") String status,
             @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
             @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-            @RequestParam(name="startDate",defaultValue = "")String startDate,
-            @RequestParam(name="endDate",defaultValue = "")String endDate,
+            @RequestParam(name = "startDate", defaultValue = "") String startDate,
+            @RequestParam(name = "endDate", defaultValue = "") String endDate,
             HttpServletRequest req) {
         Result<IPage<ByteDanceCampaign>> result = new Result<>();
         QueryWrapper<ByteDanceCampaign> queryWrapper = new QueryWrapper<>();
-        if(null!=name&&!"".equalsIgnoreCase(name)){
-            queryWrapper.like("name",name);
+        if (null != name && !"".equalsIgnoreCase(name)) {
+            queryWrapper.like("name", name);
         }
-        if(null!=status&&!"".equals(status.trim())){
-            queryWrapper.eq("status","CAMPAIGN_STATUS_"+status);
+        if (null != status && !"".equals(status.trim())) {
+            queryWrapper.eq("status", "CAMPAIGN_STATUS_" + status);
         }
-        if(null!=startDate&&!"".equals(startDate)){
-            queryWrapper.ge("campaign_create_time",startDate+" 00:00:00");
+        if (null != startDate && !"".equals(startDate)) {
+            queryWrapper.ge("campaign_create_time", startDate + " 00:00:00");
         }
-        if(null!=endDate&&!"".equals(endDate)){
-            queryWrapper.le("campaign_create_time",endDate+" 11:59:59");
+        if (null != endDate && !"".equals(endDate)) {
+            queryWrapper.le("campaign_create_time", endDate + " 11:59:59");
         }
-        if(null!=accountId&&!"".equals(accountId.trim())){
-            queryWrapper.eq("account_id",accountId);
+        if (null != accountId && !"".equals(accountId.trim())) {
+            queryWrapper.eq("account_id", accountId);
         }
-        queryWrapper.ne("status","CAMPAIGN_STATUS_DELETE");
+        queryWrapper.ne("status", "CAMPAIGN_STATUS_DELETE");
         queryWrapper.orderByDesc("campaign_create_time");
         Page<ByteDanceCampaign> page = new Page<>(pageNo, pageSize);
         IPage<ByteDanceCampaign> pageList = byteDanceCampaignService.page(page, queryWrapper);
         List<ByteDanceCampaign> records = pageList.getRecords();
-        if(null!=records&&!records.isEmpty()){
-            List<ByteDanceCampaign> campaigns = records.stream().map(campaign-> campaign.setCampaignStatus("CAMPAIGN_STATUS_ENABLE".equalsIgnoreCase(campaign.getStatus()))).collect(Collectors.toList());
+        if (null != records && !records.isEmpty()) {
+            List<ByteDanceCampaign> campaigns = records.stream().map(campaign -> campaign.setCampaignStatus("CAMPAIGN_STATUS_ENABLE".equalsIgnoreCase(campaign.getStatus()))).collect(Collectors.toList());
             pageList.setRecords(campaigns);
         }
         result.setSuccess(true);
@@ -90,45 +91,49 @@ public class ByteDanceCampaignController {
 
     /**
      * 添加
+     *
      * @return
      */
     @AutoLog(value = "今日头条广告组信息-添加")
     @ApiOperation(value = "今日头条广告组信息-添加", notes = "今日头条广告组信息-添加")
     @PostMapping(value = "/add")
-    public Map<String,Object> add(@RequestParam(name = "accountId") Long accountId,
-                                  @RequestParam(name = "campaignName") String campaignName,
-                                  @RequestParam(name = "budgetMode") String budgetMode,
-                                  @RequestParam(name = "budget",required = false) String budget,
-                                  @RequestParam(name = "landingType") String landingType) {
-        return byteDanceCampaignService.createCampaign(accountId,campaignName,null,budgetMode,budget,landingType,null);
+    public Map<String, Object> add(@RequestParam(name = "accountId") Long accountId,
+                                   @RequestParam(name = "campaignName") String campaignName,
+                                   @RequestParam(name = "budgetMode") String budgetMode,
+                                   @RequestParam(name = "budget", required = false) String budget,
+                                   @RequestParam(name = "landingType") String landingType) {
+        return byteDanceCampaignService.createCampaign(accountId, campaignName, null, budgetMode, budget, landingType, null);
     }
 
     /**
      * 编辑
+     *
      * @return
      */
     @AutoLog(value = "今日头条广告组信息-编辑")
     @ApiOperation(value = "今日头条广告组信息-编辑", notes = "今日头条广告组信息-编辑")
     @PostMapping(value = "/edit")
-    public Map<String,Object> edit(@RequestBody BytedanceCampaignEditVo editVo) {
+    public Map<String, Object> edit(@RequestBody BytedanceCampaignEditVo editVo) {
         return byteDanceCampaignService.updateCampaign(editVo);
     }
 
     /**
      * 修改广告组状态
+     *
      * @return
      */
     @PostMapping("/editStatus")
-    public Map<String,Object> editStatus(@RequestParam(name = "accountId",defaultValue = "0")Long accountId,
-                                         @RequestParam(name = "ids") String ids,
-                                         @RequestParam(name = "status")String status){
-        Map<String,Object>result = new HashMap();
-        if(null == accountId||accountId==0||null == ids|| "".equals(ids.trim())||null==status|| "".equals(status.trim())){
+    public Map<String, Object> editStatus(@RequestParam(name = "accountId", defaultValue = "0") Long accountId,
+                                          @RequestParam(name = "ids") String ids,
+                                          @RequestParam(name = "status") String status) {
+        Map<String, Object> result = new HashMap();
+        if (null == accountId || accountId == 0 || null == ids || "".equals(ids.trim()) || null == status || "".equals(status.trim())) {
             ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
             return result;
         }
-        return byteDanceCampaignService.updateCampaignStatus(accountId,ids,status);
+        return byteDanceCampaignService.updateCampaignStatus(accountId, ids, status);
     }
+
     /**
      * 通过id删除
      *

+ 2 - 9
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCreativeController.java

@@ -17,14 +17,7 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
 import java.util.HashMap;
@@ -47,6 +40,7 @@ public class ByteDanceCreativeController {
     private IByteDanceCreativeService byteDanceCreativeService;
     @Autowired
     ICtopOauthTokenService tokenService;
+
     /**
      * 分页列表查询
      *
@@ -177,7 +171,6 @@ public class ByteDanceCreativeController {
     }
 
 
-
     /**
      * 通过id删除
      *

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceCreativeMaterialController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.material.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.material.entity.ByteDanceCreativeMaterial;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeMaterialService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -96,7 +96,7 @@ public class ByteDanceCreativeMaterialController {
             boolean ok = byteDanceCreativeMaterialService.updateById(byteDanceCreativeMaterial);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceVideoInfoController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.material.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.material.entity.ByteDanceVideoInfo;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceVideoInfoService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -95,7 +95,7 @@ public class ByteDanceVideoInfoController {
             boolean ok = byteDanceVideoInfoService.updateById(byteDanceVideoInfo);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }

+ 131 - 124
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/BytedanceEffectVideoInfoController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.material.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.material.entity.BytedanceEffectVideoInfo;
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceEffectVideoInfoService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -10,149 +11,155 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
 
- /**
+/**
  * 有效视频信息
+ *
  * @author jeecg-boot
- * @date   2020-07-14
  * @version V1.0
+ * @date 2020-07-14
  */
 @Slf4j
-@Api(tags="有效视频信息")
+@Api(tags = "有效视频信息")
 @RestController
 @RequestMapping("/ctop/bytedanceEffectVideoInfo")
 public class BytedanceEffectVideoInfoController {
-	@Autowired
-	private IBytedanceEffectVideoInfoService bytedanceEffectVideoInfoService;
+    @Autowired
+    private IBytedanceEffectVideoInfoService bytedanceEffectVideoInfoService;
 
-	/**
-	  * 分页列表查询
-	 * @param bytedanceEffectVideoInfo
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@AutoLog(value = "有效视频信息-分页列表查询")
-	@ApiOperation(value="有效视频信息-分页列表查询", notes="有效视频信息-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<BytedanceEffectVideoInfo>> queryPageList(BytedanceEffectVideoInfo bytedanceEffectVideoInfo,
-																 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-																 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-																 HttpServletRequest req) {
-		Result<IPage<BytedanceEffectVideoInfo>> result = new Result<>();
-		QueryWrapper<BytedanceEffectVideoInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceEffectVideoInfo, req.getParameterMap());
-		queryWrapper.orderByDesc("initial_cost_date");
-		Page<BytedanceEffectVideoInfo> page = new Page<>(pageNo, pageSize);
-		IPage<BytedanceEffectVideoInfo> pageList = bytedanceEffectVideoInfoService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
+    /**
+     * 分页列表查询
+     *
+     * @param bytedanceEffectVideoInfo
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "有效视频信息-分页列表查询")
+    @ApiOperation(value = "有效视频信息-分页列表查询", notes = "有效视频信息-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<BytedanceEffectVideoInfo>> queryPageList(BytedanceEffectVideoInfo bytedanceEffectVideoInfo,
+                                                                 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                 HttpServletRequest req) {
+        Result<IPage<BytedanceEffectVideoInfo>> result = new Result<>();
+        QueryWrapper<BytedanceEffectVideoInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceEffectVideoInfo, req.getParameterMap());
+        queryWrapper.orderByDesc("initial_cost_date");
+        Page<BytedanceEffectVideoInfo> page = new Page<>(pageNo, pageSize);
+        IPage<BytedanceEffectVideoInfo> pageList = bytedanceEffectVideoInfoService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
 
-	/**
-	  *   添加
-	 * @param bytedanceEffectVideoInfo
-	 * @return
-	 */
-	@AutoLog(value = "有效视频信息-添加")
-	@ApiOperation(value="有效视频信息-添加", notes="有效视频信息-添加")
-	@PostMapping(value = "/add")
-	public Result<BytedanceEffectVideoInfo> add(@RequestBody BytedanceEffectVideoInfo bytedanceEffectVideoInfo) {
-		Result<BytedanceEffectVideoInfo> result = new Result<>();
-		try {
-			bytedanceEffectVideoInfoService.save(bytedanceEffectVideoInfo);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
+    /**
+     * 添加
+     *
+     * @param bytedanceEffectVideoInfo
+     * @return
+     */
+    @AutoLog(value = "有效视频信息-添加")
+    @ApiOperation(value = "有效视频信息-添加", notes = "有效视频信息-添加")
+    @PostMapping(value = "/add")
+    public Result<BytedanceEffectVideoInfo> add(@RequestBody BytedanceEffectVideoInfo bytedanceEffectVideoInfo) {
+        Result<BytedanceEffectVideoInfo> result = new Result<>();
+        try {
+            bytedanceEffectVideoInfoService.save(bytedanceEffectVideoInfo);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
 
-	/**
-	  *  编辑
-	 * @param bytedanceEffectVideoInfo
-	 * @return
-	 */
-	@AutoLog(value = "有效视频信息-编辑")
-	@ApiOperation(value="有效视频信息-编辑", notes="有效视频信息-编辑")
-	@PutMapping(value = "/edit")
-	public Result<BytedanceEffectVideoInfo> edit(@RequestBody BytedanceEffectVideoInfo bytedanceEffectVideoInfo) {
-		Result<BytedanceEffectVideoInfo> result = new Result<BytedanceEffectVideoInfo>();
-		BytedanceEffectVideoInfo bytedanceEffectVideoInfoEntity = bytedanceEffectVideoInfoService.getById(bytedanceEffectVideoInfo.getId());
-		if(bytedanceEffectVideoInfoEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = bytedanceEffectVideoInfoService.updateById(bytedanceEffectVideoInfo);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
+    /**
+     * 编辑
+     *
+     * @param bytedanceEffectVideoInfo
+     * @return
+     */
+    @AutoLog(value = "有效视频信息-编辑")
+    @ApiOperation(value = "有效视频信息-编辑", notes = "有效视频信息-编辑")
+    @PutMapping(value = "/edit")
+    public Result<BytedanceEffectVideoInfo> edit(@RequestBody BytedanceEffectVideoInfo bytedanceEffectVideoInfo) {
+        Result<BytedanceEffectVideoInfo> result = new Result<BytedanceEffectVideoInfo>();
+        BytedanceEffectVideoInfo bytedanceEffectVideoInfoEntity = bytedanceEffectVideoInfoService.getById(bytedanceEffectVideoInfo.getId());
+        if (bytedanceEffectVideoInfoEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = bytedanceEffectVideoInfoService.updateById(bytedanceEffectVideoInfo);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
 
-		return result;
-	}
+        return result;
+    }
 
-	/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "有效视频信息-通过id删除")
-	@ApiOperation(value="有效视频信息-通过id删除", notes="有效视频信息-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			bytedanceEffectVideoInfoService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "有效视频信息-通过id删除")
+    @ApiOperation(value = "有效视频信息-通过id删除", notes = "有效视频信息-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            bytedanceEffectVideoInfoService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
 
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "有效视频信息-批量删除")
-	@ApiOperation(value="有效视频信息-批量删除", notes="有效视频信息-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<BytedanceEffectVideoInfo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<BytedanceEffectVideoInfo> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.bytedanceEffectVideoInfoService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "有效视频信息-批量删除")
+    @ApiOperation(value = "有效视频信息-批量删除", notes = "有效视频信息-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<BytedanceEffectVideoInfo> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<BytedanceEffectVideoInfo> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.bytedanceEffectVideoInfoService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
 
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "有效视频信息-通过id查询")
-	@ApiOperation(value="有效视频信息-通过id查询", notes="有效视频信息-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<BytedanceEffectVideoInfo> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<BytedanceEffectVideoInfo> result = new Result<>();
-		BytedanceEffectVideoInfo bytedanceEffectVideoInfo = bytedanceEffectVideoInfoService.getById(id);
-		if(bytedanceEffectVideoInfo==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(bytedanceEffectVideoInfo);
-			result.setSuccess(true);
-		}
-		return result;
-	}
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "有效视频信息-通过id查询")
+    @ApiOperation(value = "有效视频信息-通过id查询", notes = "有效视频信息-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<BytedanceEffectVideoInfo> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<BytedanceEffectVideoInfo> result = new Result<>();
+        BytedanceEffectVideoInfo bytedanceEffectVideoInfo = bytedanceEffectVideoInfoService.getById(id);
+        if (bytedanceEffectVideoInfo == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(bytedanceEffectVideoInfo);
+            result.setSuccess(true);
+        }
+        return result;
+    }
 }

+ 194 - 187
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/BytedanceImageInfoController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.material.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.material.entity.BytedanceImageInfo;
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceImageInfoService;
 import com.alibaba.fastjson.JSON;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecgframework.poi.excel.ExcelImportUtil;
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@@ -33,209 +33,216 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
- /**
+/**
  * 头条图片素材
+ *
  * @author jeecg-boot
- * @date   2020-08-01
  * @version V1.0
+ * @date 2020-08-01
  */
 @Slf4j
-@Api(tags="头条图片素材")
+@Api(tags = "头条图片素材")
 @RestController
 @RequestMapping("/ctop/bytedanceImageInfo")
 public class BytedanceImageInfoController {
-	@Autowired
-	private IBytedanceImageInfoService bytedanceImageInfoService;
+    @Autowired
+    private IBytedanceImageInfoService bytedanceImageInfoService;
 
-	/**
-	  * 分页列表查询
-	 * @param bytedanceImageInfo
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@AutoLog(value = "头条图片素材-分页列表查询")
-	@ApiOperation(value="头条图片素材-分页列表查询", notes="头条图片素材-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<BytedanceImageInfo>> queryPageList(BytedanceImageInfo bytedanceImageInfo,
-														   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-														   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-														   HttpServletRequest req) {
-		Result<IPage<BytedanceImageInfo>> result = new Result<>();
-		QueryWrapper<BytedanceImageInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceImageInfo, req.getParameterMap());
-		Page<BytedanceImageInfo> page = new Page<BytedanceImageInfo>(pageNo, pageSize);
-		IPage<BytedanceImageInfo> pageList = bytedanceImageInfoService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
+    /**
+     * 分页列表查询
+     *
+     * @param bytedanceImageInfo
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "头条图片素材-分页列表查询")
+    @ApiOperation(value = "头条图片素材-分页列表查询", notes = "头条图片素材-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<BytedanceImageInfo>> queryPageList(BytedanceImageInfo bytedanceImageInfo,
+                                                           @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                           @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                           HttpServletRequest req) {
+        Result<IPage<BytedanceImageInfo>> result = new Result<>();
+        QueryWrapper<BytedanceImageInfo> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceImageInfo, req.getParameterMap());
+        Page<BytedanceImageInfo> page = new Page<BytedanceImageInfo>(pageNo, pageSize);
+        IPage<BytedanceImageInfo> pageList = bytedanceImageInfoService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
 
-	/**
-	  *   添加
-	 * @param bytedanceImageInfo
-	 * @return
-	 */
-	@AutoLog(value = "头条图片素材-添加")
-	@ApiOperation(value="头条图片素材-添加", notes="头条图片素材-添加")
-	@PostMapping(value = "/add")
-	public Result<BytedanceImageInfo> add(@RequestBody BytedanceImageInfo bytedanceImageInfo) {
-		Result<BytedanceImageInfo> result = new Result<>();
-		try {
-			bytedanceImageInfoService.save(bytedanceImageInfo);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
+    /**
+     * 添加
+     *
+     * @param bytedanceImageInfo
+     * @return
+     */
+    @AutoLog(value = "头条图片素材-添加")
+    @ApiOperation(value = "头条图片素材-添加", notes = "头条图片素材-添加")
+    @PostMapping(value = "/add")
+    public Result<BytedanceImageInfo> add(@RequestBody BytedanceImageInfo bytedanceImageInfo) {
+        Result<BytedanceImageInfo> result = new Result<>();
+        try {
+            bytedanceImageInfoService.save(bytedanceImageInfo);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
 
-	/**
-	  *  编辑
-	 * @param bytedanceImageInfo
-	 * @return
-	 */
-	@AutoLog(value = "头条图片素材-编辑")
-	@ApiOperation(value="头条图片素材-编辑", notes="头条图片素材-编辑")
-	@PutMapping(value = "/edit")
-	public Result<BytedanceImageInfo> edit(@RequestBody BytedanceImageInfo bytedanceImageInfo) {
-		Result<BytedanceImageInfo> result = new Result<BytedanceImageInfo>();
-		BytedanceImageInfo bytedanceImageInfoEntity = bytedanceImageInfoService.getById(bytedanceImageInfo.getId());
-		if(bytedanceImageInfoEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = bytedanceImageInfoService.updateById(bytedanceImageInfo);
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
+    /**
+     * 编辑
+     *
+     * @param bytedanceImageInfo
+     * @return
+     */
+    @AutoLog(value = "头条图片素材-编辑")
+    @ApiOperation(value = "头条图片素材-编辑", notes = "头条图片素材-编辑")
+    @PutMapping(value = "/edit")
+    public Result<BytedanceImageInfo> edit(@RequestBody BytedanceImageInfo bytedanceImageInfo) {
+        Result<BytedanceImageInfo> result = new Result<BytedanceImageInfo>();
+        BytedanceImageInfo bytedanceImageInfoEntity = bytedanceImageInfoService.getById(bytedanceImageInfo.getId());
+        if (bytedanceImageInfoEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = bytedanceImageInfoService.updateById(bytedanceImageInfo);
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
 
-		return result;
-	}
+        return result;
+    }
 
-	/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "头条图片素材-通过id删除")
-	@ApiOperation(value="头条图片素材-通过id删除", notes="头条图片素材-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			bytedanceImageInfoService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "头条图片素材-通过id删除")
+    @ApiOperation(value = "头条图片素材-通过id删除", notes = "头条图片素材-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            bytedanceImageInfoService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
 
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "头条图片素材-批量删除")
-	@ApiOperation(value="头条图片素材-批量删除", notes="头条图片素材-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<BytedanceImageInfo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<BytedanceImageInfo> result = new Result<>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.bytedanceImageInfoService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "头条图片素材-批量删除")
+    @ApiOperation(value = "头条图片素材-批量删除", notes = "头条图片素材-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<BytedanceImageInfo> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<BytedanceImageInfo> result = new Result<>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.bytedanceImageInfoService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
 
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "头条图片素材-通过id查询")
-	@ApiOperation(value="头条图片素材-通过id查询", notes="头条图片素材-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<BytedanceImageInfo> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<BytedanceImageInfo> result = new Result<>();
-		BytedanceImageInfo bytedanceImageInfo = bytedanceImageInfoService.getById(id);
-		if(bytedanceImageInfo==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(bytedanceImageInfo);
-			result.setSuccess(true);
-		}
-		return result;
-	}
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "头条图片素材-通过id查询")
+    @ApiOperation(value = "头条图片素材-通过id查询", notes = "头条图片素材-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<BytedanceImageInfo> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<BytedanceImageInfo> result = new Result<>();
+        BytedanceImageInfo bytedanceImageInfo = bytedanceImageInfoService.getById(id);
+        if (bytedanceImageInfo == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(bytedanceImageInfo);
+            result.setSuccess(true);
+        }
+        return result;
+    }
 
-  /**
-      * 导出excel
-   *
-   * @param request
-   * @param response
-   */
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
-      // Step.1 组装查询条件
-      QueryWrapper<BytedanceImageInfo> queryWrapper = null;
-      try {
-          String paramsStr = request.getParameter("paramsStr");
-          if (oConvertUtils.isNotEmpty(paramsStr)) {
-              String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              BytedanceImageInfo bytedanceImageInfo = JSON.parseObject(deString, BytedanceImageInfo.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(bytedanceImageInfo, request.getParameterMap());
-          }
-      } catch (UnsupportedEncodingException e) {
-          e.printStackTrace();
-      }
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<BytedanceImageInfo> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                BytedanceImageInfo bytedanceImageInfo = JSON.parseObject(deString, BytedanceImageInfo.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(bytedanceImageInfo, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
 
-      //Step.2 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<BytedanceImageInfo> pageList = bytedanceImageInfoService.list(queryWrapper);
-      //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "头条图片素材列表");
-      mv.addObject(NormalExcelConstants.CLASS, BytedanceImageInfo.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("头条图片素材列表数据", "导出人:Jeecg", "导出信息"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
-  }
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<BytedanceImageInfo> pageList = bytedanceImageInfoService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "头条图片素材列表");
+        mv.addObject(NormalExcelConstants.CLASS, BytedanceImageInfo.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("头条图片素材列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
 
-  /**
-      * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<BytedanceImageInfo> listBytedanceImageInfos = ExcelImportUtil.importExcel(file.getInputStream(), BytedanceImageInfo.class, params);
-              bytedanceImageInfoService.saveBatch(listBytedanceImageInfos);
-              return Result.ok("文件导入成功!数据行数:" + listBytedanceImageInfos.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.ok("文件导入失败!");
-  }
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<BytedanceImageInfo> listBytedanceImageInfos = ExcelImportUtil.importExcel(file.getInputStream(), BytedanceImageInfo.class, params);
+                bytedanceImageInfoService.saveBatch(listBytedanceImageInfos);
+                return Result.ok("文件导入成功!数据行数:" + listBytedanceImageInfos.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
 
 }

+ 1 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/ByteDanceCleanMaterialReportController.java

@@ -3,6 +3,7 @@ package cn.com.ctop.toutiao.modules.report.controller;
 import cn.com.ctop.common.module.annotation.AutoLog;
 import cn.com.ctop.common.module.entity.ByteDanceCleanMaterialReport;
 import cn.com.ctop.common.module.service.IByteDanceCleanMaterialReportService;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1110 - 1110
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/ByteDanceVideoReportDailyController.java


+ 32 - 29
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAccountReportCtrl.java

@@ -39,6 +39,7 @@ public class BytedanceAccountReportCtrl {
 
     /**
      * 查询素材报表chart数据
+     *
      * @param requestBody
      * @return
      */
@@ -53,16 +54,16 @@ public class BytedanceAccountReportCtrl {
         String mediaId = requestBody.getString("mediaId");
         BigDecimal discount = requestBody.getBigDecimal("discount");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
-        if(accounts.isEmpty()){
-         return resultBody;
+        if (accounts.isEmpty()) {
+            return resultBody;
         }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
         try {
             Map<String, Object> sumData = bytedanceAccountReportService.getSumDataBy(mediaId, discount, accounts, startDate, endDate);
             List<JSONObject> chartData = bytedanceAccountReportService.getChartDataBy(mediaId, discount, accounts, startDate, endDate);
-            result.put("sumData",sumData);
-            result.put("chartData",chartData);
+            result.put("sumData", sumData);
+            result.put("chartData", chartData);
             resultBody.setResult(result);
             resultBody.setSuccess(true);
         } catch (Exception e) {
@@ -74,6 +75,7 @@ public class BytedanceAccountReportCtrl {
 
     /**
      * 查询素材报表表格数据
+     *
      * @param requestBody
      * @return
      */
@@ -87,16 +89,16 @@ public class BytedanceAccountReportCtrl {
         String mediaId = requestBody.getString("mediaId");
         BigDecimal discount = requestBody.getBigDecimal("discount");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
-        if(accounts.isEmpty()){
+        if (accounts.isEmpty()) {
             return result;
         }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
-        int hour= requestBody.getInteger("hour");
-        String target= requestBody.getString("target");
-        String order= requestBody.getString("order");
+        int hour = requestBody.getInteger("hour");
+        String target = requestBody.getString("target");
+        String order = requestBody.getString("order");
         try {
-            List<JSONObject> listData= bytedanceAccountReportService.getListDataBy(mediaId,discount,accounts,startDate,endDate,hour,target,order);
+            List<JSONObject> listData = bytedanceAccountReportService.getListDataBy(mediaId, discount, accounts, startDate, endDate, hour, target, order);
             result.setResult(listData);
             result.setSuccess(true);
         } catch (Exception e) {
@@ -107,7 +109,8 @@ public class BytedanceAccountReportCtrl {
     }
 
     /**
-     *  导出数据
+     * 导出数据
+     *
      * @param requestBody
      * @param request
      * @param response
@@ -116,41 +119,41 @@ public class BytedanceAccountReportCtrl {
     public void getExcelReport(@RequestBody JSONObject requestBody,
                                HttpServletRequest request,
                                HttpServletResponse response) {
-        JSONArray columns=requestBody.getJSONArray("columns");
-        if(columns.isEmpty()){
+        JSONArray columns = requestBody.getJSONArray("columns");
+        if (columns.isEmpty()) {
             log.error("请选择需要导出的字段");
         }
-        String filed= JsonResourceUtil.joinFiled(AccountReportConstants.dicMapBy,columns);
-        List<String> titles= new ArrayList<>();
+        String filed = JsonResourceUtil.joinFiled(AccountReportConstants.dicMapBy, columns);
+        List<String> titles = new ArrayList<>();
         titles.add("账户Id");
         titles.add("账户名称");
-        titles.addAll(JsonResourceUtil.joinTitle(AccountReportConstants.dicMapBy,columns));
+        titles.addAll(JsonResourceUtil.joinTitle(AccountReportConstants.dicMapBy, columns));
         //此处增加两个元素是为了保证数据有序
-        columns.add(0,"accountId");
-        columns.add(1,"authName");
+        columns.add(0, "accountId");
+        columns.add(1, "authName");
         String mediaId = requestBody.getString("mediaId");
         JSONArray accounts = requestBody.getJSONArray("accountIds");
-        if(accounts.isEmpty()){
+        if (accounts.isEmpty()) {
             return;
         }
         String startDate = requestBody.getString("startDate");
         String endDate = requestBody.getString("endDate");
-        String target= requestBody.getString("target");
-        String order= requestBody.getString("order");
-        int hour= requestBody.getInteger("hour");
-        List<JSONObject> excelData= bytedanceAccountReportService.getExcelDataBy(filed,mediaId,accounts,startDate,endDate,hour,target,order);
-        if(excelData.isEmpty()){
+        String target = requestBody.getString("target");
+        String order = requestBody.getString("order");
+        int hour = requestBody.getInteger("hour");
+        List<JSONObject> excelData = bytedanceAccountReportService.getExcelDataBy(filed, mediaId, accounts, startDate, endDate, hour, target, order);
+        if (excelData.isEmpty()) {
             return;
         }
-        List<List<Object>> excelList= new ArrayList<>();
-        excelData.forEach(data->{
-            List<Object> temp= new ArrayList<>();
-            columns.forEach(k->{
+        List<List<Object>> excelList = new ArrayList<>();
+        excelData.forEach(data -> {
+            List<Object> temp = new ArrayList<>();
+            columns.forEach(k -> {
                 temp.add(data.get(k.toString()));
             });
             excelList.add(temp);
         });
-        try{
+        try {
             String[] headers = titles.toArray(new String[titles.size()]);
             OutputStream os = response.getOutputStream();
             ExportExcelUtils eeu = new ExportExcelUtils();
@@ -160,7 +163,7 @@ public class BytedanceAccountReportCtrl {
             workbook.write(os);
             os.flush();
             os.close();
-        }catch (IOException e){
+        } catch (IOException e) {
             log.error(e.getMessage());
         }
     }

+ 2 - 9
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAdvertiserDailyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.DTO.AccountReportDTO;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceAdvertiserDailyReport;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -97,7 +97,7 @@ public class BytedanceAdvertiserDailyReportController {
             boolean ok = bytedanceAdvertiserDailyReportService.updateById(bytedanceAdvertiserDailyReport);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }
@@ -166,13 +166,6 @@ public class BytedanceAdvertiserDailyReportController {
     }
 
 
-
-
-
-
-
-
-
     @AutoLog(value = "头条账户报表统计-指标统计")
     @ApiOperation(value = "头条账户报表统计-指标统计", notes = "头条账户报表统计-指标统计")
     @GetMapping(value = "/bytedanceAccountReportStatistics")

+ 1 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceAdvertiserHourlyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceAdvertiserHourlyReport;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceAdvertiserHourlyReportService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCampaignDailyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceCampaignDailyReport;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceCampaignDailyReportService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -96,7 +96,7 @@ public class BytedanceCampaignDailyReportController {
             boolean ok = bytedanceCampaignDailyReportService.updateById(bytedanceCampaignDailyReport);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCampaignHourlyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceCampaignHourlyReport;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceCampaignHourlyReportService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -96,7 +96,7 @@ public class BytedanceCampaignHourlyReportController {
             boolean ok = bytedanceCampaignHourlyReportService.updateById(bytedanceCampaignHourlyReport);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }

+ 4 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCreativeDailyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceCreativeDailyReport;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceCreativeDailyReportService;
@@ -12,7 +13,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -99,7 +99,7 @@ public class BytedanceCreativeDailyReportController {
             boolean ok = bytedanceCreativeDailyReportService.updateById(bytedanceCreativeDailyReport);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }
@@ -169,6 +169,7 @@ public class BytedanceCreativeDailyReportController {
 
     /**
      * TODO 需要重写 avg问题
+     *
      * @param json
      * @return
      */
@@ -186,6 +187,7 @@ public class BytedanceCreativeDailyReportController {
 
     /**
      * TODO 需要重写 avg问题
+     *
      * @param json
      * @return
      */

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceCreativeHourlyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceCreativeHourlyReport;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceCreativeHourlyReportService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -96,7 +96,7 @@ public class BytedanceCreativeHourlyReportController {
             boolean ok = bytedanceCreativeHourlyReportService.updateById(bytedanceCreativeHourlyReport);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }

+ 14 - 13
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceHomepageReportCtrl.java

@@ -14,7 +14,7 @@ import java.util.List;
 import java.util.Map;
 
 /**
- *  Created by JQ.bi on 2020.5.19
+ * Created by JQ.bi on 2020.5.19
  */
 @Slf4j
 @RestController
@@ -25,46 +25,47 @@ public class BytedanceHomepageReportCtrl {
     IBytedanceHomepageReportService bytedanceHomepageReportService;
 
     @PostMapping("/report/week")
-    public Result<Map<String,Object>> getWeekReport(@RequestBody JSONObject requestBody) {
-        Result<Map<String,Object>> result = new Result<>();
+    public Result<Map<String, Object>> getWeekReport(@RequestBody JSONObject requestBody) {
+        Result<Map<String, Object>> result = new Result<>();
         try {
             Map<String, Object> weekReport = bytedanceHomepageReportService.getWeekReport(requestBody);
             result.setResult(weekReport);
             result.setSuccess(true);
         } catch (Exception e) {
-            log.error(e.getMessage(),e);
+            log.error(e.getMessage(), e);
             result.setSuccess(false);
         }
         return result;
     }
 
     @PostMapping("/report/chart")
-    public Result<Map<String,List<JSONObject>>> getChartReport(@RequestBody JSONObject requestBody) {
-        Result<Map<String,List<JSONObject>>> result = new Result<>();
-        if(requestBody.isEmpty()){
+    public Result<Map<String, List<JSONObject>>> getChartReport(@RequestBody JSONObject requestBody) {
+        Result<Map<String, List<JSONObject>>> result = new Result<>();
+        if (requestBody.isEmpty()) {
             log.error("request body is empty");
             result.setSuccess(false);
         }
         try {
-            Map<String,List<JSONObject>> chartReport=bytedanceHomepageReportService.getChartByDate(requestBody);
+            Map<String, List<JSONObject>> chartReport = bytedanceHomepageReportService.getChartByDate(requestBody);
             result.setResult(chartReport);
             result.setSuccess(true);
         } catch (Exception e) {
-            log.error(e.getMessage(),e);
+            log.error(e.getMessage(), e);
             result.setSuccess(false);
         }
 
         return result;
     }
+
     @PostMapping("/report/compare")
-    public Result<Map<String,JSONObject>> getCompareReport(@RequestBody JSONObject requestBody) {
-        Result<Map<String,JSONObject>> result = new Result<>();
+    public Result<Map<String, JSONObject>> getCompareReport(@RequestBody JSONObject requestBody) {
+        Result<Map<String, JSONObject>> result = new Result<>();
         try {
-            Map<String,JSONObject> chartReport=bytedanceHomepageReportService.getCompareByDate(requestBody);
+            Map<String, JSONObject> chartReport = bytedanceHomepageReportService.getCompareByDate(requestBody);
             result.setResult(chartReport);
             result.setSuccess(true);
         } catch (Exception e) {
-            log.error(e.getMessage(),e);
+            log.error(e.getMessage(), e);
             result.setSuccess(false);
         }
 

+ 6 - 5
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceInterfaceController.java

@@ -37,16 +37,17 @@ public class BytedanceInterfaceController {
 
     /**
      * 头条试玩报表--单个accountId拉取数据
+     *
      * @param startDate
      * @param endDate
      * @return
      */
     @GetMapping("/bytedancePlayableReportByAccountId")
     public Result bytedancePlayableReportByAccountId(@RequestParam(name = "startDate") String startDate,
-                                                          @RequestParam(name = "endDate") String endDate,
-                                                          @RequestParam(name = "accountId") Long accountId) {
+                                                     @RequestParam(name = "endDate") String endDate,
+                                                     @RequestParam(name = "accountId") Long accountId) {
         Result result = new Result<>();
-        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)||accountId==null){
+        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate) || accountId == null) {
             result.error500("开始时间,结束时间和账户id不能为空");
             return result;
         }
@@ -54,7 +55,7 @@ public class BytedanceInterfaceController {
             log.info("头条获取单个账户视频素材报表数据任务执行开始");
             Long starttime = System.currentTimeMillis();
             CtopOauthToken token = tokenService.getOauthTokenByAccountId(String.valueOf(accountId));
-            if (null == token ) {
+            if (null == token) {
                 log.info("头条获取单个账户视频素材报表数据任务执行失败:未获取到可用的token");
                 return result;
             }
@@ -85,7 +86,7 @@ public class BytedanceInterfaceController {
     public Result bytedancePlayableReport(@RequestParam(name = "startDate") String startDate,
                                           @RequestParam(name = "endDate") String endDate) {
         Result result = new Result<>();
-        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
+        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
             result.error500("开始时间和结束时间不能为空");
             return result;
         }

+ 1 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedancePlanDailyReportController.java

@@ -99,7 +99,7 @@ public class BytedancePlanDailyReportController {
             boolean ok = bytedancePlanDailyReportService.updateById(bytedancePlanDailyReport);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedancePlanHourlyReportController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.entity.BytedancePlanHourlyReport;
 import cn.com.ctop.toutiao.modules.report.service.IBytedancePlanHourlyReportService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -96,7 +96,7 @@ public class BytedancePlanHourlyReportController {
             boolean ok = bytedancePlanHourlyReportService.updateById(bytedancePlanHourlyReport);
             if (ok) {
                 result.success("修改成功!");
-            }else {
+            } else {
                 result.error500("未知错误");
             }
         }

+ 72 - 69
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportController.java

@@ -95,7 +95,7 @@ public class BytedanceReportController {
     public Result bytedanceMaterialReport(@RequestParam(name = "startDate") String startDate,
                                           @RequestParam(name = "endDate") String endDate) {
         Result result = new Result<>();
-        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
+        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
             result.error500("开始时间和结束时间不能为空");
             return result;
         }
@@ -110,27 +110,27 @@ public class BytedanceReportController {
 
             final ExecutorService executorService = Executors.newFixedThreadPool(8);
             tokens.forEach(token -> {
-                executorService.submit(new Runnable() {
-                    @Override
-                    public void run() {
-                        try {
-                            //间隔天数
-                            Long days = DateUtils.getDiscrepantDays(startDate, endDate);
-                            String start = null;
-                            String end = null;
-                            for (int i = 0; i <= days; i++) {
-                                start = DateUtils.addDay(startDate, i);
-                                end = start;
-                                //获取头条素材报表数据
-                                bytedanceReportService.bytedanceMaterialReport(token, start, end);
+                        executorService.submit(new Runnable() {
+                            @Override
+                            public void run() {
+                                try {
+                                    //间隔天数
+                                    Long days = DateUtils.getDiscrepantDays(startDate, endDate);
+                                    String start = null;
+                                    String end = null;
+                                    for (int i = 0; i <= days; i++) {
+                                        start = DateUtils.addDay(startDate, i);
+                                        end = start;
+                                        //获取头条素材报表数据
+                                        bytedanceReportService.bytedanceMaterialReport(token, start, end);
+                                    }
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                } finally {
+                                }
                             }
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        } finally {
-                        }
+                        });
                     }
-                });
-            }
             );
             ////
             Long endtime = System.currentTimeMillis();
@@ -169,10 +169,10 @@ public class BytedanceReportController {
                                 end = start;
                                 //获取头条素材报表数据
                                 int code = bytedanceReportService.bytedanceMaterialReportRetry(type, token, start, end);
-                                if(code ==200 || code == 1){
-                                    if(type == 1){
+                                if (code == 200 || code == 1) {
+                                    if (type == 1) {
                                         //重试成功清洗数据
-                                        byteDanceVideoReportDailyService.videoInfoListByAccountId(start,end,accountId);
+                                        byteDanceVideoReportDailyService.videoInfoListByAccountId(start, end, accountId);
                                     }
                                 }
                             }
@@ -196,6 +196,7 @@ public class BytedanceReportController {
 
     /**
      * 绑定头条账户之后的操作,对此账户进行素材报表数据拉取以及素材报表数据清洗
+     *
      * @param accountId
      * @param startDate
      * @param endDate
@@ -203,10 +204,10 @@ public class BytedanceReportController {
      */
     @GetMapping("/bytedance/bytedanceMaterialReportAndVideoReport")
     public Result bytedanceMaterialReportAndVideoReport(@RequestParam(name = "accountId") Long accountId,
-                                          @RequestParam(name = "startDate") String startDate,
-                                          @RequestParam(name = "endDate") String endDate) {
+                                                        @RequestParam(name = "startDate") String startDate,
+                                                        @RequestParam(name = "endDate") String endDate) {
         Result result = new Result<>();
-        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate) || null == accountId){
+        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate) || null == accountId) {
             result.error500("开始时间和结束时间、accountId均不能为空");
             return result;
         }
@@ -214,7 +215,7 @@ public class BytedanceReportController {
         try {
             log.info("头条获取素材报表数据任务执行开始");
             Long starttime = System.currentTimeMillis();
-            CtopOauthToken token = tokenService.getAccessTokenByAccountIdAndMediaId(1,accountId);
+            CtopOauthToken token = tokenService.getAccessTokenByAccountIdAndMediaId(1, accountId);
             if (null == token) {
                 log.info("头条获取素材报表数据任务执行失败:未获取到可用的token,accountId:" + accountId);
                 return result;
@@ -229,8 +230,8 @@ public class BytedanceReportController {
                 //获取头条素材报表数据
                 int code = bytedanceReportService.bytedanceMaterialReport(token, start, end);
                 //如果成功的话跑视频清洗数据方法,失败会进入重试库,重试成功后再清洗数据
-                if(code ==200 || code == 1){
-                    byteDanceVideoReportDailyService.videoInfoListByAccountId(start,end,accountId);
+                if (code == 200 || code == 1) {
+                    byteDanceVideoReportDailyService.videoInfoListByAccountId(start, end, accountId);
                 }
             }
 
@@ -247,15 +248,16 @@ public class BytedanceReportController {
 
     /**
      * 头条视频素材报表--此接口仅有视频素材,异步拉取数据
+     *
      * @param startDate
      * @param endDate
      * @return
      */
     @GetMapping("/bytedance/bytedanceVideoMaterialReport")
     public Result bytedanceVideoMaterialReport(@RequestParam(name = "startDate") String startDate,
-                                                @RequestParam(name = "endDate") String endDate) {
+                                               @RequestParam(name = "endDate") String endDate) {
         Result result = new Result<>();
-        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)){
+        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)) {
             result.error500("开始时间和结束时间不能为空");
             return result;
         }
@@ -271,25 +273,25 @@ public class BytedanceReportController {
             final ExecutorService executorService = Executors.newFixedThreadPool(8);
             tokens.forEach(token -> {
                 executorService.submit(new Runnable() {
-                           @Override
-                           public void run() {
-                               try {
-                                   //间隔天数
-                                   Long days = DateUtils.getDiscrepantDays(startDate, endDate);
-                                   String start = null;
-                                   String end = null;
-                                   for (int i = 0; i <= days; i++) {
-                                       start = DateUtils.addDay(startDate, i);
-                                       end = start;
-                                       //获取头条素材报表数据
-                                       bytedanceReportService.bytedanceVideoMaterialReport(token, start, end);
-                                   }
-                               } catch (Exception e) {
-                                   e.printStackTrace();
-                               }
-                           }
-                       });
-                    });
+                    @Override
+                    public void run() {
+                        try {
+                            //间隔天数
+                            Long days = DateUtils.getDiscrepantDays(startDate, endDate);
+                            String start = null;
+                            String end = null;
+                            for (int i = 0; i <= days; i++) {
+                                start = DateUtils.addDay(startDate, i);
+                                end = start;
+                                //获取头条素材报表数据
+                                bytedanceReportService.bytedanceVideoMaterialReport(token, start, end);
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                });
+            });
             Long endtime = System.currentTimeMillis();
         } catch (Exception e) {
             log.error("头条获取视频素材报表数据任务执行结失败");
@@ -301,16 +303,17 @@ public class BytedanceReportController {
 
     /**
      * 头条视频素材报表--此接口仅有视频素材,单个accountId拉取数据
+     *
      * @param startDate
      * @param endDate
      * @return
      */
     @GetMapping("/bytedance/bytedanceVideoMaterialReportByAccountId")
     public Result bytedanceVideoMaterialReportByAccountId(@RequestParam(name = "startDate") String startDate,
-                                               @RequestParam(name = "endDate") String endDate,
-                                               @RequestParam(name = "accountId") Long accountId) {
+                                                          @RequestParam(name = "endDate") String endDate,
+                                                          @RequestParam(name = "accountId") Long accountId) {
         Result result = new Result<>();
-        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate)||accountId==null){
+        if (StringUtils.isBlank(startDate) || StringUtils.isBlank(endDate) || accountId == null) {
             result.error500("开始时间,结束时间和账户id不能为空");
             return result;
         }
@@ -318,7 +321,7 @@ public class BytedanceReportController {
             log.info("头条获取单个账户视频素材报表数据任务执行开始");
             Long starttime = System.currentTimeMillis();
             CtopOauthToken token = tokenService.getOauthTokenByAccountId(String.valueOf(accountId));
-            if (null == token ) {
+            if (null == token) {
                 log.info("头条获取单个账户视频素材报表数据任务执行失败:未获取到可用的token");
                 return result;
             }
@@ -350,24 +353,24 @@ public class BytedanceReportController {
         Result<PageInfo<ByteDanceReportAccountDailyDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             result.setSuccess(false);
             result.setMessage("参数有误");
             return result;
         }
 
-        if(dto.getPageSize() == 0 ){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<ByteDanceReportAccountDailyDTO> byteDanceReportAccountDailyDTOList = bytedanceAccountReportService.getBytedanceAccountInfoByProjectId(dto.getStartDate(), dto.getEndDate(), dto.getProjectId(),dto.getPageNum(),dto.getPageSize(),dto.getSort(), dto.getYn());
+        try {
+            PageInfo<ByteDanceReportAccountDailyDTO> byteDanceReportAccountDailyDTOList = bytedanceAccountReportService.getBytedanceAccountInfoByProjectId(dto.getStartDate(), dto.getEndDate(), dto.getProjectId(), dto.getPageNum(), dto.getPageSize(), dto.getSort(), dto.getYn());
             result.setResult(byteDanceReportAccountDailyDTOList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
-        }finally {
+        } finally {
         }
 
         return result;
@@ -379,7 +382,7 @@ public class BytedanceReportController {
         Result<PageInfo<ByteDanceReportAccountDailyDTO>> result = new Result<>();
         result.setSuccess(true);
 
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             //result.setSuccess(false);
             //result.setMessage("参数有误");
             //return result;
@@ -393,18 +396,18 @@ public class BytedanceReportController {
             dto.setEndDate(dateString);
         }
 
-        if(dto.getPageSize() == 0 ){
+        if (dto.getPageSize() == 0) {
             dto.setPageSize(20);
         }
 
-        try{
-            PageInfo<ByteDanceReportAccountDailyDTO> byteDanceReportAccountDailyDTOList = bytedanceAccountReportService.getBytedanceSaleProjectInfo(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(),dto.getPageNum(),dto.getPageSize(),dto.getSort(), dto.getYn());
+        try {
+            PageInfo<ByteDanceReportAccountDailyDTO> byteDanceReportAccountDailyDTOList = bytedanceAccountReportService.getBytedanceSaleProjectInfo(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(), dto.getPageNum(), dto.getPageSize(), dto.getSort(), dto.getYn());
             result.setResult(byteDanceReportAccountDailyDTOList);
-        }catch(Exception e){
+        } catch (Exception e) {
             log.error(e.getMessage());
             result.setSuccess(false);
             result.setMessage("执行出错");
-        }finally {
+        } finally {
         }
 
         return result;
@@ -417,9 +420,9 @@ public class BytedanceReportController {
      * @return
      */
     @PostMapping(value = "/exportBytedanceSaleProjectInfo")
-    public void exportXxl(@RequestBody BytedanceInfoDTO dto,HttpServletResponse response) throws IOException {
+    public void exportXxl(@RequestBody BytedanceInfoDTO dto, HttpServletResponse response) throws IOException {
         List<SheetInfoVo> sheets = new ArrayList<>();
-        if(dto == null || dto.getStartDate() ==null || dto.getEndDate() == null){
+        if (dto == null || dto.getStartDate() == null || dto.getEndDate() == null) {
             Date getDate = DateUtils.addDay(new Date(), -1);
             SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
             String dateString = dateFormat.format(getDate);
@@ -431,7 +434,7 @@ public class BytedanceReportController {
 
         dto.setPageSize(1000000000);
         //查询总的消耗信息
-        SheetInfoVo totalSheetVo = bytedanceAccountReportService.getBytedanceSaleProjectInfoSheetVO(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(),dto.getPageNum(),dto.getPageSize(),dto.getSort(), dto.getYn());
+        SheetInfoVo totalSheetVo = bytedanceAccountReportService.getBytedanceSaleProjectInfoSheetVO(dto.getStartDate(), dto.getEndDate(), dto.getProjectList(), dto.getPageNum(), dto.getPageSize(), dto.getSort(), dto.getYn());
         OutputStream outputStream = response.getOutputStream();
         String date = DateUtils.formatDate(new Date());
         HttpUtils.setResponseHeader(response, "头条销售报表" + date + ".xlsx");

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportMaterialDailyController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialDaily;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportMaterialDailyService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -10,7 +11,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -25,7 +25,7 @@ import java.util.Arrays;
  * @date 2020-04-16
  */
 @Slf4j
-@Api(tags="素材报表")
+@Api(tags = "素材报表")
 @RestController
 @RequestMapping("/bytedance/bytedanceReportMaterialDaily")
 public class BytedanceReportMaterialDailyController {

+ 2 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceReportMaterialRetryController.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.toutiao.modules.report.controller;
 
 import cn.com.ctop.common.module.annotation.AutoLog;
+import cn.com.ctop.common.module.utils.QueryGenerator;
 import cn.com.ctop.common.module.utils.StringUtils;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialRetry;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportMaterialRetryService;
@@ -11,7 +12,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -26,7 +26,7 @@ import java.util.Arrays;
  * @date 2020-04-21
  */
 @Slf4j
-@Api(tags="头条素材报表连接出错数据记录表")
+@Api(tags = "头条素材报表连接出错数据记录表")
 @RestController
 @RequestMapping("/bytedance/bytedanceReportMaterialRetry")
 public class BytedanceReportMaterialRetryController {

+ 21 - 21
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/controller/BytedanceVideoReportCtrl.java

@@ -57,7 +57,7 @@ public class BytedanceVideoReportCtrl {
                 if (accountIds.isEmpty()) {
                     accountIds = null;
                 }
-                PageInfo<JSONObject> listData = bytedanceVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order, clip, shot,plan,pageSize, pageNo);
+                PageInfo<JSONObject> listData = bytedanceVideoReportService.getVideoReportBy(accountIds, startDate, endDate, filedAll, target, order, clip, shot, plan, pageSize, pageNo);
                 result.setResult(listData);
                 result.setSuccess(true);
             } catch (Exception e) {
@@ -87,7 +87,7 @@ public class BytedanceVideoReportCtrl {
                 if (accountIds.isEmpty()) {
                     accountIds = null;
                 }
-                List<JSONObject> listData = bytedanceVideoReportService.getVideoDetailBy(accountIds, startDate, endDate, filedAll,signature);
+                List<JSONObject> listData = bytedanceVideoReportService.getVideoDetailBy(accountIds, startDate, endDate, filedAll, signature);
                 result.setResult(listData);
                 result.setSuccess(true);
             } catch (Exception e) {
@@ -103,8 +103,8 @@ public class BytedanceVideoReportCtrl {
                                HttpServletRequest request,
                                HttpServletResponse response) {
         //加一个参数区分是table页,还是详情页。
-        String exportType= requestBody.getString("exportType");
-        if(exportType.isEmpty()){
+        String exportType = requestBody.getString("exportType");
+        if (exportType.isEmpty()) {
             return;
         }
         JSONArray columns = requestBody.getJSONArray("columns");
@@ -115,20 +115,20 @@ public class BytedanceVideoReportCtrl {
         String filed = JsonResourceUtil.joinFiled(AccountReportConstants.dicMapByVideo, columns);
         List<String> titles = new ArrayList<>(JsonResourceUtil.joinTitle(AccountReportConstants.dicMapByVideo, columns));
         //此处增加两个元素是为了保证数据顺序
-        if("exportDetail".equals(exportType)){
-            titles.add(0,"客户");
-            titles.add(1,"项目名称");
-            titles.add(2,"时间");
-            titles.add(3,"消耗");
+        if ("exportDetail".equals(exportType)) {
+            titles.add(0, "客户");
+            titles.add(1, "项目名称");
+            titles.add(2, "时间");
+            titles.add(3, "消耗");
             columns.add(0, "advertiserName");
             columns.add(1, "projectName");
             columns.add(2, "statDate");
-        }else{
-            titles.add(0,"唯一标识");
-            titles.add(1,"视频");
-            titles.add(2,"视频名称");
-            titles.add(3,"项目名称");
-            titles.add(4,"上传时间");
+        } else {
+            titles.add(0, "唯一标识");
+            titles.add(1, "视频");
+            titles.add(2, "视频名称");
+            titles.add(3, "项目名称");
+            titles.add(4, "上传时间");
             columns.add(0, "signature");
             columns.add(1, "url");
             columns.add(2, "materialName");
@@ -147,13 +147,13 @@ public class BytedanceVideoReportCtrl {
         String plan = requestBody.getString("plan");
         String target = requestBody.getString("target");
         String order = requestBody.getString("order");
-        List<JSONObject> excelData=null;
-        if("exportTable".equals(exportType)){
-            excelData = bytedanceVideoReportService.exportExcelReportBy(accountIds, startDate, endDate, filed, target, order,clip,shot,plan);
-        }else if("exportDetail".equals(exportType)){
-            excelData = bytedanceVideoReportService.getVideoDetailBy(accountIds,startDate,endDate,filed,signature);
+        List<JSONObject> excelData = null;
+        if ("exportTable".equals(exportType)) {
+            excelData = bytedanceVideoReportService.exportExcelReportBy(accountIds, startDate, endDate, filed, target, order, clip, shot, plan);
+        } else if ("exportDetail".equals(exportType)) {
+            excelData = bytedanceVideoReportService.getVideoDetailBy(accountIds, startDate, endDate, filed, signature);
         }
-        if (null!=excelData&&excelData.isEmpty()) {
+        if (null != excelData && excelData.isEmpty()) {
             return;
         }
         List<List<Object>> excelList = new ArrayList<>();

+ 63 - 58
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/tool/controller/ByteDanceQueryToolController.java

@@ -8,7 +8,10 @@ import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+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.RestController;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -30,95 +33,97 @@ public class ByteDanceQueryToolController {
     ICtopOauthTokenService ctopOauthTokenService;
 
     /**
-     *  查询转化目标接口
+     * 查询转化目标接口
      */
-    @PostMapping(value="/queryConvert")
-    public Result<Map<String,Object>> queryConvertResult(Long accountId, String landingType, String appType,
-                                                         String downloadType,String externalUrl,String toutiaoPackage,
-                                                         String downloadUrl){
+    @PostMapping(value = "/queryConvert")
+    public Result<Map<String, Object>> queryConvertResult(Long accountId, String landingType, String appType,
+                                                          String downloadType, String externalUrl, String toutiaoPackage,
+                                                          String downloadUrl) {
 
-        Result<Map<String,Object>> result=new Result<>();
+        Result<Map<String, Object>> result = new Result<>();
         Map<String, Object> convertQueryMap = byteDanceConvertToolService.queryAdConvert(ctopOauthTokenService.getTokenByAccountId(accountId), accountId,
                 landingType, appType, downloadType, externalUrl, toutiaoPackage, downloadUrl);
-        if(!convertQueryMap.get("code").equals(0)){
+        if (!convertQueryMap.get("code").equals(0)) {
             result.error500("查询转化目标结果失败");
-        }else{
+        } else {
             result.setSuccess(true);
-            result.setResult(ConvertResultHandle((List)((JSONObject)convertQueryMap.get("data")).get("list")));
+            result.setResult(ConvertResultHandle((List) ((JSONObject) convertQueryMap.get("data")).get("list")));
         }
         return result;
     }
 
-    @PostMapping(value="/queryVideoInfo")
-    public Result<JSONArray> queryVideoInfo(@RequestBody JSONObject requestBody){
-        Long accountId=requestBody.getLong("accountId");
-        JSONArray signatures=requestBody.getJSONArray("signatures");
-        Result<JSONArray> result=new Result<>();
-        JSONObject jsonObject = byteDanceQueryMaterialInfoService.queryVideoInfo(ctopOauthTokenService.getTokenByAccountId(accountId),accountId,signatures);
-        if(jsonObject.getInteger("code")!=0){
+    @PostMapping(value = "/queryVideoInfo")
+    public Result<JSONArray> queryVideoInfo(@RequestBody JSONObject requestBody) {
+        Long accountId = requestBody.getLong("accountId");
+        JSONArray signatures = requestBody.getJSONArray("signatures");
+        Result<JSONArray> result = new Result<>();
+        JSONObject jsonObject = byteDanceQueryMaterialInfoService.queryVideoInfo(ctopOauthTokenService.getTokenByAccountId(accountId), accountId, signatures);
+        if (jsonObject.getInteger("code") != 0) {
             result.error500("视频素材信息查询失败");
-        }else{
+        } else {
             result.setSuccess(true);
             result.setResult(jsonObject.getJSONObject("data").getJSONArray("list"));
         }
         return result;
     }
-    @PostMapping(value="/queryImageInfo")
-    public Result<JSONArray> queryImageInfo(@RequestBody JSONObject requestBody){
-        Long accountId=requestBody.getLong("accountId");
-        JSONArray signatures=requestBody.getJSONArray("signatures");
-        Result<JSONArray> result=new Result<>();
-        JSONObject jsonObject = byteDanceQueryMaterialInfoService.queryImageInfo(ctopOauthTokenService.getTokenByAccountId(accountId),accountId,signatures);
-        if(jsonObject.getInteger("code")!=0){
+
+    @PostMapping(value = "/queryImageInfo")
+    public Result<JSONArray> queryImageInfo(@RequestBody JSONObject requestBody) {
+        Long accountId = requestBody.getLong("accountId");
+        JSONArray signatures = requestBody.getJSONArray("signatures");
+        Result<JSONArray> result = new Result<>();
+        JSONObject jsonObject = byteDanceQueryMaterialInfoService.queryImageInfo(ctopOauthTokenService.getTokenByAccountId(accountId), accountId, signatures);
+        if (jsonObject.getInteger("code") != 0) {
             result.error500("图片素材信息查询失败");
-        }else{
+        } else {
             result.setSuccess(true);
             result.setResult(jsonObject.getJSONObject("data").getJSONArray("list"));
         }
         return result;
     }
 
-    private Map<String,Object> ConvertResultHandle(List convertResult){
-        Map<String,Object> resultMap=new HashMap<>();
-        if(convertResult.isEmpty()){
-            resultMap.put("data",convertResult);
-        }else{
-            List resultList=new ArrayList();
-            convertResult.forEach(it->{
-                if(((JSONObject)it).get("external_actions")!=null){
-                    JSONObject jsonObject=(JSONObject)it;
-                    Map<String,Object> temp=new HashMap<>();
-                    temp.put("convert_type",jsonObject.get("convert_type"));
-                    temp.put("name",getName((jsonObject.getString("convert_type"))));
-                    if(jsonObject.getJSONArray("external_actions")!=null){
-                        List actionList=new ArrayList();
-                        jsonObject.getJSONArray("external_actions").forEach(action->{
-                            Map<String,Object> actionMap=new HashMap<>();
-                            actionMap.put("external_action",((JSONObject)action).getString("external_action"));
-                            if(((JSONObject)action).get("convert_id")==null){
-                                actionMap.put("convertId",getConvertIdByExternalAction(((JSONObject)action).getString("external_action")));
-                            }else {
-                                actionMap.put("convertId",(((JSONObject)action).get("convert_id")));
+    private Map<String, Object> ConvertResultHandle(List convertResult) {
+        Map<String, Object> resultMap = new HashMap<>();
+        if (convertResult.isEmpty()) {
+            resultMap.put("data", convertResult);
+        } else {
+            List resultList = new ArrayList();
+            convertResult.forEach(it -> {
+                if (((JSONObject) it).get("external_actions") != null) {
+                    JSONObject jsonObject = (JSONObject) it;
+                    Map<String, Object> temp = new HashMap<>();
+                    temp.put("convert_type", jsonObject.get("convert_type"));
+                    temp.put("name", getName((jsonObject.getString("convert_type"))));
+                    if (jsonObject.getJSONArray("external_actions") != null) {
+                        List actionList = new ArrayList();
+                        jsonObject.getJSONArray("external_actions").forEach(action -> {
+                            Map<String, Object> actionMap = new HashMap<>();
+                            actionMap.put("external_action", ((JSONObject) action).getString("external_action"));
+                            if (((JSONObject) action).get("convert_id") == null) {
+                                actionMap.put("convertId", getConvertIdByExternalAction(((JSONObject) action).getString("external_action")));
+                            } else {
+                                actionMap.put("convertId", (((JSONObject) action).get("convert_id")));
                             }
-                            if(((JSONObject)action).get("deep_external_actions")!=null){
-                                actionMap.put("deep_external_action",((JSONObject)((JSONObject)action).getJSONArray("deep_external_actions").get(0)).getString("deep_external_action"));
-                            }else{
-                                actionMap.put("deep_external_action",null);
+                            if (((JSONObject) action).get("deep_external_actions") != null) {
+                                actionMap.put("deep_external_action", ((JSONObject) ((JSONObject) action).getJSONArray("deep_external_actions").get(0)).getString("deep_external_action"));
+                            } else {
+                                actionMap.put("deep_external_action", null);
                             }
-                            actionMap.put("external_name",((JSONObject)action).get("external_name"));
+                            actionMap.put("external_name", ((JSONObject) action).get("external_name"));
                             actionList.add(actionMap);
                         });
-                        temp.put("external_actions",actionList);
+                        temp.put("external_actions", actionList);
                     }
                     resultList.add(temp);
                 }
-                resultMap.put("data",resultList);
+                resultMap.put("data", resultList);
             });
         }
         return resultMap;
     }
-    private String getName(String convertType){
-        String convertName="";
+
+    private String getName(String convertType) {
+        String convertName = "";
         switch (convertType) {
             case "AD_CONVERT_SOURCE_TYPE_INTERNAL":
                 convertName = "线索通";
@@ -157,8 +162,8 @@ public class ByteDanceQueryToolController {
         return convertName;
     }
 
-    private int getConvertIdByExternalAction(String externalAction){
-        int result=0;
+    private int getConvertIdByExternalAction(String externalAction) {
+        int result = 0;
         switch (externalAction) {
             case "AD_CONVERT_TYPE_DOWNLOAD_FINISH":
                 result = 4;

+ 14 - 14
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/tool/controller/ParseInstallPackageController.java

@@ -26,11 +26,11 @@ public class ParseInstallPackageController {
     private RestTemplate restTemplate;
 
     @PostMapping("/parseInstallPackage")
-    public Result<Map<String,String>> installPackageParse(@RequestParam String installUrl,
-                                                          @RequestParam String appType) {
+    public Result<Map<String, String>> installPackageParse(@RequestParam String installUrl,
+                                                           @RequestParam String appType) {
         Result<Map<String, String>> result = new Result<>();
         //在此不需要判断安装包类型拼接后缀
-        String installPath="C:\\Users\\Arc\\Desktop\\install"+System.currentTimeMillis();
+        String installPath = "C:\\Users\\Arc\\Desktop\\install" + System.currentTimeMillis();
         //String installPath="/data/webpackage/install"+System.currentTimeMillis();
         byte[] bytes = restTemplate.postForObject(installUrl, null, byte[].class);
         if (null == bytes || bytes.length == 0) {
@@ -39,11 +39,11 @@ public class ParseInstallPackageController {
             File file = new File(installPath);
             OutputStream outputStream = null;
             try {
-                    outputStream = new FileOutputStream(file, true);
-                    outputStream.write(bytes);
-                    outputStream.flush();
+                outputStream = new FileOutputStream(file, true);
+                outputStream.write(bytes);
+                outputStream.flush();
             } catch (IOException e) {
-                log.error("下载安装包失败>>>ParseInstallPackageController"+e.getMessage());
+                log.error("下载安装包失败>>>ParseInstallPackageController" + e.getMessage());
             } finally {
                 if (outputStream != null) {
                     try {
@@ -53,15 +53,15 @@ public class ParseInstallPackageController {
                     }
                 }
             }
-            Map<String, String> packageInfo=new HashMap<>();
-            if("APP_ANDROID".equals(appType)){
-                packageInfo=ParseInstallPackageUtil.parseAPK(installPath);
-            }else if("APP_IOS".equals(appType)){
-                packageInfo=ParseInstallPackageUtil.parseIpa(installPath);
+            Map<String, String> packageInfo = new HashMap<>();
+            if ("APP_ANDROID".equals(appType)) {
+                packageInfo = ParseInstallPackageUtil.parseAPK(installPath);
+            } else if ("APP_IOS".equals(appType)) {
+                packageInfo = ParseInstallPackageUtil.parseIpa(installPath);
             }
-            if(packageInfo.isEmpty()){
+            if (packageInfo.isEmpty()) {
                 result.error500("请选择正确的安装包类型");
-            }else {
+            } else {
                 result.setSuccess(true);
                 result.setResult(packageInfo);
             }