package com.dsh.account.controller;
|
|
import com.dsh.account.service.TAppUserService;
|
import com.dsh.account.util.ResultUtil;
|
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* @author zhibing.pu
|
* @date 2023/6/14 15:30
|
*/
|
@RestController
|
@RequestMapping("")
|
public class AppUserController {
|
|
@Autowired
|
private TAppUserService appUserService;
|
|
|
|
|
@ResponseBody
|
@PostMapping("/base/appUser/getSMSCode")
|
@ApiOperation(value = "获取短信验证码", tags = {"用户—登录注册"})
|
@ApiImplicitParams({
|
@ApiImplicitParam(value = "类型(1:登录,2:注册,3:修改密码,4:忘记密码)", name = "type", dataType = "int", required = true),
|
@ApiImplicitParam(value = "电话号码", name = "phone", dataType = "string", required = true)
|
})
|
public ResultUtil getSMSCode(@RequestBody Integer type, @RequestBody String phone){
|
try {
|
ResultUtil smsCode = appUserService.getSMSCode(type, phone);
|
return smsCode;
|
}catch (Exception e){
|
e.printStackTrace();
|
return ResultUtil.runErr();
|
}
|
}
|
}
|