PLF 5 éve
szülő
commit
8548b2c51c

+ 4 - 1
src/main/java/com/caimei/controller/user/LoginController.java

@@ -34,6 +34,9 @@ public class LoginController {
     private static String AppId;
     private static String AppSecret;
 
+    @Value("${miniprogram.ValidTime}")
+    private Integer ValidTime;
+
     @Value("${miniprogram.AppId}")
     public void setAppId(String appId) {
         AppId = appId;
@@ -133,7 +136,7 @@ public class LoginController {
         Date date = new Date();
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(operationUser.getInvitationCodeTime());
-        calendar.add(Calendar.DATE, 2);
+        calendar.add(Calendar.DATE, ValidTime);
         if (operationUser.getStatus().equals("1") && date.getTime() > calendar.getTime().getTime() && operationUser.getDelFlag().equals("0")) {
             return res.error("-2", mobile);
         }

+ 3 - 1
src/main/resources/dev/application-dev.yml

@@ -42,4 +42,6 @@ logging:
 
 miniprogram:
   AppId: wxd3cadbba8bf55f47
-  AppSecret: 811a6ab8105e0bdf24cd78f6e6f009a7
+  AppSecret: 811a6ab8105e0bdf24cd78f6e6f009a7
+  #邀请码有效时长  /天
+  ValidTime: 7

+ 3 - 1
src/main/resources/prod/application-prod.yml

@@ -44,4 +44,6 @@ logging:
 
 miniprogram:
   AppId: wxd3cadbba8bf55f47
-  AppSecret: 811a6ab8105e0bdf24cd78f6e6f009a7
+  AppSecret: 811a6ab8105e0bdf24cd78f6e6f009a7
+  #邀请码有效时长  /天
+  ValidTime: 7

+ 3 - 1
src/main/resources/test/application-test.yml

@@ -43,4 +43,6 @@ logging:
 
 miniprogram:
   AppId: wxd3cadbba8bf55f47
-  AppSecret: 811a6ab8105e0bdf24cd78f6e6f009a7
+  AppSecret: 811a6ab8105e0bdf24cd78f6e6f009a7
+  #邀请码有效时长  /天
+  ValidTime: 7