Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/test' into test

zhouzeyu@c-top.com.cn 3 gadi atpakaļ
vecāks
revīzija
9b75bc1371
36 mainītis faili ar 1653 papildinājumiem un 159 dzēšanām
  1. 1 0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. 12 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/constant/MatchLogic.java
  3. 3 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/controller/RuleIndicatorController.java
  4. 15 2
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/controller/RuleTemplateController.java
  5. 142 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/AlarmRuleOperationRecord.java
  6. 12 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleAccountThreshold.java
  7. 4 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleBase.java
  8. 15 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleGroup.java
  9. 6 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleIndicator.java
  10. 2 1
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/enums/ConditEnum.java
  11. 15 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/mapper/AlarmRuleOperationRecordMapper.java
  12. 5 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/mapper/xml/AlarmRuleOperationRecordMapper.xml
  13. 14 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/ExternalLinkService.java
  14. 15 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/IAlarmRuleOperationRecordService.java
  15. 19 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/AlarmRuleOperationRecordServiceImpl.java
  16. 42 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/ExternalLinkServiceImpl.java
  17. 18 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleAccountThresholdServiceImpl.java
  18. 722 84
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleGroupServiceImpl.java
  19. 47 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleTemplateServiceImpl.java
  20. 2 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/ProjectMapper.java
  21. 12 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/ProjectMapper.xml
  22. 2 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/IProjectService.java
  23. 5 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/ProjectServiceImpl.java
  24. 13 4
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/RuleDataAccountKuaishouServiceImpl.java
  25. 13 4
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/RuleDataAccountServiceImpl.java
  26. 13 9
      jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java
  27. 3 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/app/mapper/KuaishouAccountBalanceBudgetMapper.java
  28. 6 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/app/mapper/xml/KuaishouAccountBalanceBudgetMapper.xml
  29. 72 43
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KuaishouReportDailyExploreController.java
  30. 15 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyExploreMapper.java
  31. 98 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyExploreMapper.xml
  32. 14 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKuaishouReportDailyExploreService.java
  33. 1 3
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouGroupExploreServiceImpl.java
  34. 152 0
      jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyExploreServiceImpl.java
  35. 122 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectMemberController.java
  36. 1 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/ProjectMemberMapper.xml

+ 1 - 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -212,6 +212,7 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/dimension/kuaiShouDimensionAccount/*", "anon");
         filterChainDefinitionMap.put("/ai/projectCreate/*", "anon");
         filterChainDefinitionMap.put("/cwjsPolicyInfo/**", "anon");
+        filterChainDefinitionMap.put("/ruleIndicator/**", "anon");
         filterChainDefinitionMap.put("/explores/**", "anon");
         filterChainDefinitionMap.put("/estimatePeopleNumber/**", "anon");
 

+ 12 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/constant/MatchLogic.java

@@ -42,8 +42,19 @@ public class MatchLogic {
             }
             obj.put("isNull", false);
             if ("number".equals(type)) {
-                BigDecimal bigThr = new BigDecimal(threshold);
                 BigDecimal bigVal = new BigDecimal(value);
+                if (threshold.contains("~")) {
+                    String[] split = threshold.split("~");
+                    BigDecimal min = new BigDecimal(split[0]);
+                    BigDecimal max = new BigDecimal(split[1]);
+                    //bigVal介于min与max之间,即:min<=bigVal<=max
+                    if (max.compareTo(bigVal) > -1 && bigVal.compareTo(min) > -1) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                }
+                BigDecimal bigThr = new BigDecimal(threshold);
                 switch (condition) {
                     case "equal":
                         return bigVal.compareTo(bigThr) == 0;

+ 3 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/controller/RuleIndicatorController.java

@@ -54,8 +54,10 @@ public class RuleIndicatorController {
     public Result<JSONArray> queryPageList(RuleIndicator ruleIndicator) {
         Result<JSONArray> result = new Result<>();
         Integer mediaType = ruleIndicator.getMediaType();
+        Integer operation = ruleIndicator.getOperation();
         QueryWrapper<RuleIndicator> queryWrapper = new QueryWrapper();
         queryWrapper.eq("media_type", mediaType);
+        queryWrapper.eq("operation", operation);
         queryWrapper.groupBy("dimension");
         List<RuleIndicator> list = ruleIndicatorService.list(queryWrapper);
         JSONArray dataArr = new JSONArray();
@@ -65,6 +67,7 @@ public class RuleIndicatorController {
             QueryWrapper<RuleIndicator> queryWrapperData = new QueryWrapper();
             queryWrapperData.eq("media_type", mediaType);
             queryWrapperData.eq("dimension", dimension);
+            queryWrapperData.eq("operation", operation);
             List<RuleIndicator> dataList = ruleIndicatorService.list(queryWrapperData);
             if (!Check.isNull(dataList)) {
                 dimensionJson.put("dimension", dimension);

+ 15 - 2
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/controller/RuleTemplateController.java

@@ -2,7 +2,11 @@ package cn.com.ctop.alarm.modules.controller;
 
 import cn.com.ctop.alarm.modules.entity.RuleGroup;
 import cn.com.ctop.alarm.modules.entity.RuleTemplate;
-import cn.com.ctop.alarm.modules.service.*;
+import cn.com.ctop.alarm.modules.service.IRuleAccountTemplateService;
+import cn.com.ctop.alarm.modules.service.IRuleAccountThresholdService;
+import cn.com.ctop.alarm.modules.service.IRuleBaseService;
+import cn.com.ctop.alarm.modules.service.IRuleGroupService;
+import cn.com.ctop.alarm.modules.service.IRuleTemplateService;
 import cn.com.ctop.common.module.utils.Check;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -22,7 +26,15 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.entity.ImportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.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.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
@@ -154,6 +166,7 @@ public class RuleTemplateController {
         if (!Check.isNull(templateName)) {
             queryWrapper.like("template_name", templateName);
         }
+        queryWrapper.orderByDesc("update_time");
         Page<RuleTemplate> page = new Page<RuleTemplate>(pageNo, pageSize);
         IPage<RuleTemplate> pageList = ruleTemplateService.page(page, queryWrapper);
         result.setSuccess(true);

+ 142 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/AlarmRuleOperationRecord.java

@@ -0,0 +1,142 @@
+package cn.com.ctop.alarm.modules.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 预警操作记录表
+ *
+ * @author jeecg-boot
+ * @version V1.0
+ * @date 2021-08-10
+ */
+@Data
+@TableName("ctop_alarm_rule_operation_record")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_alarm_rule_operation_record对象", description = "预警操作记录表")
+public class AlarmRuleOperationRecord {
+
+    /**
+     * 主键id
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 计划ID
+     */
+    @Excel(name = "计划ID", width = 15)
+    @ApiModelProperty(value = "计划ID")
+    private Long planId;
+    /**
+     * 组ID
+     */
+    @Excel(name = "组ID", width = 15)
+    @ApiModelProperty(value = "组ID")
+    private Long unitId;
+    /**
+     * 规则组id
+     */
+    @Excel(name = "规则组id", width = 15)
+    @ApiModelProperty(value = "规则组id")
+    private Long groupId;
+    /**
+     * 指标code
+     */
+    @Excel(name = "指标code", width = 15)
+    @ApiModelProperty(value = "指标code")
+    private String indicatorCode;
+    /**
+     * 操作记录
+     */
+    private String message;
+    /**
+     * 修改前的值
+     */
+    @Excel(name = "修改前的值", width = 15)
+    @ApiModelProperty(value = "修改前的值")
+    private String beforeValue;
+    /**
+     * 操作类型:up-提高,down-降低,to-调整至
+     */
+    @Excel(name = "操作类型:up-提高,down-降低,to-调整至", width = 15)
+    @ApiModelProperty(value = "操作类型:up-提高,down-降低,to-调整至")
+    private String operationType;
+    /**
+     * 操作内容:price-金额,percent-百分数
+     */
+    @Excel(name = "操作内容:price-金额,percent-百分数", width = 15)
+    @ApiModelProperty(value = "操作内容:price-金额,percent-百分数")
+    private String operationValue;
+    /**
+     * 修改后的值
+     */
+    @Excel(name = "修改后的值", width = 15)
+    @ApiModelProperty(value = "修改后的值")
+    private String afterValue;
+    /**
+     * 操作阈值
+     */
+    @Excel(name = "操作阈值", width = 15)
+    @ApiModelProperty(value = "操作阈值")
+    private String operationThreshold;
+    /**
+     * 峰值
+     */
+    @Excel(name = "峰值", width = 15)
+    @ApiModelProperty(value = "峰值")
+    private String MaxValue;
+    /**
+     * 峰值
+     */
+    @Excel(name = "最小值", width = 15)
+    @ApiModelProperty(value = "最小值")
+    private String minValue;
+    /**
+     * 操作时间
+     */
+    @Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "操作时间")
+    private String valueTime;
+    /**
+     * 媒体类型
+     */
+    @Excel(name = "媒体类型", width = 15)
+    @ApiModelProperty(value = "媒体类型")
+    private String mediaType;
+    /**
+     * createTime
+     */
+    @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "createTime")
+    private Date createTime;
+    /**
+     * updateTime
+     */
+    @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "updateTime")
+    private Date updateTime;
+}

