Commit 63c74fec authored by hezhen's avatar hezhen

新人有礼参加活动

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