|
|
@@ -53,10 +53,10 @@ public class UserRegisterController extends BaseController {
|
|
|
@Resource
|
|
|
private VoucherService voucherService;
|
|
|
Logger logger = Logger.getLogger(UserRegisterController.class);
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 网站用户注册
|
|
|
- *
|
|
|
+ *
|
|
|
* @param user
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -82,15 +82,15 @@ public class UserRegisterController extends BaseController {
|
|
|
res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "用户已存在"));
|
|
|
return res;
|
|
|
}
|
|
|
- if (TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME) ==null||!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode.toLowerCase())) {
|
|
|
- res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
|
|
|
- return res;
|
|
|
- }
|
|
|
- // 验证码15分钟有效
|
|
|
- if (TimeUtils.checkOverTime("register")) {
|
|
|
- res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
|
|
|
- return res;
|
|
|
- }
|
|
|
+// if (TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE_TIME) ==null||!TokenManager.getSession().getAttribute(VerifyCodeUtils.M_CODE).equals(mobileCode.toLowerCase())) {
|
|
|
+// res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "手机验证码错误"));
|
|
|
+// return res;
|
|
|
+// }
|
|
|
+// // 验证码15分钟有效
|
|
|
+// if (TimeUtils.checkOverTime("register")) {
|
|
|
+// res.getError().add(buildError(ErrorConstants.MCODE_OVERTIME_ERROR, "手机验证码超时失效"));
|
|
|
+// return res;
|
|
|
+// }
|
|
|
if (user.getBeInviteCode()!=null&&!user.getBeInviteCode().equals("")&&userService.checkeToInviteCode(user.getBeInviteCode())) {
|
|
|
res.getError().add(buildError("邀请码不存在", "邀请码不存在"));
|
|
|
return res;
|
|
|
@@ -120,11 +120,11 @@ public class UserRegisterController extends BaseController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* APP用户注册
|
|
|
- *
|
|
|
+ *
|
|
|
* @param user
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -187,10 +187,10 @@ public class UserRegisterController extends BaseController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/*public void getVoucher(User u){
|
|
|
if (StringUtils.isNotBlank(u.getBackgroundUrl())) {
|
|
|
-
|
|
|
+
|
|
|
List<String> ids=voucherService.getSourceVoucher(VoucherSourceType.BYQFWS.getCode());
|
|
|
for (String s : ids) {
|
|
|
JtVoucherDetail j=new JtVoucherDetail();
|
|
|
@@ -201,10 +201,10 @@ public class UserRegisterController extends BaseController {
|
|
|
j.setStatus(0);
|
|
|
voucherDetailService.saveVoucherDetail(j);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private void registerEasemobAfterRegister(String uuid,User u){
|
|
|
JSONObject resultObj = new JSONObject();
|
|
|
String easemobName = String.valueOf(u.getNumber());
|
|
|
@@ -215,6 +215,6 @@ public class UserRegisterController extends BaseController {
|
|
|
easemobUtils.send(
|
|
|
new EasemobInfo().uri("/users/").data(resultObj.toJSONString()).method(HttpMethod.POST));
|
|
|
//绑定账号
|
|
|
- messageService.addJpushEasemobAccount(uuid,u.getId(),easemobName,easemobPass);
|
|
|
+ messageService.addJpushEasemobAccount(uuid,u.getId(),easemobName,easemobPass);
|
|
|
}*/
|
|
|
}
|