+ 12 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleAccountThreshold.java

@@ -55,6 +55,18 @@ public class RuleAccountThreshold {
     @ApiModelProperty(value = "阈值")
     private String threshold;
     /**
+     * 操作阈值
+     */
+    private String operationThreshold;
+    /**
+     * 峰值
+     */
+    private String maxValue;
+    /**
+     * 低值
+     */
+    private String minValue;
+    /**
      * createTime
      */
     @ApiModelProperty(value = "createTime")

+ 4 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleBase.java

@@ -48,6 +48,10 @@ public class RuleBase {
     @ApiModelProperty(value = "指标code")
     private String indicatorCode;
     /**
+     * 比较指标code
+     */
+    private String cindicatorCode;
+    /**
      * 判断条件 大于 等于 小于等
      */
     @Excel(name = "判断条件 大于 等于 小于等", width = 15)

+ 15 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleGroup.java

@@ -55,9 +55,23 @@ public class RuleGroup {
     @ApiModelProperty(value = "规则关系 当rule_type 为group时必填 and同时命中  or 命中一条")
     private String ruleRelationship;
     /**
-     * 操作内容:SEND发送,PAUSE关停并发送
+     * 操作内容:SEND-发送,PAUSE-关停并发送,BUDGET-修改预算,BID-出价,TIME-投放时间
      */
     private String operate;
+
+    /**
+     * 是否有后续操作,0无,1有
+     */
+    private Integer operation;
+
+    /**
+     * 操作类型:up-提高,down-降低,to-调整至
+     */
+    private String operationType;
+    /**
+     * 操作内容:price-金额,percent-百分数
+     */
+    private String operationValue;
     /**
      * 预警发送方式: SMS:短信,WeChat:企业微信,EMAIL:电子邮件,TEL:电话
      */

+ 6 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/entity/RuleIndicator.java

@@ -38,6 +38,11 @@ public class RuleIndicator {
     @Excel(name = "1:头条2:快手", width = 15)
     @ApiModelProperty(value = "1:头条2:快手")
     private Integer mediaType;
+
+    /**
+     * 是否可操作指标,0否,1是
+     */
+    private Integer operation;
     /**
      * 指标名称
      */
@@ -56,6 +61,7 @@ public class RuleIndicator {
     @Excel(name = "数据类型", width = 15)
     @ApiModelProperty(value = "数据类型")
     private String dataType;
+    private String conditionType;
     private String modelType;
     /**
      * 数据单位

+ 2 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/enums/ConditEnum.java

@@ -16,7 +16,8 @@ public enum ConditEnum {
     GREATER_EQUAL("greater_equal", "大于等于"),
     LESS_EQUAL("less_equal", "小于等于"),
     NO_CONTAIN("no_contain", "不包含"),
-    CONTAIN("contain", "包含");
+    CONTAIN("contain", "包含"),
+    BETWEEN("between", "介于");
 
     private String name;
     private String code;

+ 15 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/mapper/AlarmRuleOperationRecordMapper.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.alarm.modules.mapper;
+
+import cn.com.ctop.alarm.modules.entity.AlarmRuleOperationRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * 预警操作记录表
+ *
+ * @author jeecg-boot
+ * 2021-08-10
+ * @version V1.0
+ */
+public interface AlarmRuleOperationRecordMapper extends BaseMapper<AlarmRuleOperationRecord> {
+
+}

+ 5 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/mapper/xml/AlarmRuleOperationRecordMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.alarm.modules.mapper.AlarmRuleOperationRecordMapper">
+
+</mapper>

+ 14 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/ExternalLinkService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.alarm.modules.service;
+
+import java.math.BigDecimal;
+
+/**
+ * @Description: 调用外部接口
+ * @Author: jeecg-boot
+ * @Date: 2020-11-16
+ * @Version: V1.0
+ */
+public interface ExternalLinkService {
+
+    String editBytedancePlanCpaBidOrBudget(Long accountId, String adId, BigDecimal cpaBid, String adScheduleTime,Long budget);
+}

+ 15 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/IAlarmRuleOperationRecordService.java

@@ -0,0 +1,15 @@
+package cn.com.ctop.alarm.modules.service;
+
+import cn.com.ctop.alarm.modules.entity.AlarmRuleOperationRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 预警操作记录表
+ *
+ * @author jeecg-boot
+ * 2021-08-10
+ * @version V1.0
+ */
+public interface IAlarmRuleOperationRecordService extends IService<AlarmRuleOperationRecord> {
+
+}

+ 19 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/AlarmRuleOperationRecordServiceImpl.java

@@ -0,0 +1,19 @@
+package cn.com.ctop.alarm.modules.service.impl;
+
+import cn.com.ctop.alarm.modules.entity.AlarmRuleOperationRecord;
+import cn.com.ctop.alarm.modules.mapper.AlarmRuleOperationRecordMapper;
+import cn.com.ctop.alarm.modules.service.IAlarmRuleOperationRecordService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 预警操作记录表
+ *
+ * @author jeecg-boot
+ * 2021-08-10
+ * @version V1.0
+ */
+@Service
+public class AlarmRuleOperationRecordServiceImpl extends ServiceImpl<AlarmRuleOperationRecordMapper, AlarmRuleOperationRecord> implements IAlarmRuleOperationRecordService {
+
+}

+ 42 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/ExternalLinkServiceImpl.java

@@ -0,0 +1,42 @@
+package cn.com.ctop.alarm.modules.service.impl;
+
+import cn.com.ctop.alarm.modules.service.ExternalLinkService;
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.HttpUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+
+/**
+ * 调取外部接口
+ */
+@Slf4j
+@Service
+public class ExternalLinkServiceImpl implements ExternalLinkService {
+    //修改头条CPABID出价,投放时间
+    private static final String URL_UPDATE_CPABID = "http://118.24.244.213:8808/bytedance-api/advertiser/bytedanceReportController/updateADCpaBid";
+    //线上IP  http://118.24.244.213:8808/bytedance-api/advertiser/bytedanceReportController/updateADCpaBid
+    //测试IP  http://139.186.165.84:8808/bytedance-api/advertiser/bytedanceReportController/updateADCpaBid
+
+    @Override
+    public String editBytedancePlanCpaBidOrBudget(Long accountId, String adId, BigDecimal cpaBid, String adScheduleTime, Long budget) {
+        StringBuffer buf = new StringBuffer();
+        buf.append("?accountId=").append(accountId).append("&adId=").append(adId);
+        if (!Check.isNull(cpaBid)) {
+            buf.append("&cpaBid=").append(cpaBid);
+        }
+        if (!Check.isNull(adScheduleTime)) {
+            buf.append("&adScheduleTime=").append(adScheduleTime);
+        }
+        if (!Check.isNull(budget)) {
+            buf.append("&budget=").append(budget);
+        }
+        log.info("调用微服务接口,修改头条计划出价、预算、投放时间段。。。。。。start");
+        HttpUtils.httpGet(URL_UPDATE_CPABID + buf.toString(), null, null);
+        log.info("调用微服务接口,修改头条计划出价、预算、投放时间段。。。。。。end");
+        return null;
+    }
+
+
+}

+ 18 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleAccountThresholdServiceImpl.java

@@ -58,6 +58,9 @@ public class RuleAccountThresholdServiceImpl extends ServiceImpl<RuleAccountThre
             }
             Long groupId = groupJson.getLong("groupId");
             Integer isCopy = groupJson.getInteger("isCopy");
+            String operationThreshold = groupJson.getString("operationThreshold");
+            String maxValue = groupJson.getString("maxValue");
+            String minValue = groupJson.getString("minValue");
             if (isCopy == 1) {
                 Map<String, Object> deleteMap = new HashMap<>();
                 deleteMap.put("account_id", accountId);
@@ -108,6 +111,21 @@ public class RuleAccountThresholdServiceImpl extends ServiceImpl<RuleAccountThre
                     } else {
                         updateThreshold.setThreshold(threshold);
                     }
+                    if (Check.isNull(operationThreshold)) {
+                        updateThreshold.setOperationThreshold("");
+                    } else {
+                        updateThreshold.setOperationThreshold(operationThreshold);
+                    }
+                    if (Check.isNull(maxValue)) {
+                        updateThreshold.setMaxValue("");
+                    } else {
+                        updateThreshold.setMaxValue(maxValue);
+                    }
+                    if (Check.isNull(minValue)) {
+                        updateThreshold.setMinValue("");
+                    } else {
+                        updateThreshold.setMinValue(minValue);
+                    }
                     QueryWrapper<RuleAccountThreshold> updateQueryWrapper = new QueryWrapper();
                     updateQueryWrapper.eq("account_id", accountId);
                     updateQueryWrapper.eq("rule_id", ruleId);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 722 - 84
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleGroupServiceImpl.java


+ 47 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/alarm/modules/service/impl/RuleTemplateServiceImpl.java

@@ -1,9 +1,17 @@
 package cn.com.ctop.alarm.modules.service.impl;
 
-import cn.com.ctop.alarm.modules.entity.*;
+import cn.com.ctop.alarm.modules.entity.RuleAccountThreshold;
+import cn.com.ctop.alarm.modules.entity.RuleBase;
+import cn.com.ctop.alarm.modules.entity.RuleGroup;
+import cn.com.ctop.alarm.modules.entity.RuleIndicator;
+import cn.com.ctop.alarm.modules.entity.RuleTemplate;
 import cn.com.ctop.alarm.modules.mapper.RuleBaseMapper;
 import cn.com.ctop.alarm.modules.mapper.RuleTemplateMapper;
-import cn.com.ctop.alarm.modules.service.*;
+import cn.com.ctop.alarm.modules.service.IRuleAccountThresholdService;
+import cn.com.ctop.alarm.modules.service.IRuleBaseService;
+import cn.com.ctop.alarm.modules.service.IRuleGroupService;
+import cn.com.ctop.alarm.modules.service.IRuleIndicatorService;
+import cn.com.ctop.alarm.modules.service.IRuleTemplateService;
 import cn.com.ctop.common.module.utils.Check;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -88,6 +96,7 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
                                 RuleBase ruleBase = new RuleBase();
                                 ruleBase.setRuleName(ruleDetailJson.getString("ruleName"));
                                 ruleBase.setIndicatorCode(ruleDetailJson.getString("indicatorCode"));
+                                ruleBase.setCindicatorCode(Check.isNull(ruleDetailJson.getString("cindicatorCode")) ? ruleDetailJson.getString("indicatorCode") : ruleDetailJson.getString("cindicatorCode"));
                                 ruleBase.setRuleCondition(ruleDetailJson.getString("ruleCondition"));
                                 ruleBase.setThreshold(ruleDetailJson.getString("threshold"));
                                 ruleBase.setVariableType(ruleDetailJson.getInteger("variableType"));
@@ -110,6 +119,9 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
                         ruleGroup.setIsRequired(ruleGroupJson.getInteger("isRequired"));
                         ruleGroup.setSendType(ruleGroupJson.getString("sendType"));
                         ruleGroup.setOperate(ruleGroupJson.getString("operate"));
+                        ruleGroup.setOperation(ruleGroupJson.getInteger("operation"));
+                        ruleGroup.setOperationType(ruleGroupJson.getString("operationType"));
+                        ruleGroup.setOperationValue(ruleGroupJson.getString("operationValue"));
                         boolean save = ruleGroupService.save(ruleGroup);
                         if (save) {
                             String ruleIdsArrStr = ruleGroup.getRuleIds();
@@ -196,6 +208,9 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
                 groupJson.put("sendType", group.getSendType());
                 groupJson.put("isCopy", group.getIsCopy());
                 groupJson.put("isRequired", group.getIsRequired());
+                groupJson.put("operation", group.getOperation());
+                groupJson.put("operationType", group.getOperationType());
+                groupJson.put("operationValue", group.getOperationValue());
                 JSONArray ruleIds = JSONArray.parseArray(group.getRuleIds());
                 if (Check.isNull(ruleIds)) {
                     continue;
@@ -212,6 +227,7 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
                     ruleJson.put("ruleName", ruleBase.getRuleName());
                     ruleJson.put("judgeFormat", ruleBase.getJudgeFormat());
                     ruleJson.put("indicatorCode", ruleBase.getIndicatorCode());
+                    ruleJson.put("cindicatorCode", ruleBase.getCindicatorCode());
                     ruleJson.put("ruleCondition", ruleBase.getRuleCondition());
                     ruleJson.put("threshold", ruleBase.getThreshold());
                     ruleJson.put("ruleDimension", ruleBase.getRuleDimension());
@@ -227,7 +243,7 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
                     indicatorQueryWrapper.last("limit 1");
                     RuleIndicator ruleIndicator = ruleIndicatorService.getOne(indicatorQueryWrapper);
                     if (!Check.isNull(ruleIndicator)) {
-                        ruleJson.put("dataType", ruleIndicator.getDataType());
+                        ruleJson.put("dataType", ruleIndicator.getConditionType());
                         ruleJson.put("dictId", ruleIndicator.getDictId());
                         ruleJson.put("dataUnit", ruleIndicator.getDataUnit());
                         ruleJson.put("name", ruleIndicator.getName());
@@ -286,6 +302,19 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
             groupJson.put("sendType", group.getSendType());
             groupJson.put("isCopy", group.getIsCopy());
             groupJson.put("isRequired", group.getIsRequired());
+            groupJson.put("operation", group.getOperation());
+            groupJson.put("operationType", group.getOperationType());
+            groupJson.put("operationValue", group.getOperationValue());
+            QueryWrapper<RuleAccountThreshold> wrapper = new QueryWrapper<>();
+            wrapper.eq("account_id", accountId);
+            wrapper.eq("group_id", groupId);
+            wrapper.orderByDesc("operation_threshold").last("limit 1");
+            RuleAccountThreshold thresholds = accountThresholdService.getOne(wrapper); // 查询基础规则绑定的阈值
+            if (!Check.isNull(thresholds)) {
+                groupJson.put("operationThreshold", thresholds.getOperationThreshold());
+                groupJson.put("maxValue", thresholds.getMaxValue());
+                groupJson.put("minValue", thresholds.getMinValue());
+            }
             JSONArray ruleDetail = new JSONArray();
 
             if (group.getIsCopy() == 0) { // 规则不可复制
@@ -304,6 +333,7 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
                     ruleJson.put("ruleName", ruleBase.getRuleName());
                     ruleJson.put("judgeFormat", ruleBase.getJudgeFormat());
                     ruleJson.put("indicatorCode", ruleBase.getIndicatorCode());
+                    ruleJson.put("cindicatorCode", ruleBase.getCindicatorCode());
                     ruleJson.put("ruleCondition", ruleBase.getRuleCondition());
                     QueryWrapper<RuleAccountThreshold> accountThresholdQueryWrapper = new QueryWrapper<>();
                     accountThresholdQueryWrapper.eq("account_id", accountId);
@@ -453,6 +483,19 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
             groupJson.put("sendType", group.getSendType());
             groupJson.put("isCopy", group.getIsCopy());
             groupJson.put("isRequired", group.getIsRequired());
+            groupJson.put("operation", group.getOperation());
+            groupJson.put("operationType", group.getOperationType());
+            groupJson.put("operationValue", group.getOperationValue());
+            QueryWrapper<RuleAccountThreshold> wrapper = new QueryWrapper<>();
+//            wrapper.eq("account_id", accountId);
+            wrapper.eq("group_id", groupId);
+            wrapper.orderByDesc("operation_threshold").last("limit 1");
+            RuleAccountThreshold thresholds = accountThresholdService.getOne(wrapper); // 查询基础规则绑定的阈值
+            if (!Check.isNull(thresholds)) {
+                groupJson.put("operationThreshold", thresholds.getOperationThreshold());
+                groupJson.put("maxValue", thresholds.getMaxValue());
+                groupJson.put("minValue", thresholds.getMinValue());
+            }
             JSONArray ruleIds = JSONArray.parseArray(group.getRuleIds());
             if (Check.isNull(ruleIds)) {
                 continue;
@@ -470,6 +513,7 @@ public class RuleTemplateServiceImpl extends ServiceImpl<RuleTemplateMapper, Rul
                     ruleJson.put("ruleName", ruleBase.getRuleName());
                     ruleJson.put("judgeFormat", ruleBase.getJudgeFormat());
                     ruleJson.put("indicatorCode", ruleBase.getIndicatorCode());
+                    ruleJson.put("cindicatorCode", ruleBase.getCindicatorCode());
                     ruleJson.put("ruleCondition", ruleBase.getRuleCondition());
                     ruleJson.put("threshold", ruleBase.getThreshold());
                     ruleJson.put("ruleDimension", ruleBase.getRuleDimension());

+ 2 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/ProjectMapper.java

@@ -33,4 +33,6 @@ public interface ProjectMapper extends BaseMapper<Project> {
     List<Long> getProjectIdsByProductIdAndNotIn(@Param("productId") Long productId, @Param("partakeProjectIds") List<Long> partakeProjectIds);
 
     JSONObject getProjectByAccountId(@Param("accountId") Long accountId);
+
+    List<JSONObject> queryProductList(@Param("projectList") List<JSONObject> projectList);
 }

+ 12 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/ProjectMapper.xml

@@ -75,6 +75,7 @@
         </if>
 
     </select>
+
     <select id="getProjectByAccountId" resultType="com.alibaba.fastjson.JSONObject">
     SELECT
 	id AS 'projectId',
@@ -93,4 +94,15 @@
 	)
     </select>
 
+    <select id="queryProductList" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT t1.product_id as 'productId',t2.product_name as 'productName' FROM ctop_project t1
+        LEFT JOIN ctop_product t2 ON t1.product_id = t2.id
+        WHERE t1.product_id is not null
+        and t1.id IN
+        <foreach item="item" index="index" collection="projectList" open="(" separator="," close=")">
+            #{item.projectId}
+        </foreach>
+        GROUP BY t1.product_id
+    </select>
+
 </mapper>

+ 2 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/IProjectService.java

@@ -32,4 +32,6 @@ public interface IProjectService extends IService<Project> {
     List<Long> getProjectIdsByProductIdAndNotIn(Long productId, List<Long> partakeProjectIds);
 
     JSONObject getProjectByAccountId(Long accountId);
+
+    List<JSONObject> queryProductInfo(List<JSONObject> projectList);
 }

+ 5 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/ProjectServiceImpl.java

@@ -80,4 +80,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     public JSONObject getProjectByAccountId(Long accountId) {
         return projectMapper.getProjectByAccountId(accountId);
     }
+
+    @Override
+    public List<JSONObject> queryProductInfo(List<JSONObject> projectList) {
+        return projectMapper.queryProductList(projectList);
+    }
 }

+ 13 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/RuleDataAccountKuaishouServiceImpl.java

@@ -9,6 +9,7 @@ import cn.com.ctop.common.module.mapper.RuleDataTargetKuaishouMapper;
 import cn.com.ctop.common.module.mapper.RuleDatePlanKuaishouMapper;
 import cn.com.ctop.common.module.mapper.RuleDateUnitKuaishouMapper;
 import cn.com.ctop.common.module.service.IRuleDataAccountKuaishouService;
+import cn.com.ctop.common.module.utils.Check;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xxl.job.core.enums.NoEn;
@@ -45,13 +46,21 @@ public class RuleDataAccountKuaishouServiceImpl extends ServiceImpl<RuleDataAcco
         map.put("account_id", accountId);
         map.put("status", NoEn.NO1.valueInt());
         List<RuleDataAccountKuaishou> accountList = ruleDataAccountKuaishouMapper.selectByMap(map);
-        obj.put("account", accountList);
+        if (!Check.isNull(accountList)) {
+            obj.put("account", accountList);
+        }
         List<RuleDateUnitKuaishou> unitKuaishous = ruleDateUnitKuaishouMapper.selectByMap(map);
-        obj.put("unit", unitKuaishous);
+        if (!Check.isNull(unitKuaishous)) {
+            obj.put("unit", unitKuaishous);
+        }
         List<RuleDataTargetKuaishou> targetKuaishous = ruleDataTargetKuaishouMapper.selectByMap(map);
-        obj.put("target", targetKuaishous);
+        if (!Check.isNull(targetKuaishous)) {
+            obj.put("target", targetKuaishous);
+        }
         List<RuleDatePlanKuaishou> planKuaishous = ruleDatePlanKuaishouMapper.selectByMap(map);
-        obj.put("plan", planKuaishous);
+        if (!Check.isNull(planKuaishous)) {
+            obj.put("plan", planKuaishous);
+        }
         return obj;
     }
 }

+ 13 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/RuleDataAccountServiceImpl.java

@@ -9,6 +9,7 @@ import cn.com.ctop.common.module.mapper.RuleDataCreativeMapper;
 import cn.com.ctop.common.module.mapper.RuleDataPlanMapper;
 import cn.com.ctop.common.module.mapper.RuleDataTargetMapper;
 import cn.com.ctop.common.module.service.IRuleDataAccountService;
+import cn.com.ctop.common.module.utils.Check;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xxl.job.core.enums.NoEn;
@@ -48,13 +49,21 @@ public class RuleDataAccountServiceImpl extends ServiceImpl<RuleDataAccountMappe
         map.put("account_id", accountId);
         map.put("status", NoEn.NO1.valueInt());
         List<RuleDataAccount> ruleDataAccounts = ruleDataAccountMapper.selectByMap(map);
-        obj.put("account", ruleDataAccounts);
+        if (!Check.isNull(ruleDataAccounts)) {
+            obj.put("account", ruleDataAccounts);
+        }
         List<RuleDataPlan> ruleDataPlans = ruleDataPlanMapper.selectByMap(map);
-        obj.put("plan", ruleDataPlans);
+        if (!Check.isNull(ruleDataPlans)) {
+            obj.put("plan", ruleDataPlans);
+        }
         List<RuleDataTarget> ruleDataTargets = ruleDataTargetMapper.selectByMap(map);
-        obj.put("target", ruleDataTargets);
+        if (!Check.isNull(ruleDataTargets)) {
+            obj.put("target", ruleDataTargets);
+        }
         List<RuleDataCreative> ruleDataCreatives = ruleDataCreativeMapper.selectByMap(map);
-        obj.put("creative", ruleDataCreatives);
+        if (!Check.isNull(ruleDataCreatives)) {
+            obj.put("creative", ruleDataCreatives);
+        }
         return obj;
     }
 }

+ 13 - 9
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java

@@ -167,8 +167,8 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
     }
 
     @Override
-    public List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId,Long productId) {
-        return userAllocationMapper.getAccountListByUserIdAndProductId(userId,projectId,productId);
+    public List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId, Long productId) {
+        return userAllocationMapper.getAccountListByUserIdAndProductId(userId, projectId, productId);
     }
 
     @Override
@@ -177,15 +177,19 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
         List list = new ArrayList();
         for (int i = 0; i < projectList.size(); i++) {
             JSONObject jsonObject = projectList.get(i);
-            list.add(jsonObject.getLong("projectId"));
-            map.put(jsonObject.getLong("projectId"), new ArrayList<>());
+            if (!Check.isNull(jsonObject)) {
+                list.add(jsonObject.getLong("projectId"));
+                map.put(jsonObject.getLong("projectId"), new ArrayList<>());
+            }
         }
         List<JSONObject> jsonList = userAllocationMapper.getAccountListByProjectList(list);
         for (int i = 0; i < jsonList.size(); i++) {
             JSONObject jsonObject = jsonList.get(i);
-            Long projectId = jsonObject.getLong("projectId");
-            List<JSONObject> jsonObjects = map.get(projectId);
-            jsonObjects.add(jsonObject);
+            if (!Check.isNull(jsonObject)) {
+                Long projectId = jsonObject.getLong("projectId");
+                List<JSONObject> jsonObjects = map.get(projectId);
+                jsonObjects.add(jsonObject);
+            }
         }
         return map;
     }
