Explorar o código

修改用户服务的地址

guo00guo %!s(int64=5) %!d(string=hai) anos
pai
achega
1c1ae23d06

+ 16 - 0
core/src/main/java/com/mooctest/crowd/domain/repository/ApplicationTypeRepo.java

@@ -1,6 +1,7 @@
 package com.mooctest.crowd.domain.repository;
 
 import com.mooctest.crowd.domain.dao.ApplicationTypeDao;
+import com.mooctest.crowd.domain.dao.CrowdTestProjectDao;
 import com.mooctest.crowd.domain.domainobject.ApplicationType;
 import com.mooctest.crowd.domain.model.ApplicationTypePO;
 import com.mooctest.crowd.domain.util.Converter;
@@ -27,8 +28,23 @@ public class ApplicationTypeRepo implements IApplicationTypeRepo{
     @Autowired
     private ApplicationTypeDao applicationTypeDao;
 
+    @Autowired
+    private CrowdTestProjectDao projectDao;
+
+    @Autowired
+    private CommonRepo commonRepo;
+
     @Override
     public Page<ApplicationType> getHotTesting(Pageable pageable,String keyword) {
+
+//        //获取热门众测
+//        List<ApplicationTypeVO> applicationTypeRank = projectDao.findTotalCountOfApplicationType(pageable).stream().map(rankInfos -> {
+//            ApplicationType applicationType = commonRepo.getApplicationTypeByAppCode(rankInfos.getCode());
+//            ApplicationTypeVO applicationTypeVO = new ApplicationTypeVO(applicationType);
+//            applicationTypeVO.setCount(rankInfos.getCount());
+//            return applicationTypeVO;
+//        }).filter(Objects::nonNull).collect(Collectors.toList());
+
         Specifications<ApplicationTypePO> where =  Specifications.where(getArticlesByIsNotDeleted(keyword));
         return applicationTypeDao.findAll(where,pageable).map(ApplicationTypePO->Converter.convert(ApplicationType.class, ApplicationTypePO));
     }

+ 2 - 2
site/src/main/java/com/mooctest/crowd/site/mediator/impl/WebMediatorImpl.java

@@ -351,7 +351,7 @@ public class WebMediatorImpl implements ViewMediator {
 //        }).filter(Objects::nonNull).collect(Collectors.toList());
 
         List<EvaluationAgencyVO> agencyRanks = userTaskCountDao.findByType(RoleType.AGENCY.getId())
-                .stream().sorted(Comparator.comparing(UserTaskCountPO::getCount)).limit(top).collect(Collectors.toList())
+                .stream().sorted(Comparator.comparing(UserTaskCountPO::getCount).reversed()).limit(top).collect(Collectors.toList())
                 .stream().map(userTaskCountPO -> {
                     EvaluationAgencyPO agency = agencyDao.findByUserId(userTaskCountPO.getUserId());
                     EvaluationAgencyVO agencyVO = new EvaluationAgencyVO();
@@ -385,7 +385,7 @@ public class WebMediatorImpl implements ViewMediator {
 //        }).filter(Objects::nonNull).collect(Collectors.toList());
 
         List<UserVO> userRanks = userTaskCountDao.findByType(RoleType.EVALUATION_USER.getId())
-                .stream().sorted(Comparator.comparing(UserTaskCountPO::getCount)).limit(top).collect(Collectors.toList())
+                .stream().sorted(Comparator.comparing(UserTaskCountPO::getCount).reversed()).limit(top).collect(Collectors.toList())
                 .stream().map(userTaskCountPO -> {
                     User user = userRepo.getByIDJustInfo(userTaskCountPO.getUserId());
                     UserVO userVO = new UserVO(user);

+ 2 - 2
site/src/main/resources/application.yml

@@ -111,8 +111,8 @@ spring:
     database: 6
 user:
   service:
-    baseUrl: http://127.0.0.1:8081
-#    baseUrl: http://59.42.10.53:8081
+#    baseUrl: http://127.0.0.1:8081
+    baseUrl: http://59.42.10.53:8081
 
 website:
   domain: mooctest.net