短信提示调整
This commit is contained in:
@@ -53,7 +53,7 @@ public enum UserResponseEnum {
|
|||||||
|
|
||||||
MESSAGE_SEND_FAIL("A0102", "短信发送失败"),
|
MESSAGE_SEND_FAIL("A0102", "短信发送失败"),
|
||||||
REGISTER_FAIL("A0102", "注册失败"),
|
REGISTER_FAIL("A0102", "注册失败"),
|
||||||
REGISTER_PHONE_FAIL("A0102", "该号码已注册,请检查phone字段"),
|
REGISTER_PHONE_FAIL("A0102", "该号码已注册"),
|
||||||
REGISTER_LOGIN_NAME_FAIL("A0102", "该账号已注册"),
|
REGISTER_LOGIN_NAME_FAIL("A0102", "该账号已注册"),
|
||||||
REGISTER_PHONE_WRONG("A0102", "手机号非法"),
|
REGISTER_PHONE_WRONG("A0102", "手机号非法"),
|
||||||
REGISTER_PHONE_REPEAT("A0102", "手机号已注册"),
|
REGISTER_PHONE_REPEAT("A0102", "手机号已注册"),
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.common.utils.LogUtil;
|
import com.njcn.common.utils.LogUtil;
|
||||||
import com.njcn.user.service.IAppUserService;
|
import com.njcn.user.service.IAppUserService;
|
||||||
|
import com.njcn.web.annotation.ReturnMsg;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.utils.IpUtils;
|
import com.njcn.web.utils.IpUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -59,6 +60,7 @@ public class AppUserController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "devCode", value = "设备码", required = true, paramType = "query"),
|
@ApiImplicitParam(name = "devCode", value = "设备码", required = true, paramType = "query"),
|
||||||
@ApiImplicitParam(name = "type", value = "验证码类型(0:登录 1:注册 2:修改密码 4:换绑新手机 5.老手机校验 6:忘记密码)", required = true, paramType = "query"),
|
@ApiImplicitParam(name = "type", value = "验证码类型(0:登录 1:注册 2:修改密码 4:换绑新手机 5.老手机校验 6:忘记密码)", required = true, paramType = "query"),
|
||||||
})
|
})
|
||||||
|
@ReturnMsg
|
||||||
public HttpResult<String> authCode(String phone, String devCode, String type) {
|
public HttpResult<String> authCode(String phone, String devCode, String type) {
|
||||||
String methodDescribe = getMethodDescribe("authCode");
|
String methodDescribe = getMethodDescribe("authCode");
|
||||||
String code = appUserService.setMessage(phone,devCode,type);
|
String code = appUserService.setMessage(phone,devCode,type);
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, User> impleme
|
|||||||
logger.error("发送短信异常,异常为:"+e.getMessage());
|
logger.error("发送短信异常,异常为:"+e.getMessage());
|
||||||
//短信入库
|
//短信入库
|
||||||
addSendMessage(phone,vcode,msgTemplate,sendSmsResponse);
|
addSendMessage(phone,vcode,msgTemplate,sendSmsResponse);
|
||||||
|
throw new BusinessException(e.getMessage());
|
||||||
}
|
}
|
||||||
if (Objects.isNull(sendSmsResponse)){
|
if (Objects.isNull(sendSmsResponse)){
|
||||||
throw new BusinessException(UserResponseEnum.MESSAGE_SEND_FAIL);
|
throw new BusinessException(UserResponseEnum.MESSAGE_SEND_FAIL);
|
||||||
|
|||||||
Reference in New Issue
Block a user