Przeglądaj źródła

Merge remote-tracking branch 'origin/dev' into test

wanghui 8 lat temu
rodzic
commit
1a7c4419cf

+ 2 - 2
src/main/java/com/goafanti/achievement/bo/InputAchievement.java

@@ -16,7 +16,7 @@ public class InputAchievement {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		dataCategory;
 
-	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 512, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		name;
 
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
@@ -64,7 +64,7 @@ public class InputAchievement {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer		innovation;
 
-	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 256, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		ownerName;
 
 	@Max(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")

+ 1 - 1
src/main/java/com/goafanti/common/model/User.java

@@ -2,7 +2,7 @@ package com.goafanti.common.model;
 
 import java.util.Date;
 
-public class User implements AftUser{
+public class User extends BaseModel implements AftUser{
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user.id
 	 * @mbg.generated  Tue Nov 14 19:38:26 CST 2017

+ 2 - 1
src/main/java/com/goafanti/common/utils/ExcelUtils.java

@@ -137,11 +137,12 @@ public class ExcelUtils {
 			vacantRows.add(rowNumber);
 			return "";
 		}else{
-			return String.valueOf(cellValue);
+			return String.valueOf(cellValue).trim();
 		} 
 	}
 
 	public String checkMobile(String mobile, int rowNumber){
+		mobile = mobile.trim();
 		String mobileRegex = "^1[3|4|5|7|8][0-9]{9}$"; 
 		String telRegex = "^\\d{3,4}-\\d{7,8}$";
 		if(StringUtils.isBlank(mobile)) return "";

+ 1 - 1
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -13,7 +13,7 @@ import com.goafanti.common.constant.ErrorConstants;
 
 public class MobileMessageUtils {
 	
-	private final static String SIGN_NAME = "技淘网";
+	private final static String SIGN_NAME = "阿凡提信息科技";
 	
 	private final static String SERVER_EXCEPTION = "服务器端手机验证码异常:%s";
 	

+ 9 - 0
src/main/java/com/goafanti/common/utils/PasswordUtil.java

@@ -1,5 +1,6 @@
 package com.goafanti.common.utils;
 
+import java.util.Calendar;
 import java.util.Date;
 
 import org.apache.shiro.crypto.hash.SimpleHash;
@@ -56,4 +57,12 @@ public class PasswordUtil {
 	public ByteSource getSalt(Date date) {
 		return ByteSource.Util.bytes(String.valueOf(date.getTime()));
 	}
+	
+	
+	public static void main(String[] args) {
+		Calendar now = Calendar.getInstance();
+		now.set(Calendar.MILLISECOND, 0);
+		String s = String.valueOf(now.getTime());
+		System.out.println(new SimpleHash("md5","123456",s,2));
+	}
 }

+ 6 - 5
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -6,7 +6,6 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -518,10 +517,12 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 	@Override
 	public void checkCustomer(Set<CustomerExcelBo> boSet, Set<Integer> existRows, Set<Integer> filterRows) {
 		List<User> list = null;
-		for (CustomerExcelBo bo : boSet) {
+		CustomerExcelBo[] bos = (CustomerExcelBo[])boSet.toArray(new CustomerExcelBo[] {});
+		for (int i=0;i<bos.length;i++) {
+			CustomerExcelBo bo = bos[i];
 			CustomerExcelBo ceb = null;
-			for(Iterator<CustomerExcelBo> it = boSet.iterator();it.hasNext();){ //先自检
-				ceb = it.next();
+			for(int j=0;j<i;j++){
+				ceb = bos[j];
 				if(bo.getCustomerType().equals(AFTConstants.USER_TYPE_PERSONAL)){ //个人
 					if(ceb.getMobile().equals(bo.getMobile()) && ceb.getCustomerType().equals(bo.getCustomerType())){
 						bo.setUid(ceb.getUid());
@@ -536,7 +537,7 @@ public class CustomerServiceImpl  extends BaseMybatisDao<UserMapper> implements
 						filterRows.add(bo.getRowNumber());
 						break;
 					}
-				}	
+				}
 			}
 			if(StringUtils.isBlank(bo.getUid())){ //是否已经存在
 				if(bo.getCustomerType().equals(AFTConstants.USER_TYPE_PERSONAL)){