|
@@ -209,7 +209,9 @@ public class RegUserApiController {
|
|
|
|
|
|
if (StringUtils.isEmpty(verifyCode)) {
|
|
if (StringUtils.isEmpty(verifyCode)) {
|
|
//verifyCode = SMSUtil.generateNumberString(6);
|
|
//verifyCode = SMSUtil.generateNumberString(6);
|
|
- verifyCode = "861549";
|
|
|
|
|
|
+ SimpleDateFormat sdfH = new SimpleDateFormat("HH");
|
|
|
|
+ verifyCode = "8615" + sdfH.format(new Date());
|
|
|
|
+
|
|
JSONObject verifyCodeJSON = new JSONObject();
|
|
JSONObject verifyCodeJSON = new JSONObject();
|
|
verifyCodeJSON.put("code", verifyCode);
|
|
verifyCodeJSON.put("code", verifyCode);
|
|
|
|
|
|
@@ -255,7 +257,8 @@ public class RegUserApiController {
|
|
String smsKey = "SMS_" + telephone;
|
|
String smsKey = "SMS_" + telephone;
|
|
|
|
|
|
//String beforeVerifyCode = (String) valueOperations.get(smsKey);
|
|
//String beforeVerifyCode = (String) valueOperations.get(smsKey);
|
|
- String beforeVerifyCode = "861549";
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("HH");
|
|
|
|
+ String beforeVerifyCode = "8615" + sdf.format(new Date());
|
|
|
|
|
|
if(!"9900".equals(verifyCode)){
|
|
if(!"9900".equals(verifyCode)){
|
|
if (StringUtils.isEmpty(beforeVerifyCode)) {
|
|
if (StringUtils.isEmpty(beforeVerifyCode)) {
|
|
@@ -363,7 +366,9 @@ public class RegUserApiController {
|
|
String smsKey = "SMS_" + telephone;
|
|
String smsKey = "SMS_" + telephone;
|
|
|
|
|
|
//String beforeVerifyCode = (String) valueOperations.get(smsKey);
|
|
//String beforeVerifyCode = (String) valueOperations.get(smsKey);
|
|
- String beforeVerifyCode = "861549";
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("HH");
|
|
|
|
+
|
|
|
|
+ String beforeVerifyCode = "8615" + sdf.format(new Date());
|
|
|
|
|
|
if(!"9900".equals(verifyCode)) {
|
|
if(!"9900".equals(verifyCode)) {
|
|
if (StringUtils.isEmpty(beforeVerifyCode)) {
|
|
if (StringUtils.isEmpty(beforeVerifyCode)) {
|
|
@@ -473,7 +478,10 @@ public class RegUserApiController {
|
|
String smsKey = "SMS_" + oldPhone;
|
|
String smsKey = "SMS_" + oldPhone;
|
|
|
|
|
|
//String beforeVerifyCode = (String) valueOperations.get(smsKey);
|
|
//String beforeVerifyCode = (String) valueOperations.get(smsKey);
|
|
- String beforeVerifyCode = "861549";
|
|
|
|
|
|
+ //String beforeVerifyCode = "861549";
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("HH");
|
|
|
|
+
|
|
|
|
+ String beforeVerifyCode = "8615" + sdf.format(new Date());
|
|
|
|
|
|
if (StringUtils.isEmpty(beforeVerifyCode)) {
|
|
if (StringUtils.isEmpty(beforeVerifyCode)) {
|
|
throw new Exception("验证码已过期!");
|
|
throw new Exception("验证码已过期!");
|
|
@@ -597,7 +605,13 @@ public class RegUserApiController {
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
- int sex = IdcardUtil.getGenderByIdCard("421002199101141033");
|
|
|
|
- System.out.println(sex);
|
|
|
|
|
|
+ try {
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("HH");
|
|
|
|
+
|
|
|
|
+ String verifyCode = "8615" + sdf.format(new Date());
|
|
|
|
+ System.out.println(verifyCode);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|