forked from dyf/fys-Multi-tenant
63 lines
1.7 KiB
Java
63 lines
1.7 KiB
Java
|
package com.fuyuanshen.app.controller;
|
||
|
|
||
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||
|
import com.fuyuanshen.app.domain.dto.APPForgotPasswordDTO;
|
||
|
import com.fuyuanshen.app.domain.dto.APPForgotPasswordSmsDTO;
|
||
|
import com.fuyuanshen.app.domain.dto.APPUpdateUserDTO;
|
||
|
import com.fuyuanshen.app.domain.vo.APPUserInfoVo;
|
||
|
import com.fuyuanshen.app.service.IAppUserService;
|
||
|
import com.fuyuanshen.common.core.domain.R;
|
||
|
import com.fuyuanshen.common.web.core.BaseController;
|
||
|
import lombok.RequiredArgsConstructor;
|
||
|
import org.springframework.validation.annotation.Validated;
|
||
|
import org.springframework.web.bind.annotation.*;
|
||
|
|
||
|
/**
|
||
|
* APP 用户管理
|
||
|
* @date 2025-06-27
|
||
|
*/
|
||
|
@Validated
|
||
|
@RequiredArgsConstructor
|
||
|
@RestController
|
||
|
@RequestMapping("/app/user")
|
||
|
public class AppUserController extends BaseController {
|
||
|
|
||
|
private final IAppUserService appUserService;
|
||
|
|
||
|
/**
|
||
|
* 个人中心
|
||
|
*/
|
||
|
@GetMapping("/getUserInfo")
|
||
|
public R<APPUserInfoVo> getUserInfo() {
|
||
|
return R.ok(appUserService.getUserInfo());
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 修改个人信息
|
||
|
*/
|
||
|
@PostMapping("/updateUser")
|
||
|
public R<Void> updateUser(@Validated @ModelAttribute APPUpdateUserDTO bo) {
|
||
|
return toAjax(appUserService.updateUser(bo));
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 忘记密码
|
||
|
*/
|
||
|
@SaIgnore
|
||
|
@PostMapping("/forgotPassword")
|
||
|
public R<Void> forgotPassword(@RequestBody APPForgotPasswordDTO bo) {
|
||
|
return toAjax(appUserService.forgotPassword(bo));
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* 发送忘记密码短信
|
||
|
*/
|
||
|
@SaIgnore
|
||
|
@PostMapping("/sendForgotPasswordSms")
|
||
|
public R<Void> sendForgotPasswordSms(@Validated @RequestBody APPForgotPasswordSmsDTO dto) throws Exception {
|
||
|
return toAjax(appUserService.sendForgotPasswordSms(dto));
|
||
|
}
|
||
|
}
|