|
|
@@ -13,6 +13,7 @@ import com.railway.framework.web.service.TokenService;
|
|
|
import com.railway.system.service.ISysFileService;
|
|
|
import com.railway.system.service.ISysUserService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
@@ -27,7 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
*
|
|
|
* @author railway
|
|
|
*/
|
|
|
-@Api(tags = "个人信息")
|
|
|
+@Api(tags = "系统管理 - 个人信息")
|
|
|
@RestController
|
|
|
@RequestMapping("/system/user/profile")
|
|
|
public class SysProfileController extends BaseController {
|
|
|
@@ -46,6 +47,7 @@ public class SysProfileController extends BaseController {
|
|
|
/**
|
|
|
* 个人信息
|
|
|
*/
|
|
|
+ @ApiOperation(value = "获取个人信息", response = AjaxResult.class)
|
|
|
@GetMapping
|
|
|
public AjaxResult profile() {
|
|
|
LoginUser loginUser = getLoginUser();
|
|
|
@@ -59,6 +61,7 @@ public class SysProfileController extends BaseController {
|
|
|
/**
|
|
|
* 修改用户
|
|
|
*/
|
|
|
+ @ApiOperation(value = "修改用户", response = AjaxResult.class)
|
|
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
public AjaxResult updateProfile(@RequestBody SysUser user) {
|
|
|
@@ -89,6 +92,7 @@ public class SysProfileController extends BaseController {
|
|
|
/**
|
|
|
* 重置密码
|
|
|
*/
|
|
|
+ @ApiOperation(value = "修改密码", response = AjaxResult.class)
|
|
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping("/updatePwd")
|
|
|
public AjaxResult updatePwd(String oldPassword, String newPassword) {
|
|
|
@@ -113,6 +117,7 @@ public class SysProfileController extends BaseController {
|
|
|
/**
|
|
|
* 头像上传
|
|
|
*/
|
|
|
+ @ApiOperation(value = "头像上传", response = AjaxResult.class)
|
|
|
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/avatar")
|
|
|
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws Exception {
|