lyhzzz 9 bulan lalu
induk
melakukan
668a40b6b0

+ 2 - 0
src/main/java/com/fdkankan/manage/service/IJyPlatformUserWaitService.java

@@ -20,4 +20,6 @@ public interface IJyPlatformUserWaitService extends IService<JyPlatformUserWait>
     void del(Integer id);
     void del(Integer id);
 
 
     List<JyPlatformUserWait> getByQueryKey(String queryKey);
     List<JyPlatformUserWait> getByQueryKey(String queryKey);
+
+    void updatePlatformId(Integer id, Integer loginPlatformId);
 }
 }

+ 8 - 0
src/main/java/com/fdkankan/manage/service/impl/JyPlatformUserWaitServiceImpl.java

@@ -42,4 +42,12 @@ public class JyPlatformUserWaitServiceImpl extends ServiceImpl<IJyPlatformUserWa
         wrapper.eq(JyPlatformUserWait::getName,queryKey);
         wrapper.eq(JyPlatformUserWait::getName,queryKey);
         return this.list(wrapper);
         return this.list(wrapper);
     }
     }
+
+    @Override
+    public void updatePlatformId(Integer id, Integer loginPlatformId) {
+        LambdaUpdateWrapper<JyPlatformUserWait> wrapper = new LambdaUpdateWrapper<>();
+        wrapper.eq(JyPlatformUserWait::getId,id);
+        wrapper.set(JyPlatformUserWait::getPlatformId,loginPlatformId);
+        this.update(wrapper);
+    }
 }
 }

+ 8 - 1
src/main/java/com/fdkankan/manage/service/impl/JyUserPlatformServiceImpl.java

@@ -66,6 +66,14 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
         }
         param.setPlatformId(loginPlatformId);
         param.setPlatformId(loginPlatformId);
+        if(param.getStatus() == null){
+            JyPlatformUserWait jyPlatformUserWait = platformUserWaitService.getById(param.getId());
+            if(jyPlatformUserWait!= null){
+                platformUserWaitService.updatePlatformId(jyPlatformUserWait.getId(),loginPlatformId);
+            }
+            return;
+        }
+
         JyUser jyUser = jyUserService.getById(param.getId());
         JyUser jyUser = jyUserService.getById(param.getId());
         SysUser byId = sysUserService.getById(jyUser.getSysUserId());
         SysUser byId = sysUserService.getById(jyUser.getSysUserId());
         if(byId.getRoleId() != 47L ){
         if(byId.getRoleId() != 47L ){
@@ -157,7 +165,6 @@ public class JyUserPlatformServiceImpl extends ServiceImpl<IJyUserPlatformMapper
         if(jyPlatformUserWait != null){
         if(jyPlatformUserWait != null){
             JyUserPlatform jyUserPlatform = new JyUserPlatform();
             JyUserPlatform jyUserPlatform = new JyUserPlatform();
             BeanUtils.copyProperties(jyPlatformUserWait,jyUserPlatform);
             BeanUtils.copyProperties(jyPlatformUserWait,jyUserPlatform);
-            jyUserPlatform.setId(null);
             jyUserPlatforms.add(jyUserPlatform);
             jyUserPlatforms.add(jyUserPlatform);
         }
         }
 
 

+ 1 - 0
src/main/java/com/fdkankan/manage/vo/request/JyUserPlatformAddParam.java

@@ -11,4 +11,5 @@ public class JyUserPlatformAddParam {
     //导入参数
     //导入参数
     private String name;
     private String name;
     private String idCard;
     private String idCard;
+    private Integer status;
 }
 }