Commit 38296d30 authored by hezhen's avatar hezhen

123

parent 5a00f250
...@@ -215,6 +215,7 @@ public class AppPermissionService { ...@@ -215,6 +215,7 @@ public class AppPermissionService {
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public JSONObject register(String username, String password, String headimgurl, public JSONObject register(String username, String password, String headimgurl,
String nickname, String mobilecode, String openId, String unionid, Integer type,String code) { String nickname, String mobilecode, String openId, String unionid, Integer type,String code) {
log.info("register------code====="+code);
String activityCode = null; String activityCode = null;
// 判断参数和验证码 // 判断参数和验证码
if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) { if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) {
...@@ -279,8 +280,12 @@ public class AppPermissionService { ...@@ -279,8 +280,12 @@ public class AppPermissionService {
} }
parentId=appUserDetailBiz.getUserByCode(code); parentId=appUserDetailBiz.getUserByCode(code);
} }
if(parentId!=null&&parentId>0&&StringUtils.isNotBlank(activityCode)){ if(parentId!=null&&parentId>0){
rsUserDetail.setInviterAccount(parentId); relationBiz.bindRelation(userid, parentId, 1);
if(StringUtils.isNotBlank(activityCode)){
rsUserDetail.setInviterAccount(parentId);
}
} }
//生成邀请码 长度改为8 不然重复率太高 //生成邀请码 长度改为8 不然重复率太高
rsUserDetail.setCode(UUIDUtils.genCodes(8)); rsUserDetail.setCode(UUIDUtils.genCodes(8));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment