lyhzzz 1 سال پیش
والد
کامیت
6787dc37d8
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/main/java/com/fdkankan/manage_jp/service/impl/TmContractorServiceImpl.java

+ 2 - 2
src/main/java/com/fdkankan/manage_jp/service/impl/TmContractorServiceImpl.java

@@ -76,11 +76,11 @@ public class TmContractorServiceImpl extends ServiceImpl<ITmContractorMapper, Tm
             if(contractorUser == null || contractorUser.getCompanyId() == null){
                 throw new BusinessException(ResultCode.CONTRACTOR_USER_ERROR);
             }
-            User contractorMain = userService.getById(contractorUser.getCompanyId());
+            Company contractorMain = companyService.getById(contractorUser.getCompanyId());
             if(contractorMain == null ){
                 throw new BusinessException(ResultCode.CONTRACTOR_USER_ERROR);
             }
-            if(!contractorUser.getId().equals(contractorMain.getId())){
+            if(!contractorUser.getId().equals(contractorMain.getManagerId())){
                 throw new BusinessException(ResultCode.SCENE_CONTRACTOR_ERROR3);
             }