@@ -217,8 +221,8 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
 
     @Override
     public boolean updateProjectStrategyStatus(Long accountId, Integer projectStrategy) {
-        int num  = userAllocationMapper.updateProjectStrategyStatus(accountId, projectStrategy);
-        return num>0;
+        int num = userAllocationMapper.updateProjectStrategyStatus(accountId, projectStrategy);
+        return num > 0;
     }
 
     @Override

+ 3 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/app/mapper/KuaishouAccountBalanceBudgetMapper.java

@@ -3,6 +3,7 @@ package cn.com.ctop.kuaishou.modules.app.mapper;
 
 import cn.com.ctop.kuaishou.modules.app.entity.KuaishouAccountBalanceBudget;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 快手-账余额、预算
@@ -16,4 +17,6 @@ public interface KuaishouAccountBalanceBudgetMapper extends BaseMapper<KuaishouA
     void replace(KuaishouAccountBalanceBudget budget);
 
     void updateAllIsInvalidState();
+
+    KuaishouAccountBalanceBudget queryByAccountId(@Param("accountId") Long accountId);
 }

+ 6 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/app/mapper/xml/KuaishouAccountBalanceBudgetMapper.xml

@@ -33,4 +33,10 @@
         where 1 = 1
     </update>
 
+    <select id="queryByAccountId" resultType="cn.com.ctop.kuaishou.modules.app.entity.KuaishouAccountBalanceBudget">
+        SELECT *
+        FROM ctop_kuaishou_account_balance_budget
+        WHERE account_id = #{accountId}
+    </select>
+
 </mapper>

