Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

zhaoxian 4 tahun lalu
induk
melakukan
8e9a1ac53b
15 mengubah file dengan 103 tambahan dan 49 penghapusan
  1. 22 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaishouAdvertiserStrategyController.java
  2. 7 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ProjectMemberServiceImpl.java
  3. 9 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/TransferAccountServiceImpl.java
  4. 8 8
      jeecg-boot-module-system/src/main/resources/application-wps.yml
  5. 2 6
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  6. 3 3
      module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceDailyMaterialReportJob.java
  7. 16 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouMaterialControer.java
  8. 3 5
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/entity/AiKuaishouAdvertiserStrategy.java
  9. 2 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/IAiKuaishouAdvertiserStrategyService.java
  10. 9 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouAdvertiserStrategyServiceImpl.java
  11. 3 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml
  12. 9 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaishouVideoRelateCreativesMapper.xml
  13. 4 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java
  14. 3 3
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceReportMaterialDailyMapper.java
  15. 3 3
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceReportMaterialDailyMapper.xml

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

@@ -1,5 +1,6 @@
-package cn.com.ctop.kuaishou.modules.ai.controller;
+package org.jeecg.modules.ctop.controller;
 
+import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.QueryGenerator;
@@ -13,7 +14,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 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.vo.LoginUser;
+import org.jeecg.modules.system.service.ISysRoleService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -33,7 +37,8 @@ import java.util.*;
 public class AiKuaishouAdvertiserStrategyController {
     @Autowired
     private IAiKuaishouAdvertiserStrategyService aiKuaishouAdvertiserStrategyService;
-
+    @Autowired
+    private ISysRoleService sysRoleService;
     /**
      * 分页列表查询
      *
@@ -51,6 +56,11 @@ public class AiKuaishouAdvertiserStrategyController {
                                                                      HttpServletRequest req) {
         Result<IPage<AiKuaishouAdvertiserStrategy>> result = new Result<>();
         QueryWrapper<AiKuaishouAdvertiserStrategy> queryWrapper = QueryGenerator.initQueryWrapper(aiKuaishouAdvertiserStrategy, req.getParameterMap());
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        String roleCode = sysRoleService.getRoleCodeByUserId(user.getId());
+        if(!CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode)){
+            queryWrapper.eq("user_id", user.getId());
+        }
         Page<AiKuaishouAdvertiserStrategy> page = new Page<>(pageNo, pageSize);
         queryWrapper.orderByDesc("id");
         IPage<AiKuaishouAdvertiserStrategy> pageList = aiKuaishouAdvertiserStrategyService.page(page, queryWrapper);
@@ -86,6 +96,16 @@ public class AiKuaishouAdvertiserStrategyController {
     public Result<AiKuaishouAdvertiserStrategy> add(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
         Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
         try {
+            Long accountId = aiKuaishouAdvertiserStrategy.getAccountId();
+            AiKuaishouAdvertiserStrategy getEntity = aiKuaishouAdvertiserStrategyService.getByAccountId(accountId);
+            if(null!=getEntity){
+                result.error500("该账户配置信息已经被创建");
+                return result;
+            }
+            UserAllocation allocation = allocationService.getByAccountId(accountId);
+            if(null!=allocation){
+                aiKuaishouAdvertiserStrategy.setUserId(allocation.getUserId());
+            }
             Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
             if (null != singleAppId && singleAppId == 1) {
                 Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));

+ 7 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ProjectMemberServiceImpl.java

@@ -355,12 +355,12 @@ public class ProjectMemberServiceImpl extends ServiceImpl<ProjectMemberMapper, P
             if (!Check.isNull(projectJson.getString("advertiserId"))) {
                 advertiserIdMap.put(projectJson.getString("advertiserId"), projectJson.getString("advertiserId"));
             }
-            if (!Check.isNull(projectJson.getString("productId"))) {
+            if (!Check.isNull(projectJson.getLong("productId"))) {
                 productIdMap.put(projectJson.getLong("productId"), projectJson.getLong("productId"));
             }
         }
         Map<String, String> userMap = new HashMap<>();
-        if (!Check.isNull(userIdMap)) {
+        if (!Check.isNullMap(userIdMap)) {
             List<JSONObject> userList = userService.getUserMapByMap(userIdMap);
             if (!Check.isNull(userList)) {
                 for (int i = 0; i < userList.size(); i++) {
@@ -370,7 +370,7 @@ public class ProjectMemberServiceImpl extends ServiceImpl<ProjectMemberMapper, P
             }
         }
         Map<String, String> advertiserMap = new HashMap<>();
-        if (!Check.isNull(advertiserIdMap)) {
+        if (!Check.isNullMap(advertiserIdMap)) {
             List<JSONObject> advertiserList = advertiserService.getAdvertiserByMap(advertiserIdMap);
             if (!Check.isNull(advertiserList)) {
                 for (int i = 0; i < advertiserList.size(); i++) {
@@ -380,7 +380,7 @@ public class ProjectMemberServiceImpl extends ServiceImpl<ProjectMemberMapper, P
             }
         }
         Map<Long, String> productMap = new HashMap<>();
-        if (!Check.isNull(productIdMap)) {
+        if (!Check.isNullMap(productIdMap)) {
             List<JSONObject> productList = productService.getProductByMap(productIdMap);
             if (!Check.isNull(productList)) {
                 for (int i = 0; i < productList.size(); i++) {
@@ -399,18 +399,18 @@ public class ProjectMemberServiceImpl extends ServiceImpl<ProjectMemberMapper, P
             member.setMaxBid(projectJson.getLong("maxBid"));
             String advertiserId = projectJson.getString("advertiserId");
             member.setAdvertiserId(advertiserId);
-            if (!Check.isNull(advertiserMap)) {
+            if (!Check.isNullMap(advertiserMap)) {
                 member.setAdvertiserName(advertiserMap.get(advertiserId));
             }
             String responsibleId = projectJson.getString("responsibleId");
             String designResponsibleId = projectJson.getString("designResponsibleId");
-            if (!Check.isNull(userMap)) {
+            if (!Check.isNullMap(userMap)) {
                 member.setResponsibleName(userMap.get(responsibleId));
                 member.setDesignResponsibleName(userMap.get(designResponsibleId));
             }
             Long productId = projectJson.getLong("productId");
             member.setProductId(productId);
-            if (!Check.isNull(productMap)) {
+            if (!Check.isNullMap(productMap)) {
                 member.setProductName(productMap.get(productId));
             }
         }

+ 9 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/TransferAccountServiceImpl.java

@@ -83,7 +83,7 @@ public class TransferAccountServiceImpl extends ServiceImpl<TransferAccountMappe
             }
         }
         Map<String, String> userMap = new HashMap<>();
-        if (!Check.isNull(userIdMap)) {
+        if (!Check.isNullMap(userIdMap)) {
             List<JSONObject> userList = userService.getUserMapByMap(userIdMap);
             if (!Check.isNull(userList)) {
                 for (int i = 0; i < userList.size(); i++) {
@@ -93,7 +93,7 @@ public class TransferAccountServiceImpl extends ServiceImpl<TransferAccountMappe
             }
         }
         Map<String, String> advertiserMap = new HashMap<>();
-        if (!Check.isNull(advertiserIdMap)) {
+        if (!Check.isNullMap(advertiserIdMap)) {
             List<JSONObject> advertiserList = advertiserService.getAdvertiserByMap(advertiserIdMap);
             if (!Check.isNull(advertiserList)) {
                 for (int i = 0; i < advertiserList.size(); i++) {
@@ -103,7 +103,7 @@ public class TransferAccountServiceImpl extends ServiceImpl<TransferAccountMappe
             }
         }
         Map<Long, String> productMap = new HashMap<>();
-        if (!Check.isNull(productIdMap)) {
+        if (!Check.isNullMap(productIdMap)) {
             List<JSONObject> productList = productService.getProductByMap(productIdMap);
             if (!Check.isNull(productList)) {
                 for (int i = 0; i < productList.size(); i++) {
@@ -113,7 +113,7 @@ public class TransferAccountServiceImpl extends ServiceImpl<TransferAccountMappe
             }
         }
         Map<Long, Integer> transferMap = new HashMap<>();
-        if (!Check.isNull(projectIdMap)) {
+        if (!Check.isNullMap(projectIdMap)) {
             List<JSONObject> transferList = transferAccountMapper.getListByMap(projectIdMap);
             if (!Check.isNull(transferList)) {
                 for (int i = 0; i < transferList.size(); i++) {
@@ -124,21 +124,21 @@ public class TransferAccountServiceImpl extends ServiceImpl<TransferAccountMappe
         }
 
         for (Project project : records) {
-            if (!Check.isNull(advertiserMap)) {
+            if (!Check.isNullMap(advertiserMap)) {
                 project.setAdvertiserId_dictText(advertiserMap.get(project.getAdvertiserId()));
             }
-            if (!Check.isNull(userMap)) {
+            if (!Check.isNullMap(userMap)) {
                 project.setResponsibleId_dictText(userMap.get(project.getResponsibleId()));
                 project.setDesignResponsibleId_dictText(userMap.get(project.getDesignResponsibleId()));
                 project.setSaleId_dictText(userMap.get(project.getSaleId()));
             }
-            if (!Check.isNull(productMap)) {
+            if (!Check.isNullMap(productMap)) {
                 project.setProductId_dictText(productMap.get(project.getProductId()));
             }
-            if (!Check.isNull(transferMap)) {
+            if (!Check.isNullMap(transferMap)) {
                 project.setNeedExamine(transferMap.get(project.getId()));
             }
-            if (!Check.isNull(supplierMap)) {
+            if (!Check.isNullMap(supplierMap)) {
                 project.setSupplierCode_dictText(supplierMap.get(project.getSupplierCode()));
             }
         }

+ 8 - 8
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -95,16 +95,16 @@ spring:
         # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
-#        master:
-#          url: jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
-#          username: hcst
-#          password: hcst@2020
-#          driver-class-name: com.mysql.jdbc.Driver
         master:
-          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: data
-          password: hcst@2021
+          url: jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
+          username: hcst
+          password: hcst@2020
           driver-class-name: com.mysql.jdbc.Driver
+#        master:
+#          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#          username: data
+#          password: hcst@2021
+#          driver-class-name: com.mysql.jdbc.Driver
   #redis 配置
   redis:
     database: 0

+ 2 - 6
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -387,7 +387,8 @@ public class SampleTest {
     private IByteDanceVideoReportDailyService videoReportDailyService;
 
     @Test
-    public void formatVideoReportData() {
+    synchronized public void formatVideoReportData() {
+
         for (int i = 1; i < 45; i++) {
             Date getDate = DateUtils.addDay(new Date(), -i);
             String date = DateUtils.formatDate(getDate);
@@ -418,11 +419,6 @@ public class SampleTest {
     public void loadBDAccoutData() {
         CtopOauthToken token2 = tokenService.getTokenByAccountId(1674206482908163L);
         bytedanceReportService.bytedanceMaterialReport(token2, "2020-10-14", "2020-10-14");
-        bytedanceReportMaterialDailyMapper.updateImageReportCode();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
-        bytedanceReportMaterialDailyMapper.updateImageReportPlaneId();
-        bytedanceReportMaterialDailyMapper.updateImageReportPlaneName();
     }
 
     @Resource

+ 3 - 3
module-job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceDailyMaterialReportJob.java

@@ -57,6 +57,9 @@ public class BytedanceDailyMaterialReportJob {
                         bytedanceReportService.bytedanceVideoMaterialReport(token, date2, date2);
                         bytedanceReportService.bytedanceVideoMaterialReport(token, date, date);
                         XxlJobHelper.log("账户"+token.getAccountId() + "素材报表数据任务完成,任务时间:" + date + "~" + date2);
+                        bytedanceReportMaterialDailyMapper.updateImageReportCode(token.getAccountId());
+                        bytedanceReportMaterialDailyMapper.updateImageReportProjectId(token.getAccountId());
+                        bytedanceReportMaterialDailyMapper.updateImageReportProjectName(token.getAccountId());
                     } catch (Exception e) {
                         e.printStackTrace();
                     } finally {
@@ -70,9 +73,6 @@ public class BytedanceDailyMaterialReportJob {
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
-        bytedanceReportMaterialDailyMapper.updateImageReportCode();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
-        bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
         Long end = System.currentTimeMillis();
         XxlJobHelper.log("头条素材数据获取耗时:{}毫秒", end - start);
 

+ 16 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouMaterialControer.java

@@ -93,6 +93,7 @@ public class KuaiShouMaterialControer {
                 throw new Exception("未获取账号授权信息");
             }
             String appVersion = requestJson.getString("appVersion");
+            Integer channelType = requestJson.getInteger("channelType");
             KuaiShouVideoLastTime videoLastTime = lastTimeService.getById(accountId);
             Date startTime;
             Date endDate = new Date();
@@ -108,6 +109,9 @@ public class KuaiShouMaterialControer {
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = videoGetService.getVideoListByMap(requestMap);
             if (!Check.isNull(materialList)) {
                 for (int i = 0; i < materialList.size(); i++) {
@@ -171,6 +175,7 @@ public class KuaiShouMaterialControer {
                 throw new Exception("请输入查询条数");
             }
             String appVersion = requestJson.getString("appVersion");
+            Integer channelType = requestJson.getInteger("channelType");
             Map<String, Object> requestMap = new HashMap<>();
             requestMap.put("startTime", startDate);
             requestMap.put("endTime", endDate);
@@ -180,6 +185,9 @@ public class KuaiShouMaterialControer {
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = relateCreativesService.getVideoListByMap(requestMap);
             if (!Check.isNull(materialList)) {
                 materialList = videoGetService.getVideoInfoAndImageList(materialList);
@@ -234,10 +242,14 @@ public class KuaiShouMaterialControer {
             requestMap.put("startDate", startDate);
             requestMap.put("endDate", endDate);
             requestMap.put("accountId", accountId);
+            Integer channelType = requestJson.getInteger("channelType");
             requestMap.put("num", num);
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = relateCreativesService.getHistoryTopVideoList(requestMap);
             if (!Check.isNull(materialList)) {
                 materialList = videoGetService.getVideoInfoAndImageList(materialList);
@@ -289,6 +301,7 @@ public class KuaiShouMaterialControer {
                 throw new Exception("请输入查询结束时间");
             }
             String appVersion = requestJson.getString("appVersion");
+            Integer channelType = requestJson.getInteger("channelType");
             Map<String, Object> requestMap = new HashMap<>();
             requestMap.put("startTime", startTime);
             requestMap.put("endTime", endTime);
@@ -297,6 +310,9 @@ public class KuaiShouMaterialControer {
             if (!Check.isNull(appVersion)) {
                 requestMap.put("appVersion", appVersion);
             }
+            if (!Check.isNull(channelType)) {
+                requestMap.put("channelType", channelType);
+            }
             List<JSONObject> materialList = relateCreativesService.getVideoZeroListByMap(requestMap);
             if (!Check.isNull(materialList)) {
                 materialList = videoGetService.getVideoInfoAndImageList(materialList);

+ 3 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/entity/AiKuaishouAdvertiserStrategy.java

@@ -1,10 +1,6 @@
 package cn.com.ctop.kuaishou.modules.ai.entity;
 
-import cn.com.ctop.common.module.annotation.Dict;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -26,6 +22,8 @@ public class AiKuaishouAdvertiserStrategy {
 	private Long id;
 	/**账户ID*/
 	private Long accountId;
+	private String userId;
+	private Integer channelType;
 	/**策略状态 1-使用 0-停用*/
 	private Integer status;
 	/**客户要求的计划名称规范*/

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/IAiKuaishouAdvertiserStrategyService.java

@@ -11,4 +11,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IAiKuaishouAdvertiserStrategyService extends IService<AiKuaishouAdvertiserStrategy> {
 
+    AiKuaishouAdvertiserStrategy getByAccountId(Long accountId);
+
 }

+ 9 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouAdvertiserStrategyServiceImpl.java

@@ -3,6 +3,7 @@ package cn.com.ctop.kuaishou.modules.ai.service.impl;
 import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAdvertiserStrategy;
 import cn.com.ctop.kuaishou.modules.ai.mapper.AiKuaishouAdvertiserStrategyMapper;
 import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAdvertiserStrategyService;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
@@ -15,4 +16,12 @@ import org.springframework.stereotype.Service;
 @Service
 public class AiKuaishouAdvertiserStrategyServiceImpl extends ServiceImpl<AiKuaishouAdvertiserStrategyMapper, AiKuaishouAdvertiserStrategy> implements IAiKuaishouAdvertiserStrategyService {
 
+    @Override
+    public AiKuaishouAdvertiserStrategy getByAccountId(Long accountId) {
+        QueryWrapper<AiKuaishouAdvertiserStrategy>queryWrapper =new QueryWrapper<>();
+        queryWrapper.eq("account_id",accountId);
+        queryWrapper.orderByDesc("id");
+        queryWrapper.last("limit 1");
+        return this.getOne(queryWrapper);
+    }
 }

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

@@ -112,6 +112,9 @@
         <if test="endTime != null and endTime != '' ">
             and stat_date &lt;= #{endTime}
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and channel_type = #{channelType}
+        </if>
         <if test="appVersion != null and appVersion != '' ">
             and photo_name like concat(#{appVersion},'%')
         </if>

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

@@ -42,6 +42,9 @@
         <if test="endTime != null and endTime != '' ">
             and t1.stat_date &lt;= #{endTime}
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and t1.channel_type = #{channelType}
+        </if>
         <if test="appVersion != null and appVersion != '' ">
             and t1.photo_id in (
             select photo_id from ctop_kuaishou_video_get
@@ -70,6 +73,9 @@
         <if test="endTime != null and endTime != '' ">
             AND stat_date &lt;= #{endTime}
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and channel_type = #{channelType}
+        </if>
         <if test="appVersion != null and appVersion != '' ">
             and photo_id in (
             select photo_id from ctop_kuaishou_video_get
@@ -106,6 +112,9 @@
         <if test="appVersion != null and appVersion != '' ">
             and photo_name like concat(#{appVersion},'%')
         </if>
+        <if test="channelType != null and channelType != '' ">
+            and channel_type = #{channelType}
+        </if>
         and status = 0
         and signature is not null
         )

+ 4 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

@@ -688,9 +688,10 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
             //设定网址
             webDriver.get(KUAISHOU_BE_DOMAIN_HTTPS);
             //显示等待控制对象
+            webDriver.findElement(By.className("login-now-btn")).click();
             WebDriverWait webDriverWait = new WebDriverWait(webDriver, 10);
-            webDriverWait.until(ExpectedConditions.elementToBeClickable(By.cssSelector(".phone input"))).sendKeys(login.getAccountName());
-            webDriverWait.until(ExpectedConditions.elementToBeClickable(By.cssSelector(".password input"))).sendKeys(login.getPassword());
+            webDriverWait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[contains(@type,'text')]"))).sendKeys(login.getAccountName());
+            webDriverWait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[contains(@type,'password')]"))).sendKeys(login.getPassword());
             //点击登录
             webDriver.findElement(By.className("foot")).click();
             //等待2秒用于页面加载,保证Cookie响应全部获取。
@@ -711,7 +712,7 @@ public class KuaishouWebInterfaceServiceImpl implements IKuaishouWebInterfaceSer
                     }
                 }
                 webDriver.switchTo().frame(webDriver.findElement(By.tagName("iframe")));
-                webDriver.findElement(By.xpath("//div[@class='opArea']/span[@id='submit']")).click();
+                webDriver.findElement(By.xpath("//div[@class='ad-login-comp-btn']")).click();
             }
             Thread.sleep(3000L);
 

+ 3 - 3
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceReportMaterialDailyMapper.java

@@ -47,9 +47,9 @@ public interface BytedanceReportMaterialDailyMapper extends BaseMapper<Bytedance
 );
 
     void replaceImageBatch(@Param("infos")List<BytedanceReportMaterialDaily> bytedanceReportImageDailyList);
