|
@@ -1,13 +1,13 @@
|
|
|
-package cn.minbb.evaluationsystemserver.controller;
|
|
|
+package cn.minbb.evaluation.controller;
|
|
|
|
|
|
-import cn.minbb.evaluationsystemserver.entity.Logs;
|
|
|
-import cn.minbb.evaluationsystemserver.entity.User;
|
|
|
-import cn.minbb.evaluationsystemserver.service.LogsService;
|
|
|
-import cn.minbb.evaluationsystemserver.service.UserService;
|
|
|
-import cn.minbb.evaluationsystemserver.stroage.StorageService;
|
|
|
-import cn.minbb.evaluationsystemserver.util.IPUtils;
|
|
|
-import cn.minbb.evaluationsystemserver.util.ResponseMap;
|
|
|
-import cn.minbb.evaluationsystemserver.util.Result;
|
|
|
+import cn.minbb.evaluation.entity.Logs;
|
|
|
+import cn.minbb.evaluation.entity.User;
|
|
|
+import cn.minbb.evaluation.service.LogsService;
|
|
|
+import cn.minbb.evaluation.service.UserService;
|
|
|
+import cn.minbb.evaluation.stroage.StorageService;
|
|
|
+import cn.minbb.evaluation.util.IPUtils;
|
|
|
+import cn.minbb.evaluation.util.ResponseMap;
|
|
|
+import cn.minbb.evaluation.util.Result;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -39,7 +39,7 @@ public class UserController {
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "/login")
|
|
|
- @ResponseBody
|
|
|
+ // @ResponseBody
|
|
|
public String loginIndex() {
|
|
|
return "login";
|
|
|
}
|
|
@@ -110,11 +110,6 @@ public class UserController {
|
|
|
responseMap.putSummary("身份验证通过");
|
|
|
// 加密密码
|
|
|
// user.setPassword("******");
|
|
|
- // Avatar URL
|
|
|
- String userAvatar = user.getAvatar();
|
|
|
- if (userAvatar != null) {
|
|
|
- user.setAvatar(USER_AVATAR_URL + userAvatar);
|
|
|
- }
|
|
|
responseMap.putData(user);
|
|
|
logsService.save(new Logs("用户登录", "登陆成功", user, IPUtils.getIPAddress(request)));
|
|
|
} else {
|
|
@@ -248,13 +243,4 @@ public class UserController {
|
|
|
System.out.println(s);
|
|
|
return "ok";
|
|
|
}
|
|
|
-
|
|
|
- @PostMapping(value = "/add", produces = "text/plain; charset=UTF-8")
|
|
|
- public String handleAddHeroPage(
|
|
|
- @RequestParam("name") String name,
|
|
|
- @RequestParam("category") String category,
|
|
|
- @RequestParam("picture") MultipartFile picture) {
|
|
|
- storageService.store(picture);
|
|
|
- return "redirect:/";
|
|
|
- }
|
|
|
}
|