Commit 3d1453a8 authored by libin's avatar libin

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents f546f31f a3798099
...@@ -15,7 +15,12 @@ public class RabbitConstant { ...@@ -15,7 +15,12 @@ public class RabbitConstant {
public static final String ORDER_TOPIC = ORDER+ TOPIC_EXC; public static final String ORDER_TOPIC = ORDER+ TOPIC_EXC;
/**************************key*********************************/ /**************************key*********************************/
public static final String KEY_REGISTER_SUCCESS = "register.success"; public static final String KEY_APPUSER_REGISTER = "appUser.register";
public static final String KEY_APPUSER_AUTH = "appUser.auth";
public static final String KEY_ORDER_PAY = "order.pay";
public static final String KEY_ORDER_FINLISH = "order.finlish";
public static final String KEY_ORDER_CANCEL = "order.cancel";
static { static {
exchangeTopicSet = new HashSet<String>() {{ exchangeTopicSet = new HashSet<String>() {{
......
...@@ -82,7 +82,7 @@ public class AppUserVo { ...@@ -82,7 +82,7 @@ public class AppUserVo {
@ApiModelProperty(value = "邀请人id:") @ApiModelProperty(value = "邀请人id:")
private Integer inviterAccount; private Integer inviterAccount;
@ApiModelProperty(value = "1-新人用户;2-未激活;3-激活:") @ApiModelProperty(value = "1-未激活;2-激活:")
private Integer state; private Integer state;
} }
...@@ -3,15 +3,11 @@ package com.github.wxiaoqi.security.admin.config; ...@@ -3,15 +3,11 @@ package com.github.wxiaoqi.security.admin.config;
import com.github.wxiaoqi.security.common.config.RabbitCommonConfig; import com.github.wxiaoqi.security.common.config.RabbitCommonConfig;
import com.github.wxiaoqi.security.common.config.rabbit.BindDTO; import com.github.wxiaoqi.security.common.config.rabbit.BindDTO;
import com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant; import com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant;
import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import static com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant.*;
/** /**
* rabbitmq配置类 * rabbitmq配置类
* 包含: 不知道什么orderWater队列 * 包含: 不知道什么orderWater队列
...@@ -23,13 +19,13 @@ public class RabbitAdminConfig extends RabbitCommonConfig { ...@@ -23,13 +19,13 @@ public class RabbitAdminConfig extends RabbitCommonConfig {
public static final String ORDER_WATER_QUEUE = "order.water.queue"; public static final String ORDER_WATER_QUEUE = "order.water.queue";
public static final String ORDER_FINLISH_user_re_QUEUE = "order.cancel.userRe.queue"; public static final String ORDER_FINLISH_USER_RE_QUEUE = "order.cancel.userRe.queue";
static { static {
myQueue = new ArrayList<BindDTO>(){{ myQueue = new ArrayList<BindDTO>(){{
add(new BindDTO(ORDER_WATER_QUEUE, RabbitConstant.ADMIN_TOPIC, "order.pay")); add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_PAY));
add(new BindDTO(ORDER_WATER_QUEUE, RabbitConstant.ADMIN_TOPIC, "order.finlish")); add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_FINLISH));
add(new BindDTO(ORDER_WATER_QUEUE, RabbitConstant.ADMIN_TOPIC, "order.cancel")); add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_CANCEL));
add(new BindDTO(ORDER_FINLISH_user_re_QUEUE, RabbitConstant.ADMIN_TOPIC, "order.finlish")); add(new BindDTO(ORDER_FINLISH_USER_RE_QUEUE, ADMIN_TOPIC, KEY_ORDER_FINLISH));
}}; }};
} }
} }
......
...@@ -32,7 +32,7 @@ public class IntegralMQHandler { ...@@ -32,7 +32,7 @@ public class IntegralMQHandler {
} }
@RabbitListener(queues = {ORDER_FINLISH_user_re_QUEUE}) @RabbitListener(queues = {ORDER_FINLISH_USER_RE_QUEUE})
public void integralHandler2(String json) { public void integralHandler2(String json) {
log.info("接收到的消息:json = {}", json); log.info("接收到的消息:json = {}", json);
try{ try{
......
...@@ -12,7 +12,7 @@ import java.util.List; ...@@ -12,7 +12,7 @@ import java.util.List;
public interface AppUserDetailMapper extends Mapper<AppUserDetail> { public interface AppUserDetailMapper extends Mapper<AppUserDetail> {
//查询用户信息 //查询用户信息
public AppUserVo getUserInfo(@Param("userId") Integer userId); AppUserVo getUserInfo(@Param("userId") Integer userId);
List<AppUserManageVo> selectAppUserManage(AppUserManageDTO appUserManageDTO); List<AppUserManageVo> selectAppUserManage(AppUserManageDTO appUserManageDTO);
......
...@@ -50,7 +50,7 @@ import javax.annotation.Resource; ...@@ -50,7 +50,7 @@ import javax.annotation.Resource;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant.KEY_REGISTER_SUCCESS; import static com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant.*;
/** /**
* @author keliii * @author keliii
...@@ -340,7 +340,14 @@ public class AppPermissionService { ...@@ -340,7 +340,14 @@ public class AppPermissionService {
registerQueueDTO.setInParamDTO(new RegisterParamDTO(username, password, headimgurl, registerQueueDTO.setInParamDTO(new RegisterParamDTO(username, password, headimgurl,
nickname, mobilecode, openId, unionid, type, code, activityCode)); nickname, mobilecode, openId, unionid, type, code, activityCode));
// 注册成功,发送队列 // 注册成功,发送队列
mqSenderFeign.sendMessage(RabbitConstant.ADMIN_TOPIC, KEY_REGISTER_SUCCESS, JSONUtil.toJsonStr(registerQueueDTO)); switch (sign){
case 1 :
mqSenderFeign.sendMessage(RabbitConstant.ADMIN_TOPIC, KEY_APPUSER_REGISTER, JSONUtil.toJsonStr(registerQueueDTO));
case 2 :
mqSenderFeign.sendMessage(RabbitConstant.ADMIN_TOPIC, KEY_APPUSER_AUTH, JSONUtil.toJsonStr(registerQueueDTO));
default:
break;
}
}catch (Exception e){ }catch (Exception e){
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
...@@ -387,15 +394,17 @@ public class AppPermissionService { ...@@ -387,15 +394,17 @@ public class AppPermissionService {
activityCode = codes[1]; activityCode = codes[1];
} }
} }
if (StringUtils.isNotBlank(code1)){ Integer parentId=0;
Integer parentId=appUserDetailBiz.getUserByCode(code1); if (StringUtils.isNotBlank(code1)) {
parentId = appUserDetailBiz.getUserByCode(code1);
//绑定上下线关系 //绑定上下线关系
if(parentId!=null&&parentId>0) { if (parentId != null && parentId > 0) {
relationBiz.bindRelation(userid, parentId, 1); relationBiz.bindRelation(userid, parentId, 1);
} }
}
//活动消息 //活动消息
Integer state=userVo.getState(); Integer state=userVo.getState();
if(state!=null&&state==1&&StringUtils.isNotBlank(activityCode)){ if(state!=null&&state==1){
if(userVo.getInviterAccount()==null||userVo.getInviterAccount()==0){ if(userVo.getInviterAccount()==null||userVo.getInviterAccount()==0){
userVo.setInviterAccount(parentId); userVo.setInviterAccount(parentId);
} }
...@@ -403,9 +412,6 @@ public class AppPermissionService { ...@@ -403,9 +412,6 @@ public class AppPermissionService {
appUserDetailBiz.updUuserInfoById(userVo); appUserDetailBiz.updUuserInfoById(userVo);
sendQueue(username,null, headimgurl, nickname, null, null, null, null, code1, activityCode, userid,RegisterQueueDTO.SIGN_ACTIVATE); sendQueue(username,null, headimgurl, nickname, null, null, null, null, code1, activityCode, userid,RegisterQueueDTO.SIGN_ACTIVATE);
} }
}
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<result column="source" property="source"/> <result column="source" property="source"/>
<result column="code" property="code"/> <result column="code" property="code"/>
<result column="invitera_ccount" property="inviterAccount"/> <result column="invitera_ccount" property="inviterAccount"/>
<result column="state" property="state"/>
</resultMap> </resultMap>
......
...@@ -8,6 +8,8 @@ import org.springframework.context.annotation.Configuration; ...@@ -8,6 +8,8 @@ import org.springframework.context.annotation.Configuration;
import java.util.ArrayList; import java.util.ArrayList;
import static com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant.*;
/** /**
* rabbitmq配置类 * rabbitmq配置类
* 包含: 不知道什么orderWater队列 * 包含: 不知道什么orderWater队列
...@@ -24,11 +26,11 @@ public class RabbitActivityConfig extends RabbitCommonConfig { ...@@ -24,11 +26,11 @@ public class RabbitActivityConfig extends RabbitCommonConfig {
public static final String INTEGRAL_HANDLE_QUEUE = "integral_handle_queue"; public static final String INTEGRAL_HANDLE_QUEUE = "integral_handle_queue";
static { static {
myQueue = new ArrayList<BindDTO>(){{ myQueue = new ArrayList<BindDTO>(){{
add(new BindDTO(INTEGRAL_QUEUE, RabbitConstant.ORDER_TOPIC, "order.#")); add(new BindDTO(INTEGRAL_QUEUE, ORDER_TOPIC, "order.#"));
add(new BindDTO(POPULARZIE_0101_QUEUE, RabbitConstant.ADMIN_TOPIC, "appUser.register")); add(new BindDTO(POPULARZIE_0101_QUEUE, ADMIN_TOPIC, KEY_APPUSER_REGISTER));
add(new BindDTO(POPULARZIE_0101_QUEUE, RabbitConstant.ADMIN_TOPIC, "appUser.auth")); add(new BindDTO(POPULARZIE_0101_QUEUE, ADMIN_TOPIC, KEY_APPUSER_AUTH));
add(new BindDTO(ACTIVITY_NEW_QUEUE, RabbitConstant.ADMIN_TOPIC, "appUser.register")); add(new BindDTO(ACTIVITY_NEW_QUEUE, ADMIN_TOPIC, KEY_APPUSER_REGISTER));
add(new BindDTO(ACTIVITY_NEW_QUEUE, RabbitConstant.ADMIN_TOPIC, "appUser.auth")); add(new BindDTO(ACTIVITY_NEW_QUEUE, ADMIN_TOPIC, KEY_APPUSER_AUTH));
add(new BindDTO(INTEGRAL_HANDLE_QUEUE, MQconstant.INTEGRAL_EXCHANGE, MQconstant.INTEGRAL_ROUTING_KEY)); add(new BindDTO(INTEGRAL_HANDLE_QUEUE, MQconstant.INTEGRAL_EXCHANGE, MQconstant.INTEGRAL_ROUTING_KEY));
}}; }};
} }
......
...@@ -59,12 +59,12 @@ public class BaseOrder implements Serializable { ...@@ -59,12 +59,12 @@ public class BaseOrder implements Serializable {
@Column(name = "status") @Column(name = "status")
@ApiModelProperty(value = "订单状态" @ApiModelProperty(value = "订单状态"
+"0--删除" +"0--删除"
+"1--创建订单" +"1--创建订单"
+"2--取消" +"2--取消"
+"3--待付款" +"3--待付款"
+"4--待出行" +"4--待出行"
+"5--出行中(进行中)" +"5--出行中(进行中)"
+"6--已完成") +"6--已完成")
private Integer status; private Integer status;
......
package com.xxfc.platform.order.pojo.mq;
import lombok.Data;
@Data
public class OrderMQDTO {
public static final Integer ORDER_CRT = 1;
public static final Integer ORDER_CANCEL = 2;
public static final Integer ORDER_PAY = 4;
public static final Integer ORDER_FINISH = 6;
Integer orderId;
/**
* 标记是什么操作
* 0--删除"
* 1--创建订单"
* 2--取消"
*
* 4--已支付"
*
* 6--已完成
*/
Integer sign;
}
...@@ -17,11 +17,11 @@ import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum; ...@@ -17,11 +17,11 @@ import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum;
import com.xxfc.platform.order.contant.enumerate.RefundTypeEnum; import com.xxfc.platform.order.contant.enumerate.RefundTypeEnum;
import com.xxfc.platform.order.entity.*; import com.xxfc.platform.order.entity.*;
import com.xxfc.platform.order.mapper.BaseOrderMapper; import com.xxfc.platform.order.mapper.BaseOrderMapper;
import com.xxfc.platform.order.pojo.mq.OrderMQDTO;
import com.xxfc.platform.order.pojo.order.OrderListVo; import com.xxfc.platform.order.pojo.order.OrderListVo;
import com.xxfc.platform.order.pojo.order.OrderPageVO; import com.xxfc.platform.order.pojo.order.OrderPageVO;
import com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto; import com.xxfc.platform.order.pojo.order.OrderVehicleCrosstownDto;
import com.xxfc.platform.tour.feign.TourFeign; import com.xxfc.platform.tour.feign.TourFeign;
import com.xxfc.platform.universal.dto.SmsTemplateDTO;
import com.xxfc.platform.universal.feign.ThirdFeign; import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxfc.platform.universal.vo.OrderRefundVo; import com.xxfc.platform.universal.vo.OrderRefundVo;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
...@@ -512,4 +512,16 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -512,4 +512,16 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
return zero; return zero;
} }
private void sendQueue(Integer orderId, Integer sign) {
try {
OrderMQDTO orderMQDTO = new OrderMQDTO(){{
setOrderId(orderId);
setSign(sign);
}};
//mqSenderFeign.sendMessage(RabbitConstant.ADMIN_TOPIC, KEY_REGISTER_SUCCESS, JSONUtil.toJsonStr(orderMQDTO));
}catch (Exception e){
log.error(e.getMessage(), e);
}
}
} }
\ No newline at end of file
...@@ -209,16 +209,17 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To ...@@ -209,16 +209,17 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To
insureAmount = insureAmount.add(INSURE_PRICE.multiply(new BigDecimal(String.valueOf(detail.getTotalNumber() * detail.getTourGood().getNumber())))); insureAmount = insureAmount.add(INSURE_PRICE.multiply(new BigDecimal(String.valueOf(detail.getTotalNumber() * detail.getTourGood().getNumber()))));
} }
//总价
tourAmount = tourAmount.add(tourSpePriceVo.getTotalPrice()).add(tourSpePriceVo.getTotalChildPrice());
//商品价格
goodsAmount = goodsAmount.add(tourAmount);
//优惠券处理 //优惠券处理
//待完成 //待完成
if(null != detail.getTickerNo() && detail.getTickerNo().size() > 0) { if(null != detail.getTickerNo() && detail.getTickerNo().size() > 0) {
couponAmount = activityFeign.use(dto.getUserid(), detail.getTickerNo().get(0), detail.getOrder().getNo(), channel, goodsAmount, ActivityFeign.TYPE_NO_USE); couponAmount = activityFeign.use(dto.getUserid(), detail.getTickerNo().get(0), detail.getOrder().getNo(), channel, goodsAmount, ActivityFeign.TYPE_NO_USE);
} }
//总价
tourAmount = tourAmount.add(tourSpePriceVo.getTotalPrice()).add(tourSpePriceVo.getTotalChildPrice());
//商品价格
goodsAmount = goodsAmount.add(tourAmount);
//总价格 //总价格
orderAmount = orderAmount.add(goodsAmount).add(insureAmount); orderAmount = orderAmount.add(goodsAmount).add(insureAmount);
......
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