anderx лет назад: 4
Родитель
Сommit
8e28714b73

+ 13 - 0
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -9,12 +9,14 @@ import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.Row;
@@ -80,6 +82,8 @@ public class PublicController extends CertifyApiController {
 	
 	@Value(value = "${mobileRemindCodeTemplate}")
 	private String					mobileRemindCodeTemplate	= null;
+	@Value(value = "${wx.clockInRange}")
+	private String clockInRange;
 
 	@Resource
 	private UserService				userService;
@@ -723,6 +727,15 @@ public class PublicController extends CertifyApiController {
               }
           }    
            
+          @RequestMapping("/getWxConfig")
+          public Result getWxConfig() {
+        	  Result res =new Result();
+        	  Map<String, Object> config=new HashedMap<String, Object>();
+        	  config.put("clockInRange", clockInRange);
+        	  res.data(config);
+			return res;
+          }
+          
 
 	
 }

+ 3 - 0
src/main/java/com/goafanti/common/utils/SendEmailUtil.java

@@ -134,6 +134,9 @@ public class SendEmailUtil {
 	}
 	
 	public static boolean isEmail(String email){
+		if (StringUtils.isEmpty(email)) {
+			return false;
+		}
     	//邮箱正则表达式
         String pattern = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
         Pattern p = Pattern.compile(pattern);

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -76,7 +76,7 @@ wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7
 #developer为开发版;trial为体验版;formal为正式版;
 wx.state=trial
-
+wx.clockInRange=1000
 
 •
 

+ 1 - 0
src/main/resources/props/config_test.properties

@@ -69,6 +69,7 @@ wx.appId=wxff2f5720ed7d7f63
 wx.appSecret=081744369d42405be58fe37f892631f7
 #developer为开发版;trial为体验版;formal为正式版;
 wx.state=trial
+wx.clockInRange=1000
 
 upload.path=/data/static/public/upload
 upload.private.path=/data/static/private/upload