+ 72 - 43
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/controller/KuaishouReportDailyExploreController.java

@@ -1,41 +1,45 @@
 package cn.com.ctop.kuaishou.modules.report.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.utils.Check;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyExplore;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyExploreService;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 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 lombok.extern.slf4j.Slf4j;
-
 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.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.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;
 
 /**
  * 广告组加速探索报表
@@ -47,33 +51,58 @@ import io.swagger.annotations.ApiOperation;
 @Slf4j
 @Api(tags = "广告组加速探索报表")
 @RestController
-@RequestMapping("/kuaishouReportDailyExplore")
+@RequestMapping("/explore")
 public class KuaishouReportDailyExploreController {
     @Autowired
     private IKuaishouReportDailyExploreService kuaishouReportDailyExploreService;
 
     /**
-     * 分页列表查询
-     *
-     * @param kuaishouReportDailyExplore
-     * @param pageNo
-     * @param pageSize
-     * @param req
-     * @return
+     * 查询当日广告组数据
      */
-    @ApiOperation(value = "广告组加速探索报表-分页列表查询", notes = "广告组加速探索报表-分页列表查询")
-    @GetMapping(value = "/list")
-    public Result<IPage<KuaishouReportDailyExplore>> queryPageList(KuaishouReportDailyExplore kuaishouReportDailyExplore,
-                                                                   @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
-                                                                   @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
-                                                                   HttpServletRequest req) {
-        Result<IPage<KuaishouReportDailyExplore>> result = new Result<>();
-        QueryWrapper<KuaishouReportDailyExplore> queryWrapper = QueryGenerator.initQueryWrapper(kuaishouReportDailyExplore, req.getParameterMap());
-        Page<KuaishouReportDailyExplore> page = new Page<KuaishouReportDailyExplore>(pageNo, pageSize);
-        IPage<KuaishouReportDailyExplore> pageList = kuaishouReportDailyExploreService.page(page, queryWrapper);
-        result.setSuccess(true);
-        result.setResult(pageList);
-        return result;
+    @PostMapping(value = "/todaylist")
+    public Result<Object> todaylist(@RequestBody JSONObject request) {
+        try {
+            return kuaishouReportDailyExploreService.todaylist(request);
+        } catch (Exception e) {
+            log.error("查询异常,", e.getMessage());
+            e.printStackTrace();
+        }
+        return Result.error("查询失败");
+    }
+
+    /**
+     * 查询加上探索历史
+     */
+    @PostMapping(value = "/historyList")
+    public Result<Object> historyList(@RequestBody JSONObject request) {
+        try {
+            return kuaishouReportDailyExploreService.historyList(request);
+        } catch (Exception e) {
+            log.error("查询异常,", e.getMessage());
+            e.printStackTrace();
+        }
+        return Result.error("查询失败");
+    }
+
+
+    /**
+     * 批量开启
+     */
+    @PostMapping(value = "/openBudgets")
+    public Result<Object> openBudgets(@RequestBody JSONObject request) {
+        try {
+            JSONArray unitIds = request.getJSONArray("unitIds");
+            Long accountId = request.getLong("accountId");
+            Long exploreBudget = request.getLong("exploreBudget");
+            if (Check.isNull(accountId) || Check.isNull(exploreBudget)) {
+                return Result.error("缺少参数");
+            }
+            return kuaishouReportDailyExploreService.openBudgets(accountId, unitIds, exploreBudget);
+        } catch (Exception e) {
+            log.error("查询异常,", e.getMessage());
+            e.printStackTrace();
+        }
+        return Result.error("查询失败");
     }
 
     /**

+ 15 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/KuaishouReportDailyExploreMapper.java

@@ -1,7 +1,11 @@
 package cn.com.ctop.kuaishou.modules.report.mapper;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyExplore;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * 广告组加速探索报表
@@ -12,4 +16,15 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
 public interface KuaishouReportDailyExploreMapper extends BaseMapper<KuaishouReportDailyExplore> {
 
+    List<KuaishouReportDailyExplore> getUnitListByStudyStatus();
+
+    List<JSONObject> getTodaylist(@Param("accountId") Long accountId, @Param("sortCode") String sortCode, @Param("sortType") String sortType);
+
+    Long getTodaylistTotal(@Param("accountId") Long accountId);
+
+    List<JSONObject> getHistoryList(@Param("request") JSONObject request, @Param("sortCode") String sortCode, @Param("sortType") String sortType);
+
+    Long getHistoryListTotal(@Param("request") JSONObject request);
+
+    List<Long> getUnitIds(@Param("accountId") Long accountId);
 }

+ 98 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyExploreMapper.xml

@@ -2,4 +2,102 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyExploreMapper">
 
+    <select id="getUnitListByStudyStatus"
+            resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyExplore">
+        SELECT account_id, unit_id
+        FROM ctop_kuaishou_report_daily_explore
+        WHERE explore_status IN (0, 1)
+    </select>
+
+    <select id="getTodaylistTotal" resultType="java.lang.Long">
+        SELECT count(1)
+        FROM ctop_kuaishou_group
+        WHERE account_id = #{accountId}
+          AND put_status = 1
+          AND study_status = 1
+          AND unit_id NOT IN (
+            SELECT unit_id FROM ctop_kuaishou_report_daily_explore WHERE account_id = #{accountId}
+        )
+
+    </select>
+
+    <select id="getTodaylist" resultType="com.alibaba.fastjson.JSONObject">
+        SELECT
+        t2.unit_id,
+        t2.unit_name,
+        IFNULL(charge,'-') as 'charge',
+        IFNULL(activation,'-') as 'activation',
+        IFNULL(ROUND(charge/activation,2),'-') as 'activationCost',
+        IFNULL(event_pay,'-') as 'eventPay',
+        IFNULL(ROUND(charge/event_pay,2),'-') as 'eventPayCost',
+        IFNULL(event_register,'-') as 'eventRegister',
+        IFNULL(ROUND(charge/event_register,2),'-') as 'eventRegisterCost',
+        IFNULL(aclick,'-') as 'aclick'
+        FROM ctop_etl_kuaishou_group_daily_report t1
+        Right JOIN (
+        SELECT unit_id,unit_name FROM ctop_kuaishou_group WHERE account_id = #{accountId} AND unit_id NOT IN (
+        SELECT unit_id FROM ctop_kuaishou_report_daily_explore WHERE account_id = #{accountId}
+        )
+        AND put_status = 1
+        AND study_status = 1
+        ) t2 ON t1.unit_id = t2.unit_id
+        AND stat_date = DATE_FORMAT(now(),'%Y-%m-%d')
+        <if test="sortCode != '' and sortCode != null ">
+            ORDER BY ${sortCode} ${sortType}
+        </if>
+    </select>
+
+    <select id="getHistoryListTotal" resultType="java.lang.Long">
+        SELECT count(1)
+        FROM ctop_kuaishou_report_daily_explore
+        WHERE account_id = #{request.accountId}
+          AND stat_date &gt;= CONCAT(#{request.startTime}, ' 00:00:01')
+          AND stat_date &lt;= CONCAT(#{request.endTime}, ' 23:59:59')
+    </select>
+
+    <select id="getHistoryList" resultType="cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyExplore">
+        SELECT
+        id,
+        account_id,
+        unit_id,
+        unit_name,
+        explore_budget,
+        ocpx_action_type,
+        total_charge,
+        impression,
+        photo_click,
+        click,
+        unified_conversion,
+        unitfied_conversion_cost,
+        stat_date,
+        explore_status
+        FROM ctop_kuaishou_report_daily_explore
+        WHERE account_id = #{request.accountId}
+        AND stat_date &gt;= CONCAT(#{request.startTime},' 00:00:01')
+        AND stat_date &lt;= CONCAT(#{request.endTime},' 23:59:59')
+        <if test="request.unitId != null">
+            AND unit_id = #{request.unitId}
+        </if>
+        <if test="request.unitName != null">
+            AND LOCATE(#{request.unitName},unit_name)
+        </if>
+        <if test="request.exploreStatus != null ">
+            AND explore_status = #{request.exploreStatus}
+        </if>
+        <if test="sortCode != '' and sortCode != null ">
+            ORDER BY ${sortCode} ${sortType}
+        </if>
+    </select>
+
+    <select id="getUnitIds" resultType="java.lang.Long">
+        SELECT unit_id
+        FROM ctop_kuaishou_group
+        WHERE account_id = #{accountId}
+          AND put_status = 1
+          AND study_status = 1
+          AND unit_id NOT IN (
+            SELECT unit_id FROM ctop_kuaishou_report_daily_explore WHERE account_id = #{accountId}
+        )
+    </select>
+
 </mapper>

+ 14 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/IKuaishouReportDailyExploreService.java

@@ -1,7 +1,12 @@
 package cn.com.ctop.kuaishou.modules.report.service;
 
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyExplore;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.common.api.vo.Result;
+
+import java.util.List;
 
 /**
  * 广告组加速探索报表
@@ -11,4 +16,13 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IKuaishouReportDailyExploreService extends IService<KuaishouReportDailyExplore> {
 
+    void getExploreUnitReports(Long accountId, Long unitId);
+
+    List<KuaishouReportDailyExplore> getUnitListByStudyStatus();
+
+    Result<Object> todaylist(JSONObject request);
+
+    Result<Object> historyList(JSONObject request);
+
+    Result<Object> openBudgets(Long accountId, JSONArray unitIds,Long exploreBudget);
 }

+ 1 - 3
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouGroupExploreServiceImpl.java

@@ -218,7 +218,7 @@ public class KuaishouGroupExploreServiceImpl extends ServiceImpl<KuaishouGroupEx
                         kuaishouGroupExplore.setId(one.getId());
                     }
                     KuaiShouGroup kuaiShouGroup = kuaiShouGroupService.selectGroupByUnitId(accountId, unitId);
-                    if(!Check.isNull(kuaiShouGroup)){
+                    if (!Check.isNull(kuaiShouGroup)) {
                         kuaishouGroupExplore.setUnitName(kuaiShouGroup.getUnitName());
                         kuaishouGroupExplore.setCampaignId(kuaiShouGroup.getCampaignId());
                     }
@@ -322,6 +322,4 @@ public class KuaishouGroupExploreServiceImpl extends ServiceImpl<KuaishouGroupEx
         }
         return Result.error("辅助探索失败");
     }
-
-
 }

+ 152 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouReportDailyExploreServiceImpl.java

@@ -1,11 +1,25 @@
 package cn.com.ctop.kuaishou.modules.report.service.impl;
 
+import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.kuaishou.modules.app.entity.KuaishouAccountBalanceBudget;
+import cn.com.ctop.kuaishou.modules.app.mapper.KuaishouAccountBalanceBudgetMapper;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupService;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyExplore;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyExploreMapper;
+import cn.com.ctop.kuaishou.modules.report.service.IKuaishouGroupExploreService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyExploreService;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.util.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * 广告组加速探索报表
  *
@@ -16,4 +30,142 @@ import org.springframework.stereotype.Service;
 @Service
 public class KuaishouReportDailyExploreServiceImpl extends ServiceImpl<KuaishouReportDailyExploreMapper, KuaishouReportDailyExplore> implements IKuaishouReportDailyExploreService {
 
+    @Autowired
+    private KuaishouReportDailyExploreMapper reportDailyExploreMapper;
+
+    @Autowired
+    private KuaishouAccountBalanceBudgetMapper kuaishouAccountBalanceBudgetMapper;
+
+    @Autowired
+    private IKuaishouGroupExploreService kuaishouGroupExploreService;
+
+    @Autowired
+    private IKuaiShouGroupService kuaiShouGroupService;
+
+    @Override
+    public void getExploreUnitReports(Long accountId, Long unitId) {
+        Result<Object> result = kuaishouGroupExploreService.unitExploreInfoGet(accountId, unitId);
+        if (result.getCode() == 200) {
+            JSONObject resultResult = (JSONObject) result.getResult();
+            if (!Check.isNull(resultResult)) {
+                kuaishouGroupExploreService.querySpeedExploreReport(accountId, unitId, resultResult.getInteger("explore_status"), resultResult.getLong("max_explore_budget"));
+            }
+        }
+    }
+
+    @Override
+    public List<KuaishouReportDailyExplore> getUnitListByStudyStatus() {
+        return reportDailyExploreMapper.getUnitListByStudyStatus();
+    }
+
+    @Override
+    public Result<Object> todaylist(JSONObject request) {
+        Integer pageNo = request.getInteger("pageNo");
+        Integer pageSize = request.getInteger("pageSize");
+        if (Check.isNull(pageNo)) {
+            pageNo = 1;
+        }
+        if (Check.isNull(pageSize)) {
+            pageSize = 10;
+        }
+        Long accountId = request.getLong("accountId");
+        if (Check.isNull(accountId)) {
+            return Result.error("未选择账户");
+        }
+        String sortCode = request.getString("sortCode");
+        String sortType = request.getString("sortType");
+        if (Check.isNull(sortCode)) {
+            sortCode = "charge";
+        }
+        if (Check.isNull(sortType)) {
+            sortType = "DESC";
+        }
+        Long total = reportDailyExploreMapper.getTodaylistTotal(accountId);
+        PageHelper.startPage(pageNo, pageSize, false);
+        PageInfo pageInfo = new PageInfo(reportDailyExploreMapper.getTodaylist(accountId, sortCode, sortType));
+        pageInfo.setTotal(total);
+        JSONObject result = new JSONObject();
+        result.put("pageInfo", pageInfo);
+        KuaishouAccountBalanceBudget balanceBudget = kuaishouAccountBalanceBudgetMapper.queryByAccountId(accountId);
+        if (!Check.isNull(balanceBudget)) {
+            result.put("dayBudget", balanceBudget.getDayBudget());
+        }
+        return Result.ok(result);
+    }
+
+    @Override
+    public Result<Object> historyList(JSONObject request) {
+        Integer pageNo = request.getInteger("pageNo");
+        Integer pageSize = request.getInteger("pageSize");
+        if (Check.isNull(pageNo)) {
+            pageNo = 1;
+        }
+        if (Check.isNull(pageSize)) {
+            pageSize = 10;
+        }
+        Long accountId = request.getLong("accountId");
+        if (Check.isNull(accountId)) {
+            return Result.error("未选择账户");
+        }
+        String sortCode = request.getString("sortCode");
+        String sortType = request.getString("sortType");
+        if (Check.isNull(sortCode)) {
+            sortCode = "total_charge";
+        }
+        if (Check.isNull(sortType)) {
+            sortType = "DESC";
+        }
+        if (Check.isNull(request.getString("startTime"))) {
+            request.put("startTime", DateUtils.getNowDate("yyyy-MM-dd"));
+            request.put("endTime", DateUtils.getNowDate("yyyy-MM-dd"));
+        }
+        Long total = reportDailyExploreMapper.getHistoryListTotal(request);
+        PageHelper.startPage(pageNo, pageSize, false);
+        PageInfo pageInfo = new PageInfo(reportDailyExploreMapper.getHistoryList(request, sortCode, sortType));
+        pageInfo.setTotal(total);
+        JSONObject result = new JSONObject();
+        result.put("pageInfo", pageInfo);
+        KuaishouAccountBalanceBudget balanceBudget = kuaishouAccountBalanceBudgetMapper.queryByAccountId(accountId);
+        if (!Check.isNull(balanceBudget)) {
+            result.put("dayBudget", balanceBudget.getDayBudget());
+        }
+        return Result.ok(result);
+    }
+
+    @Override
+    public Result<Object> openBudgets(Long accountId, JSONArray unitIds, Long exploreBudget) {
+        try {
+            StringBuilder errUnitIds = new StringBuilder();
+            if (Check.isNull(unitIds) || unitIds.isEmpty()) {
+                List<Long> unitids = reportDailyExploreMapper.getUnitIds(accountId);
+                for (Long unitid : unitids) {
+                    Result<Object> result = kuaishouGroupExploreService.unitExploreBudgetUpdate(accountId, unitid, exploreBudget);
+                    if (result.getCode() != 200) {
+                        if (errUnitIds.length() > 0) {
+                            errUnitIds.append(",");
+                        }
+                        errUnitIds.append(unitid);
+                    }
+                }
+            } else {
+                for (int i = 0; i < unitIds.size(); i++) {
+                    Long unitId = unitIds.getLong(i);
+                    Result<Object> result = kuaishouGroupExploreService.unitExploreBudgetUpdate(accountId, unitId, exploreBudget);
+                    if (result.getCode() != 200) {
+                        if (errUnitIds.length() > 0) {
+                            errUnitIds.append(",");
+                        }
+                        errUnitIds.append(unitId);
+                    }
+                }
+            }
+            if (errUnitIds.length() > 0) {
+                return Result.ok(errUnitIds.insert(0, "启动完成,其中广告组:").append("启动失败"));
+            }
+            return Result.ok("全部启动完成");
+        } catch (Exception e) {
+            log.error("启动加速探索异常", e);
+            return Result.error("启动加速探索失败");
+        }
+    }
 }

+ 122 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ProjectMemberController.java

@@ -151,6 +151,122 @@ public class ProjectMemberController {
         return map;
     }
 
+    /**
+     * 获取项目以及账户信息
+     *
+     * @param requestJson
+     * @return
+     */
+    @PostMapping(value = "/getProductProjectAndAccountList")
+    public Result<List<JSONObject>> getProductProjectAndAccountList(@RequestBody JSONObject requestJson) {
+        Result<List<JSONObject>> result = new Result<>();
+        try {
+            String userId = requestJson.getString("userId");
+            if (Check.isNull(userId)) {
+                throw new Exception("请选择userId");
+            }
+            List<Integer> mediaIds = new ArrayList<>();
+            //查询用户角色
+            String roleCode = sysRoleService.getRoleCodeByUserId(userId);
+            //角色为 管理员 || 销售 || 媒介 查询全部
+            if ("admin".equals(roleCode) || roleCode.contains("sale") || "meidaManager".equals(roleCode)) {
+                userId = null;
+            }
+            //查询项目信息以及广告主
+            List<JSONObject> projectList = projectMemberService.getProjectByUserIdAndMediaIds(userId, mediaIds);
+            List<JSONObject> haveList = new ArrayList<>();
+            List<JSONObject> list = new ArrayList<>();
+            if (!Check.isNull(projectList)) {
+                list = projectService.queryProductInfo(projectList);
+                if (Check.isNull(list)) {
+                    result.setSuccess(false);
+                    result.setMessage("该用户没有可用的产品");
+                    return result;
+                }
+                //项目id 查询账户人员信息
+                Map<Long, List<JSONObject>> accountMap = userAllocationService.getAccountListByProjectList(projectList);
+                for (int i = 0; i < projectList.size(); i++) {
+                    JSONObject project = projectList.get(i);
+                    if (!Check.isNull(project)) {
+                        List<JSONObject> accountList = accountMap.get(project.getLong("projectId"));
+                        if (!Check.isNull(accountList)) {
+                            project.put("accountList", accountList);
+                            haveList.add(project);
+                        }
+                    }
+                }
+
+                for (JSONObject object : list) {
+                    List<JSONObject> proList = new ArrayList<>();
+                    for (JSONObject have : haveList) {
+                        if (object.getLong("productId") == have.getLong("productId")) {
+                            proList.add(have);
+                        }
+                    }
+                    object.put("projectList", proList);
+                }
+            }
+            result.setSuccess(true);
+            result.setResult(list);
+        } catch (Exception e) {
+            e.printStackTrace();
+            result.setSuccess(false);
+            result.setMessage(e.getMessage());
+        }
+        return result;
+    }
+
+    /**
+     * 获取项目以及账户信息
+     *
+     * @param requestJson
+     * @return
+     */
+    @PostMapping(value = "/getProductProjectList")
+    public Result<List<JSONObject>> getProductProjectList(@RequestBody JSONObject requestJson) {
+        Result<List<JSONObject>> result = new Result<>();
+        try {
+            String userId = requestJson.getString("userId");
+            if (Check.isNull(userId)) {
+                throw new Exception("请选择userId");
+            }
+            List<Integer> mediaIds = new ArrayList<>();
+            //查询用户角色
+            String roleCode = sysRoleService.getRoleCodeByUserId(userId);
+            //角色为 管理员 || 销售 || 媒介 查询全部
+            if ("admin".equals(roleCode) || roleCode.contains("sale") || "meidaManager".equals(roleCode)) {
+                userId = null;
+            }
+            //查询项目信息以及广告主
+            List<JSONObject> projectList = projectMemberService.getProjectByUserIdAndMediaIds(userId, mediaIds);
+            List<JSONObject> list = new ArrayList<>();
+            if (!Check.isNull(projectList)) {
+                list = projectService.queryProductInfo(projectList);
+                if (Check.isNull(list)) {
+                    result.setSuccess(false);
+                    result.setMessage("该用户没有可用的产品");
+                    return result;
+                }
+                for (JSONObject object : list) {
+                    List<JSONObject> proList = new ArrayList<>();
+                    for (JSONObject have : projectList) {
+                        if (object.getLong("productId") == have.getLong("productId")) {
+                            proList.add(have);
+                        }
+                    }
+                    object.put("projectList", proList);
+                }
+            }
+            result.setSuccess(true);
+            result.setResult(list);
+        } catch (Exception e) {
+            e.printStackTrace();
+            result.setSuccess(false);
+            result.setMessage(e.getMessage());
+        }
+        return result;
+    }
+
 
     /**
      * 获取项目以及账户信息
@@ -191,10 +307,12 @@ public class ProjectMemberController {
                 Map<Long, List<JSONObject>> accountMap = userAllocationService.getAccountListByProjectList(projectList);
                 for (int i = 0; i < projectList.size(); i++) {
                     JSONObject project = projectList.get(i);
-                    List<JSONObject> accountList = accountMap.get(project.getLong("projectId"));
-                    if (!Check.isNull(accountList)) {
-                        project.put("accountList", accountList);
-                        haveList.add(project);
+                    if (!Check.isNull(project)) {
+                        List<JSONObject> accountList = accountMap.get(project.getLong("projectId"));
+                        if (!Check.isNull(accountList)) {
+                            project.put("accountList", accountList);
+                            haveList.add(project);
+                        }
                     }
                 }
             }

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/ProjectMemberMapper.xml

@@ -244,6 +244,7 @@
         select
         t2.id as 'projectId',
         t2.project_name as 'projectName',
+        t2.product_id as 'productId',
         (select name from ctop_advertiser where id = t2.advertiser_id) as 'advertiserName'
         from ctop_project_member t1
         left join ctop_project t2