|
@@ -5,14 +5,12 @@ import com.miaxis.app.user.service.IUserInfoService;
|
|
|
import com.miaxis.app.user.vo.UserVo;
|
|
|
import com.miaxis.common.aliyunOSS.AliyunConfig;
|
|
|
import com.miaxis.common.aliyunOSS.AliyunUpload;
|
|
|
-import com.miaxis.common.annotation.Log;
|
|
|
import com.miaxis.common.constant.Constants;
|
|
|
import com.miaxis.common.core.controller.BaseController;
|
|
|
import com.miaxis.common.core.domain.Response;
|
|
|
import com.miaxis.common.core.domain.entity.SysUser;
|
|
|
import com.miaxis.common.core.domain.entity.UserInfo;
|
|
|
import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
-import com.miaxis.common.enums.BusinessTypeEnum;
|
|
|
import com.miaxis.common.utils.SecurityUtils;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -33,8 +31,8 @@ import java.util.Map;
|
|
|
* @date 2020-12-23
|
|
|
*/
|
|
|
@RestController
|
|
|
-@RequestMapping(Constants.OPEN_PREFIX+"/user/info")
|
|
|
-@Api(tags={"【普通用户信息】Controller"})
|
|
|
+@RequestMapping(Constants.STUDENT_PREFIX+"/user/info")
|
|
|
+@Api(tags={"【app-普通用户信息】"})
|
|
|
public class UserInfoController extends BaseController{
|
|
|
|
|
|
@Autowired
|
|
@@ -72,7 +70,6 @@ public class UserInfoController extends BaseController{
|
|
|
/**
|
|
|
* 修改用户信息
|
|
|
*/
|
|
|
- @Log(title = "用户信息", businessType = BusinessTypeEnum.UPDATE)
|
|
|
@PutMapping
|
|
|
@ApiOperation("修改用户信息")
|
|
|
public Response<Integer> edit(@RequestBody UserInfo userInfo){
|
|
@@ -82,7 +79,6 @@ public class UserInfoController extends BaseController{
|
|
|
/**
|
|
|
* 删除用户信息
|
|
|
*/
|
|
|
- @Log(title = "用户信息", businessType = BusinessTypeEnum.DELETE)
|
|
|
@DeleteMapping("/{ids}")
|
|
|
@ApiOperation("删除用户信息")
|
|
|
public Response<Integer> remove(
|
|
@@ -96,7 +92,6 @@ public class UserInfoController extends BaseController{
|
|
|
* 上传身份证正反面,及人像图片
|
|
|
* uploadIdCardAndHeadPicture
|
|
|
*/
|
|
|
- @Log(title = "用户信息", businessType = BusinessTypeEnum.INSERT)
|
|
|
@PostMapping("/uploadIdCardAndHeadPicture")
|
|
|
@ApiOperation("上传身份证正反面,及人像图片")
|
|
|
@ApiImplicitParams({
|
|
@@ -118,7 +113,6 @@ public class UserInfoController extends BaseController{
|
|
|
* 删除文件
|
|
|
* uploadIdCardAndHeadPicture
|
|
|
*/
|
|
|
- @Log(title = "用户信息", businessType = BusinessTypeEnum.DELETE)
|
|
|
@PostMapping("/deleteCardAndHeadPicture")
|
|
|
@ApiOperation("删除文件")
|
|
|
@ApiImplicitParam(name = "filePath",value = "文件路径(filePath)" ,dataType = "String",required = true)
|
|
@@ -132,7 +126,6 @@ public class UserInfoController extends BaseController{
|
|
|
* 保存用户报名信息
|
|
|
* uploadIdCardAndHeadPicture
|
|
|
*/
|
|
|
- @Log(title = "用户信息", businessType = BusinessTypeEnum.INSERT)
|
|
|
@PostMapping("/saveUserInformation")
|
|
|
@ApiOperation("保存用户报名信息")
|
|
|
public Response saveUserInformation(UserDto userDto) {
|
|
@@ -167,8 +160,8 @@ public class UserInfoController extends BaseController{
|
|
|
@ApiImplicitParam(name = "type",value = "login:用户登录验证码、modify:修改手机验证码、signUp:注册报名验证码" ,dataType = "String",required = true),
|
|
|
@ApiImplicitParam(name = "phone", value = "手机号码", required = true, dataType = "String")
|
|
|
})
|
|
|
- @PostMapping(value = "/sendVerificationCode")
|
|
|
- public Response sendVerificationCode(String type,String phone){
|
|
|
+ @PostMapping(value = "/sendModifyVerificationCode")
|
|
|
+ public Response sendModifyVerificationCode(String type,String phone){
|
|
|
//获取当前用户
|
|
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
|
|
@@ -179,24 +172,23 @@ public class UserInfoController extends BaseController{
|
|
|
/**
|
|
|
* 修改用户手机号
|
|
|
*/
|
|
|
- @Log(title = "用户信息", businessType = BusinessTypeEnum.UPDATE)
|
|
|
@PostMapping("/modifyPhoneNumber")
|
|
|
@ApiOperation("修改用户手机号")
|
|
|
@ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "smsCodeType,", value = "login:用户登录验证码、modify:修改手机验证码、signUp:注册报名验证码", required = true, dataType = "String"),
|
|
|
@ApiImplicitParam(name = "phone", value = "手机号码", required = true, dataType = "String"),
|
|
|
@ApiImplicitParam(name = "verificationCode", value = "短信验证码", required = true, dataType = "String")
|
|
|
})
|
|
|
- public Response modifyPhoneNumber(String phone,String verificationCode){
|
|
|
+ public Response modifyPhoneNumber(String smsCodeType,String phone,String verificationCode){
|
|
|
//获取当前用户
|
|
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
//修改手机号
|
|
|
- return userInfoService.modifyPhoneNumber(phone,verificationCode,user);
|
|
|
+ return userInfoService.modifyPhoneNumber(smsCodeType,phone,verificationCode,user);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询我的报名信息
|
|
|
*/
|
|
|
- @Log(title = "用户信息",businessType = BusinessTypeEnum.OTHER)
|
|
|
@GetMapping("/getMyRegistrationInformation")
|
|
|
@ApiOperation("查询我的报名信息")
|
|
|
@ApiImplicitParam(name = "userId",value = "用户id" ,dataType = "String",required = true)
|