From bed06f8cb091b5f34cd6987ccb3cb8bb7661b845 Mon Sep 17 00:00:00 2001 From: wjt Date: Thu, 24 Aug 2023 11:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=BF=E6=8D=A2=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agent/service/impl/ChannelManageServiceImpl.java | 11 ++++++++--- .../modules/system/service/impl/UserServiceImpl.java | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/agent/service/impl/ChannelManageServiceImpl.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/agent/service/impl/ChannelManageServiceImpl.java index cdec77fb..158cab45 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/agent/service/impl/ChannelManageServiceImpl.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/agent/service/impl/ChannelManageServiceImpl.java @@ -16,6 +16,7 @@ import com.baiye.modules.system.service.UserService; import com.baiye.util.PageUtil; import com.baiye.util.QueryHelp; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; @@ -32,6 +33,7 @@ import java.util.stream.Collectors; */ @Service @RequiredArgsConstructor +@Slf4j public class ChannelManageServiceImpl implements ChannelManageService { private final ChannelCustomRepository channelCustomRepository; private final UserService userService; @@ -156,6 +158,7 @@ public class ChannelManageServiceImpl implements ChannelManageService { channelCustom.setSurplusPhoneBill(0); channelCustom.setTotalPhoneBill(0); list.add(channelCustom); + log.info("撤回量:{},话费:{},id:{}", num, bill, channelCustom.getId()); if (channelCustom.getParentId() != null) { channelCustomRepository.updateSurplusNum(channelCustom.getParentId(), num, bill); } @@ -163,9 +166,11 @@ public class ChannelManageServiceImpl implements ChannelManageService { channelCustomRepository.saveAll(list); //同步系统 List userIdByIds = list.stream().map(ChannelCustom::getUserId).collect(Collectors.toList()); - userService.updateUserStatusByCompanyId(false, userIdByIds); - //踢出用户 - this.remoteAuthService.delete(new HashSet<>(userIdByIds)); + if (CollUtil.isNotEmpty(userIdByIds)) { + userService.updateUserStatusByCompanyId(false, userIdByIds); + //踢出用户 + this.remoteAuthService.delete(new HashSet<>(userIdByIds)); + } return CommonResponse.createBySuccess(); } diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/system/service/impl/UserServiceImpl.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/system/service/impl/UserServiceImpl.java index 3bfda2f9..3072d19d 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/system/service/impl/UserServiceImpl.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/system/service/impl/UserServiceImpl.java @@ -717,8 +717,8 @@ public class UserServiceImpl implements UserService { if (replaceUserId == null || replaceRoleIds.contains(RoleNumberConstants.MINUS_NINE_NUMBER)) { organizeUserRepository.deleteByUserId(userId); } else { - organizeUserRepository.updateUser(userId, replaceUserId); organizeUserRepository.deleteByUserId(replaceUserId); + organizeUserRepository.updateUser(userId, replaceUserId); } this.sourceDel(userId, replaceUserId); } else if (roleIds.contains(channelId)) {