licailing 4 лет назад
Родитель
Сommit
2ac3670edd

+ 0 - 8
src/main/java/com/izouma/wenlvju/service/UserService.java

@@ -224,14 +224,6 @@ public class UserService {
         return this.byAuthority(pageQuery, authorities).map(user -> new ExpertDTO(user, artMap.get(user.getArtTypeId())));
     }
 
-    // 展演活动分配评委
-    public Page<ExpertDTO> performanceExpert(PageQuery pageQuery, List<Authority> authorities) {
-        Map<Long, String> artMap = artTypeRepo.findAll()
-                .stream()
-                .collect(Collectors.toMap(ArtType::getId, ArtType::getName));
-        return this.byAuthority(pageQuery, authorities).map(user -> new ExpertDTO(user, artMap.get(user.getArtTypeId())));
-    }
-
     // 等级评定分配专家列表
     public Page<ExpertDTO> rateExpert(Long rateId) {
         PageQuery pageQuery = new PageQuery();

+ 3 - 3
src/main/java/com/izouma/wenlvju/web/UserController.java

@@ -111,12 +111,12 @@ public class UserController extends BaseController {
         authorities.add(Authority.get(AuthorityName.ROLE_SUPERVISOR));
         authorities.add(Authority.get(AuthorityName.ROLE_USER));
         authorities.add(Authority.get(AuthorityName.ROLE_DISTRICT_STAFF));
-        return userService.all2(pageQuery, authorities);
+        return userService.byAuthority(pageQuery, authorities);
     }
 
     @PostMapping("/all1")
     public Page<ExpertDTO> all1(@RequestBody PageQuery pageQuery) {
-        return userService.all1(pageQuery, Collections.singletonList(Authority.get(AuthorityName.ROLE_EXPERT)));
+        return userService.toArtType(pageQuery, Collections.singletonList(Authority.get(AuthorityName.ROLE_EXPERT)));
     }
 
     @PostMapping("/expert")
@@ -124,7 +124,7 @@ public class UserController extends BaseController {
         List<Authority> authorities = new ArrayList<>();
         authorities.add(Authority.get(AuthorityName.ROLE_DISTRICT_STAFF));
         authorities.add(Authority.get(AuthorityName.ROLE_EXPERT));
-        return userService.all1(pageQuery, authorities);
+        return userService.toArtType(pageQuery, authorities);
     }
 
     @PreAuthorize("hasRole('ADMIN')")