-    void updateImageReportCode();
-    void updateImageReportProjectId();
-    void updateImageReportProjectName();
+    void updateImageReportCode(@Param("accountId")Long accountId);
+    void updateImageReportProjectId(@Param("accountId")Long accountId);
+    void updateImageReportProjectName(@Param("accountId")Long accountId);
     void updateImageReportPlaneId();
     void updateImageReportPlaneName();
 

+ 3 - 3
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceReportMaterialDailyMapper.xml

@@ -320,17 +320,17 @@
 
     <update id="updateImageReportCode">
         update ctop_bytedance_report_image_daily a inner join ctop_bytedance_image_info image on image.material_id =a.material_id  set a.code = image.signature,a.image_url = image.image_url
-        where a.material_id is not null and a.code is null
+        where a.material_id is not null and a.code is null and a.account_id = #{accountId}
     </update>
 
     <update id="updateImageReportProjectId">
         update ctop_bytedance_report_image_daily a inner join ctop_user_allocation allocation on allocation.account_id =a.account_id  set a.project_id = allocation.project_id
-        where a.account_id is not null and a.project_id is null
+        where a.account_id is not null and a.project_id is null and a.account_id = #{accountId}
     </update>
 
     <update id="updateImageReportProjectName">
         update ctop_bytedance_report_image_daily a inner join ctop_project p on p.id =a.project_id  set a.project_name = p.project_name
-        where a.project_id is not null and a.project_name is null
+        where a.project_id is not null and a.project_name is null and a.account_id = #{accountId}
     </update>
 
     <update id="updateImageReportPlaneId">