Pārlūkot izejas kodu

增加首页获取头像接口

guo00guo 5 gadi atpakaļ
vecāks
revīzija
c7149a68af

+ 6 - 0
site/src/main/java/com/mooctest/crowd/site/controller/UserController.java

@@ -67,6 +67,12 @@ public class UserController extends BaseController{
         return userService.getUser(userId);
     }
 
+
+    @RequestMapping(value = "/user/image/{userId}", method = RequestMethod.GET)
+    public String getUserImage(@PathVariable Long userId) {
+        return userService.getUserImage(userId);
+    }
+
     @RequestMapping(value = "/user", method = RequestMethod.GET)
     public List<UserDTO> getUsers() {
         return null;

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

@@ -800,12 +800,6 @@ public class WebMediatorImpl implements ViewMediator {
 
         // 测试类型的转换
         List<String> testStringList = projectVO.getType().stream().map(testType -> {
-//            Optional<TestTypePO> testTypePO = testTypeDao.findByCode(testType);
-//            if (testTypePO.isPresent()) {
-//                return testTypePO.get().getName();
-//            } else {
-//                throw new HttpBadRequestException("请选择测试类型");
-//            }
             return commonRepo.getTypeNameByCode(testType);
         }).collect(Collectors.toList());
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/service/UserService.java


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
site/src/main/java/com/mooctest/crowd/site/service/impl/UserServiceImpl.java


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels