Browse Source

增加错误提示信息

cgp 1 day ago
parent
commit
6b3e40dfc0

+ 3 - 3
fs-service/src/main/java/com/fs/company/service/impl/CompanyUserServiceImpl.java

@@ -1083,12 +1083,12 @@ public class CompanyUserServiceImpl implements ICompanyUserService
     @Override
     public CompanyUserAndDoctorVO getCompanyUserAndDoctor(Long companyUserId) {
         if (companyUserId==null){
-            throw new ServiceException("销售人员不存在");
+            throw new CustomException("销售人员不存在");
         }
 
         CompanyUser companyUser = companyUserService.selectCompanyUserById(companyUserId);
         if (companyUser==null){
-            throw new ServiceException("销售人员不存在");
+            throw new CustomException("销售人员不存在");
         }
         CompanyUserAndDoctorVO companyUserAndDoctorVO=new CompanyUserAndDoctorVO();
         companyUserAndDoctorVO.setCompanyUserId(companyUser.getUserId());
@@ -1096,7 +1096,7 @@ public class CompanyUserServiceImpl implements ICompanyUserService
         FsDoctor fsDoctor = doctorMapper.selectFsDoctorByDoctorId(companyUser.getDoctorId());
         if (fsDoctor==null){
             log.error("销售人员所绑定的医生不存在,销售companyUserId:{}",companyUserId);
-            return companyUserAndDoctorVO;
+            throw new CustomException("未找到销售人员绑定的医生信息");
         }
         companyUserAndDoctorVO.setDoctorId(fsDoctor.getDoctorId());
         companyUserAndDoctorVO.setDoctorName(fsDoctor.getDoctorName());