Authored by ping

Merge branch 'cocacola' into dev

... ... @@ -11,4 +11,23 @@ public class RandomUtil {
sb.append("yh");
return sb.toString();
}
/**
* java生成随机数字和字母组合
* @param length[生成随机数的长度]
* @return
*/
public static String getCharAndNumr(int numLength,int charLength) {
String val = "";
Random random = new Random();
for (int i = 0; i < 6; i++) {
// 输出字母还是数字
val += String.valueOf(random.nextInt(10));
}
for(int j=0;j<2;j++){
int choice = random.nextInt(2) % 2 == 0 ? 65 : 97;
val += (char) (choice + random.nextInt(26));
}
return val;
}
}
... ...
... ... @@ -231,7 +231,7 @@ public class CocacolaServiceImpl implements ICocacolaService {
RegisterReqBO registerReqBO = new RegisterReqBO();
registerReqBO.setArea(area);
registerReqBO.setProfile(mobile);
registerReqBO.setPassword(RandomUtil.autoGetPassword());
registerReqBO.setPassword(RandomUtil.getCharAndNumr(6, 2));
registerReqBO.setClient_type(client_type);
RegisterRspBO model = null;
try {
... ...