|
@@ -628,7 +628,7 @@ public class UserService extends JedisUtil {
|
628
|
628
|
**/
|
629
|
629
|
public ResultVo updateCode(String userphone) {
|
630
|
630
|
String templateCode = "xgmm";
|
631
|
|
- if (generateCode(userphone, templateCode)) return new ResultVo(1, "请输入验证码或者在5分钟之后重新点击");
|
|
631
|
+ if (generateCode(userphone, templateCode)) return new ResultVo(1, "请输入验证码或者在1分钟之后重新点击");
|
632
|
632
|
return new ResultVo(0, "生成修改码成功");
|
633
|
633
|
}
|
634
|
634
|
|
|
@@ -641,7 +641,7 @@ public class UserService extends JedisUtil {
|
641
|
641
|
* @Date 2020/5/8 10:04
|
642
|
642
|
**/
|
643
|
643
|
private boolean generateCode(String userphone, String templateCode) {
|
644
|
|
- Integer msgNum = msgMapper.getMsgNumByUserPhone(userphone);//5分钟内发送短信次数
|
|
644
|
+ Integer msgNum = msgMapper.getMsgNumByUserPhone(userphone);//1分钟内发送短信次数
|
645
|
645
|
if (msgNum != 0) return true;
|
646
|
646
|
|
647
|
647
|
Integer messageCode = N_Utils.messageCode();
|
|
@@ -718,7 +718,7 @@ public class UserService extends JedisUtil {
|
718
|
718
|
public ResultVo loginCode(String userphone) {
|
719
|
719
|
N_Utils.validation(new Object[]{userphone, "手机号", 2});
|
720
|
720
|
String templateCode = "dlqr";
|
721
|
|
- if (generateCode(userphone, templateCode)) return new ResultVo(1, "请输入验证码或者在5分钟之后重新点击");
|
|
721
|
+ if (generateCode(userphone, templateCode)) return new ResultVo(1, "请输入验证码或者在1分钟之后重新点击");
|
722
|
722
|
return new ResultVo(0, "生成登录确认码成功");
|
723
|
723
|
}
|
724
|
724
|
|
|
@@ -926,7 +926,22 @@ public class UserService extends JedisUtil {
|
926
|
926
|
*/
|
927
|
927
|
public ResultVo bindCode(String userphone) {
|
928
|
928
|
String templateCode = "bdsj";
|
929
|
|
- if (generateCode(userphone, templateCode)) return new ResultVo(1, "请输入验证码或者在5分钟之后重新点击");
|
|
929
|
+ if (generateCode(userphone, templateCode)) return new ResultVo(1, "请输入验证码或者在1分钟之后重新点击");
|
930
|
930
|
return new ResultVo(0, "生成绑定手机码成功");
|
931
|
931
|
}
|
|
932
|
+
|
|
933
|
+ /**
|
|
934
|
+ * 校验用户密保答案
|
|
935
|
+ *
|
|
936
|
+ * @param [userid, usid, usanswer]
|
|
937
|
+ * @return com.xhkjedu.vo.ResultVo
|
|
938
|
+ * @author ywx
|
|
939
|
+ * @date 2022/4/7 16:15
|
|
940
|
+ */
|
|
941
|
+ public ResultVo checkUsecret(Integer userid, Integer usid, String usanswer) {
|
|
942
|
+ //获取用户密保答案
|
|
943
|
+ String answer = userUsecretMapper.getAnswerById(userid, usid);
|
|
944
|
+ if (!usanswer.equals(answer)) return new ResultVo(1, "输入答案有误");
|
|
945
|
+ return new ResultVo(0, "校验密保答案成功");
|
|
946
|
+ }
|
932
|
947
|
}
|