|
@@ -16,6 +16,7 @@ import com.mooctest.crowd.site.command.ApplyAgencyAuthCommand;
|
|
import com.mooctest.crowd.site.command.GenerateAgencyCommand;
|
|
import com.mooctest.crowd.site.command.GenerateAgencyCommand;
|
|
import com.mooctest.crowd.site.data.dto.UserDTO;
|
|
import com.mooctest.crowd.site.data.dto.UserDTO;
|
|
import com.mooctest.crowd.site.data.enums.RoleType;
|
|
import com.mooctest.crowd.site.data.enums.RoleType;
|
|
|
|
+import com.mooctest.crowd.site.data.vo.AgencyDetailVO;
|
|
import com.mooctest.crowd.site.data.vo.AgencyVO;
|
|
import com.mooctest.crowd.site.data.vo.AgencyVO;
|
|
import com.mooctest.crowd.site.data.vo.EvaluationAgencyVO;
|
|
import com.mooctest.crowd.site.data.vo.EvaluationAgencyVO;
|
|
import com.mooctest.crowd.site.data.vo.UserVO;
|
|
import com.mooctest.crowd.site.data.vo.UserVO;
|
|
@@ -112,6 +113,22 @@ public class AgencyServiceImpl implements AgencyService {
|
|
return agencyVO;
|
|
return agencyVO;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public AgencyDetailVO getAgencyInfoCommon(Long userId){
|
|
|
|
+ EvaluationAgency agency = evaluationAgencyRepo.findAgencyByUserId(userId);
|
|
|
|
+ AgencyDetailVO agencyVO = new AgencyDetailVO(agency);
|
|
|
|
+ /*
|
|
|
|
+ 先根据机构的userId查询出机构信息,再从user_task_count表里面找到这个机构的接的任务的数量。
|
|
|
|
+ */
|
|
|
|
+ UserTaskCount taskCountByUserId = userRepo.getUserTaskCountByUserId(userId);
|
|
|
|
+ if(taskCountByUserId != null){
|
|
|
|
+ agencyVO.setTaskCount(taskCountByUserId.getCount());
|
|
|
|
+ }
|
|
|
|
+ return agencyVO;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取首页机构 more模糊查询
|
|
* 获取首页机构 more模糊查询
|
|
*
|
|
*
|
|
@@ -257,4 +274,5 @@ public class AgencyServiceImpl implements AgencyService {
|
|
}
|
|
}
|
|
return agencyVO;
|
|
return agencyVO;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|