lyhzzz hai 9 meses
pai
achega
dad0695c69

+ 1 - 0
src/main/java/com/fdkankan/manage/service/IJyUserService.java

@@ -40,6 +40,7 @@ public interface IJyUserService extends IService<JyUser> {
     JyUser getByIdCard(String idCard);
 
     void updatePlatformId(Integer id, Integer id1);
+    void updatePlatformIdByPlatformId(Integer id, Integer id1);
 
     List<Long> getByUserIdPlatform(Integer loginPlatformId);
 

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

@@ -186,7 +186,7 @@ public class JyPlatformServiceImpl extends ServiceImpl<IJyPlatformMapper, JyPlat
         //update userRole
         if(jyUser != null){
             sysUserService.updateRoleId(jyUser.getSysUserId(),47L);
-            jyUserService.updatePlatformId(jyUser.getId(),param.getToPlatformId());
+            jyUserService.updatePlatformIdByPlatformId(param.getId(),param.getToPlatformId());
         }
         this.updateStatus(jyPlatform.getId(),1);
 

+ 7 - 0
src/main/java/com/fdkankan/manage/service/impl/JyUserServiceImpl.java

@@ -129,6 +129,13 @@ public class JyUserServiceImpl extends ServiceImpl<IJyUserMapper, JyUser> implem
         this.update(wrapper);
     }
 
+    public void updatePlatformIdByPlatformId(Integer id, Integer id1) {
+        LambdaUpdateWrapper<JyUser> wrapper = new LambdaUpdateWrapper<>();
+        wrapper.eq(JyUser::getPlatformId,id);
+        wrapper.set(JyUser::getPlatformId,id1);
+        this.update(wrapper);
+    }
+
     @Override
     public List<Long> getByUserIdPlatform(Integer loginPlatformId) {
         LambdaQueryWrapper<JyUser> wrapper = new LambdaQueryWrapper<>();