Commit 96034f72 authored by hezhen's avatar hezhen

123

parent 476925db
...@@ -22,6 +22,8 @@ public class RabbitConstant { ...@@ -22,6 +22,8 @@ public class RabbitConstant {
public static final String KEY_ORDER_PAY = "order.pay"; public static final String KEY_ORDER_PAY = "order.pay";
public static final String KEY_ORDER_FINLISH = "order.finlish"; public static final String KEY_ORDER_FINLISH = "order.finlish";
public static final String KEY_ORDER_CANCEL = "order.cancel"; public static final String KEY_ORDER_CANCEL = "order.cancel";
public static final String INTEGRAL_ROUTING_KEY = "integral_routing_key";
static { static {
exchangeTopicSet = new HashSet<String>() {{ exchangeTopicSet = new HashSet<String>() {{
add(ADMIN_TOPIC); add(ADMIN_TOPIC);
......
...@@ -12,7 +12,7 @@ public class RegisterQueueDTO { ...@@ -12,7 +12,7 @@ public class RegisterQueueDTO {
/** /**
* 执行方法的入参 * 执行方法的入参
*/ */
RegisterParamDTO InParamDTO; RegisterParamDTO inParamDTO;
/** /**
* app用户id * app用户id
......
...@@ -216,6 +216,7 @@ public class AppPermissionService { ...@@ -216,6 +216,7 @@ public class AppPermissionService {
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) {
String activityCode = null; String activityCode = null;
String inviterCode = null;
// 判断参数和验证码 // 判断参数和验证码
if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) { if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(mobilecode)) {
...@@ -271,11 +272,14 @@ public class AppPermissionService { ...@@ -271,11 +272,14 @@ public class AppPermissionService {
setCreateIPInfo(rsUserDetail); setCreateIPInfo(rsUserDetail);
//邀请人id关系绑定 //邀请人id关系绑定
Integer parentId=0; Integer parentId=0;
String code1=null;
if (StringUtils.isNotBlank(code)){ if (StringUtils.isNotBlank(code)){
//判断处理活动关键字 //判断处理活动关键字
String[] codes = code.split("_"); String[] codes = code.split("_");
if(codes.length > 1) { if(codes.length > 1) {
parentId=appUserDetailBiz.getUserByCode(codes[0]); activityCode = codes[1];
inviterCode = codes[0];
parentId=appUserDetailBiz.getUserByCode(inviterCode);
} }
} }
if(parentId!=null&&parentId>0){ if(parentId!=null&&parentId>0){
...@@ -316,7 +320,7 @@ public class AppPermissionService { ...@@ -316,7 +320,7 @@ public class AppPermissionService {
data.put("imUserId", imUserId); data.put("imUserId", imUserId);
} }
if (data != null) { if (data != null) {
sendQueue(username, password, headimgurl, nickname, mobilecode, openId, unionid, type, code, activityCode, userid,RegisterQueueDTO.SIGN_NEW); sendQueue(username, password, headimgurl, nickname, mobilecode, openId, unionid, type, inviterCode, activityCode, userid,RegisterQueueDTO.SIGN_NEW);
return JsonResultUtil.createSuccessResultWithObj(data); return JsonResultUtil.createSuccessResultWithObj(data);
} else { } else {
return JsonResultUtil.createDefaultFail(); return JsonResultUtil.createDefaultFail();
......
package com.xxfc.platform.activity.handler; package com.xxfc.platform.activity.handler;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.admin.dto.RegisterQueueDTO; import com.github.wxiaoqi.security.admin.dto.RegisterQueueDTO;
import com.rabbitmq.client.Channel; import com.rabbitmq.client.Channel;
...@@ -47,7 +48,7 @@ public class PopularizeMQHandler { ...@@ -47,7 +48,7 @@ public class PopularizeMQHandler {
log.info("接收到的消息:msg = {}, 消息ID是:messageId = {} ", msg, messageId); log.info("接收到的消息:msg = {}, 消息ID是:messageId = {} ", msg, messageId);
if (StringUtils.isNotBlank(msg)) { if (StringUtils.isNotBlank(msg)) {
RegisterQueueDTO registerQueueDTO = JSONObject.parseObject(msg, RegisterQueueDTO.class); RegisterQueueDTO registerQueueDTO = JSONUtil.toBean(msg, RegisterQueueDTO.class);
activityPopularizeBiz.handleRegister(registerQueueDTO); activityPopularizeBiz.handleRegister(registerQueueDTO);
} }
...@@ -80,7 +81,7 @@ public class PopularizeMQHandler { ...@@ -80,7 +81,7 @@ public class PopularizeMQHandler {
log.info("接收到的消息:msg = {}, 消息ID是:messageId = {} ", msg, messageId); log.info("接收到的消息:msg = {}, 消息ID是:messageId = {} ", msg, messageId);
if (StringUtils.isNotBlank(msg)) { if (StringUtils.isNotBlank(msg)) {
RegisterQueueDTO registerQueueDTO = JSONObject.parseObject(msg, RegisterQueueDTO.class); RegisterQueueDTO registerQueueDTO = JSONUtil.toBean(msg, RegisterQueueDTO.class);
if(registerQueueDTO!=null&&(registerQueueDTO.getSign()==RegisterQueueDTO.SIGN_NEW||registerQueueDTO.getSign()==RegisterQueueDTO.SIGN_ACTIVATE)){ if(registerQueueDTO!=null&&(registerQueueDTO.getSign()==RegisterQueueDTO.SIGN_NEW||registerQueueDTO.getSign()==RegisterQueueDTO.SIGN_ACTIVATE)){
activityUserJoinBiz.joinActivity(registerQueueDTO.getAppUserId()); activityUserJoinBiz.joinActivity(registerQueueDTO.getAppUserId());
} }
......
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