|
|
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.fs.common.utils.DictUtils;
|
|
|
+import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.company.cache.ICompanyCacheService;
|
|
|
import com.fs.company.cache.ICompanyUserCacheService;
|
|
|
import com.fs.company.domain.Company;
|
|
|
@@ -20,7 +21,7 @@ import com.fs.qw.mapper.CustomerTransferApprovalMapper;
|
|
|
import com.fs.qw.service.ICustomerTransferApprovalService;
|
|
|
import com.fs.qw.vo.TransferCustomDTO;
|
|
|
import com.fs.store.service.cache.IFsUserCacheService;
|
|
|
-import com.hc.openapi.tool.util.StringUtils;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.hc.core5.util.Asserts;
|
|
|
import org.springframework.aop.framework.AopContext;
|
|
|
@@ -41,6 +42,7 @@ import java.util.Objects;
|
|
|
* @author fs
|
|
|
* @date 2025-04-01
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
@EnableAspectJAutoProxy(proxyTargetClass = true,exposeProxy = true)
|
|
|
public class CustomerTransferApprovalServiceImpl implements ICustomerTransferApprovalService
|
|
|
@@ -138,10 +140,18 @@ public class CustomerTransferApprovalServiceImpl implements ICustomerTransferApp
|
|
|
FsUserCompanyUser userCompanyUser = userCompanyUserService.selectByUserIdAndProjectId(customerId.getUserId(), customerId.getProjectId());
|
|
|
if(Objects.nonNull(userCompanyUser)){
|
|
|
CompanyUser companyUser = companyUserCacheService.selectCompanyUserById(userCompanyUser.getCompanyUserId());
|
|
|
+ if(Objects.isNull(companyUser)){
|
|
|
+ log.warn("未找到销售信息, companyUserId: {}", userCompanyUser.getCompanyUserId());
|
|
|
+ continue;
|
|
|
+ }
|
|
|
String companyUserName = String.format("%s_%d", companyUser.getUserName(), companyUser.getUserId());
|
|
|
|
|
|
CompanyUser afterCompanyUser = companyUserCacheService.selectCompanyUserById(item.getTargetUserId());
|
|
|
- String afterCompanyUserName = String.format("%s_%d", afterCompanyUser.getUserName(), companyUser.getUserId());
|
|
|
+ if(Objects.isNull(afterCompanyUser)){
|
|
|
+ log.warn("未找到目标销售信息, targetUserId: {}", item.getTargetUserId());
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String afterCompanyUserName = String.format("%s_%d", afterCompanyUser.getUserName(), afterCompanyUser.getUserId());
|
|
|
|
|
|
customerList.add(TransferCustomDTO.builder()
|
|
|
.userName(String.format("%s_%d", fsUser.getNickName(), fsUser.getUserId()))
|