|
@@ -1,9 +1,13 @@
|
|
|
package com.punchsettle.server.service.controller;
|
|
package com.punchsettle.server.service.controller;
|
|
|
|
|
|
|
|
import com.punchsettle.server.dto.UserInfoDto;
|
|
import com.punchsettle.server.dto.UserInfoDto;
|
|
|
|
|
+import com.punchsettle.server.dto.user.NicknameDto;
|
|
|
import com.punchsettle.server.service.manager.IUserManager;
|
|
import com.punchsettle.server.service.manager.IUserManager;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
@@ -28,4 +32,12 @@ public class UserController {
|
|
|
public UserInfoDto queryUserInfo() {
|
|
public UserInfoDto queryUserInfo() {
|
|
|
return userManager.queryUserInfo();
|
|
return userManager.queryUserInfo();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改昵称
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/modifyNickname")
|
|
|
|
|
+ public void modifyNickname(@RequestBody @Validated NicknameDto dto) {
|
|
|
|
|
+ userManager.modifyNickname(dto);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|