|
|
|
@ -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<Long> 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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|