yumeng 5 gadi atpakaļ
vecāks
revīzija
a131790fde

+ 10 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdvertiserController.java

@@ -1,6 +1,8 @@
 package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.bytedance.mapper.MaterialReportMapper;
+import cn.com.ctop.common.module.entity.UserAllocation;
+import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.StringUtils;
 import com.alibaba.fastjson.JSON;
@@ -68,6 +70,8 @@ public class AdvertiserController {
     private ProjectMapper projectMapper;
     @Autowired
     private ProjectMemberMapper projectMemberMapper;
+    @Autowired
+    private IUserAllocationService userAllocationService;
 
 
     /**
@@ -160,6 +164,7 @@ public class AdvertiserController {
 
     @Autowired
     private ISysUserService sysUserService;
+
     /**
      * 添加
      *
@@ -226,6 +231,11 @@ public class AdvertiserController {
             Project updateProject = new Project();
             updateProject.setAdvertiserName(advertiser.getName());
             projectService.update(updateProject, projectQueryWrapper);
+            QueryWrapper<UserAllocation> userAllocationQueryWrapper = new QueryWrapper<>();
+            userAllocationQueryWrapper.eq("advertiser_id", advertiser.getId());
+            UserAllocation updateUserAllocation = new UserAllocation();
+            updateUserAllocation.setAdvertiserName(advertiser.getName());
+            userAllocationService.update(updateUserAllocation, userAllocationQueryWrapper);
             if (ok) {
                 result.success("修改成功!");
             }