修改增加appName

parent d1b4a38d
......@@ -55,16 +55,16 @@ public class SmsController implements IBaseController {
*/
@CaptchaValidator
@RequestMapping("/send_sms_verification_code")
public JsonResult verifyPhoneNoH5(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom) {
public JsonResult verifyPhoneNoH5(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom,@RequestParam(required = false,defaultValue = "")String appName) {
LOGGER.info("注册-发送验证码, phoneNo:{}, registerFrom:{}", phoneNo, registerFrom);
return sendVerificationCode2(phoneNo);
return sendVerificationCode2(phoneNo,appName);
}
@CaptchaValidator
@RequestMapping("/send_reset_code")
public JsonResult resetPasswordH5(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom) {
public JsonResult resetPasswordH5(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom,@RequestParam(required = false,defaultValue = "")String appName) {
LOGGER.info("重置密码-发送验证码, phoneNo:{}, registerFrom:{}", phoneNo, registerFrom);
return sendVerificationCode2(phoneNo);
return sendVerificationCode2(phoneNo,appName);
}
/**
......@@ -115,9 +115,9 @@ public class SmsController implements IBaseController {
*/
@CaptchaValidator
@RequestMapping("/send_login_code")
public JsonResult sendLoginCode(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom) {
public JsonResult sendLoginCode(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom,@RequestParam(required = false,defaultValue = "")String appName) {
LOGGER.info("快速登陆-发送验证码, phoneNo:{}, registerFrom:{}", phoneNo, registerFrom);
return sendVerificationCode2(phoneNo);
return sendVerificationCode2(phoneNo,appName);
}
/**
......@@ -125,12 +125,12 @@ public class SmsController implements IBaseController {
*/
@CaptchaValidator
@RequestMapping("/send_regist_code")
public JsonResult sendRegistCode(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom) {
public JsonResult sendRegistCode(@RequestParam String phoneNo, @RequestParam(required = false) String registerFrom,@RequestParam(required = false,defaultValue = "")String appName) {
LOGGER.info("快速注册-发送验证码, phoneNo:{}, registerFrom:{}", phoneNo, registerFrom);
return sendVerificationCode2(phoneNo);
return sendVerificationCode2(phoneNo,appName);
}
private JsonResult sendVerificationCode2(String phoneNo) {
private JsonResult sendVerificationCode2(String phoneNo,String appName) {
if (!ValidationUtil.validatePhoneNo(phoneNo)) {
return JsonResult.buildErrorStateResult("手机号格式有误", null);
}
......@@ -147,7 +147,15 @@ public class SmsController implements IBaseController {
/*ConfirmableMsg confirmableMsg = new ConfirmableMsg(
uniqueId, newList, "1", "1", phoneNo
);*/
MsgParams message = new MsgParams(Collections.singletonList(2), phoneNo, "1", "1", Collections.singletonList(randomCode), uniqueId);
MsgParams message = new MsgParams.Builder()
.typeList(Collections.singletonList(2))
.phoneNo(phoneNo)
.merchantId("1")
.contentId("1")
.uniqueId(uniqueId)
.contentArgs(Collections.singletonList(randomCode))
.channel(appName)
.build();
try {
//smsService.getSmsSender().sendConfirmableMessage(confirmableMsg);
smsService.getSmsSender().sendMsg(message);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment