archive ile
parent
36a4a2d853
commit
de1a164f54
|
|
@ -20,6 +20,7 @@ import org.qinan.safetyeval.domain.gateway.SafetyMessageGateway;
|
||||||
import org.qinan.safetyeval.domain.query.EvalProjectQuery;
|
import org.qinan.safetyeval.domain.query.EvalProjectQuery;
|
||||||
import org.qinan.safetyeval.domain.query.PageResult;
|
import org.qinan.safetyeval.domain.query.PageResult;
|
||||||
import org.qinan.safetyeval.domain.query.SafetyMessageQuery;
|
import org.qinan.safetyeval.domain.query.SafetyMessageQuery;
|
||||||
|
import org.qinan.safetyeval.infrastructure.adapter.ThreadLocalUserInfoAdapter;
|
||||||
import org.qinan.safetyeval.infrastructure.support.InstitutionOrgSupport;
|
import org.qinan.safetyeval.infrastructure.support.InstitutionOrgSupport;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|
@ -80,10 +81,7 @@ public class InstitutionDashboardExecutor implements InstitutionDashboardApi {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SingleResponse<InstitutionDashboardProjectNodeStatsCO> projectNodeStats() {
|
public SingleResponse<InstitutionDashboardProjectNodeStatsCO> projectNodeStats() {
|
||||||
Long orgId = institutionOrgSupport.resolveCurrentOrgIdByUserId();
|
Long orgId = ThreadLocalUserInfoAdapter.getOrgId();
|
||||||
if (orgId == null) {
|
|
||||||
return SingleResponse.success(new InstitutionDashboardProjectNodeStatsCO());
|
|
||||||
}
|
|
||||||
List<EvalProjectEntity> projects = listOrgProjects(orgId);
|
List<EvalProjectEntity> projects = listOrgProjects(orgId);
|
||||||
|
|
||||||
int total = projects.size();
|
int total = projects.size();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue