Commit 63c74fec authored by hezhen's avatar hezhen

新人有礼参加活动

parent 9af953e0
......@@ -263,8 +263,8 @@ public class AppPermissionService {
log.error("注册:新增用户详情: " + userid);
//临时会员绑定
insertUserMemberByUserIdAndPhone(userid, username);
//自动登录获取优惠卷
authCoupn(userid);
//参加新人活动
jionActivity(userid);
//创建钱包
walletBiz.createWalletByUserId(appUserLogin.getId());
// 登录结果要做做统一处理
......@@ -727,6 +727,16 @@ public class AppPermissionService {
}
}
//注册参与活动
public void jionActivity(Integer userId) {
try {
activityFeign.join(userId);
} catch (Exception e) {
e.printStackTrace();
return;
}
}
/**
* 通过用户id登录*** Unbelievable! ! !
......@@ -791,14 +801,16 @@ public class AppPermissionService {
setCreateIPInfo(rsUserDetail);
appUserDetailBiz.insertSelective(rsUserDetail);
log.error("注册:新增用户详情: " + userid);
//创建钱包
walletBiz.createWalletByUserId(appUserLogin.getId());
//临时会员绑定
insertUserMemberByUserIdAndPhone(userid, username);
//上线绑定
relationBiz.bindByUserId(userid, small_id);
//发送短信通知用户
thirdFeign.sendCode(username, password, SystemConfig.TEMPLATECODE);
//创建钱包
walletBiz.createWalletByUserId(appUserLogin.getId());
//参加新人活动
jionActivity(userid);
// 登录结果要做做统一处理
JSONObject data = autoLogin(userid, username, headimgurl, nickname);
// 到im注册,获取返回结果
......@@ -845,7 +857,8 @@ public class AppPermissionService {
AppUserLogin user = appUserLoginBiz.checkeUserLogin(username);
JSONObject data = new JSONObject();
if (null == user) {
String password = "12345678";
//随机生成密码
String password = UUIDUtils.genCodes(8);
data = applyRegister(username, password, headimgurl, nickname, small_id);
} else {
Integer userid = user.getId();
......
......@@ -38,6 +38,6 @@ public interface ActivityFeign {
@ApiOperation("新人有礼参加活动")
@RequestMapping(value = "/user", method = RequestMethod.POST)
public ObjectRestResponse user(@RequestParam(value = "userId",defaultValue ="0" ) Integer userId);
public ObjectRestResponse join(@RequestParam(value = "userId",defaultValue ="0" ) Integer userId);
}
......@@ -17,7 +17,7 @@ public class ActivityUserJoinController extends BaseController<ActivityUserJoinB
@ApiOperation("新人有礼参加活动")
@RequestMapping(value = "/user", method = RequestMethod.POST)
public ObjectRestResponse user(
public ObjectRestResponse join(
@RequestParam(value = "userId",defaultValue ="0" ) Integer userId){
baseBiz.joinActivity(userId);
return ObjectRestResponse.succ();
......
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