|
|
|
@ -18,12 +18,12 @@ import com.baiye.modules.system.service.dto.*;
|
|
|
|
|
import com.baiye.modules.system.service.mapstruct.OrganizeMapper;
|
|
|
|
|
import com.baiye.modules.system.service.mapstruct.OrganizeUserMapper;
|
|
|
|
|
import com.baiye.modules.system.service.mapstruct.TaskOrganizeMapper;
|
|
|
|
|
import com.baiye.modules.telemarkting.service.ExtensionNumberService;
|
|
|
|
|
import com.baiye.util.*;
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
@ -55,6 +55,7 @@ public class OrganizeServiceImpl implements OrganizeService {
|
|
|
|
|
private final RoleService roleService;
|
|
|
|
|
private final RedisUtils redisUtils;
|
|
|
|
|
private final UserMessageService userMessageService;
|
|
|
|
|
private final ExtensionNumberService ExtensionNumberService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增小组
|
|
|
|
@ -66,6 +67,8 @@ public class OrganizeServiceImpl implements OrganizeService {
|
|
|
|
|
for (Organize organize : organizeList) {
|
|
|
|
|
organize.setCreateBy(SecurityUtils.getCurrentUserId());
|
|
|
|
|
Organize saveOrganize = organizeRepository.save(organize);
|
|
|
|
|
//添加分机号
|
|
|
|
|
ExtensionNumberService.assignExtensionNum(saveOrganize.getId(),organize.getUserId());
|
|
|
|
|
// 添加小组成员信息
|
|
|
|
|
OrganizeUser organizeUser = new OrganizeUser();
|
|
|
|
|
organizeUser.setOrganizeId(saveOrganize.getId());
|
|
|
|
@ -133,7 +136,9 @@ public class OrganizeServiceImpl implements OrganizeService {
|
|
|
|
|
addOrganizeUser.setOrganizeId(organizeId);
|
|
|
|
|
addOrganizeUser.setIsLeader(false);
|
|
|
|
|
addOrganizeUser.setCreateBy(currentUserId);
|
|
|
|
|
organizeUserRepository.save(addOrganizeUser);
|
|
|
|
|
OrganizeUser saveOrganizeUser = organizeUserRepository.save(addOrganizeUser);
|
|
|
|
|
//添加分机号
|
|
|
|
|
ExtensionNumberService.assignExtensionNum(saveOrganizeUser.getOrganizeId(),saveOrganizeUser.getUserId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -410,7 +415,9 @@ public class OrganizeServiceImpl implements OrganizeService {
|
|
|
|
|
organizeUser.setOrganizeId(organizeId);
|
|
|
|
|
organizeUser.setIsLeader(false);
|
|
|
|
|
organizeUser.setCreateBy(SecurityUtils.getCurrentUserId());
|
|
|
|
|
organizeUserRepository.save(organizeUser);
|
|
|
|
|
OrganizeUser saveOrganizeUser = organizeUserRepository.save(organizeUser);
|
|
|
|
|
//添加分机号
|
|
|
|
|
ExtensionNumberService.assignExtensionNum(saveOrganizeUser.getOrganizeId(),saveOrganizeUser.getUserId());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//分配组员资源
|
|
|
|
|