Commit c2971868 authored by 周健威's avatar 周健威

添加分成结算节点队列通知

parent 8e0832ee
......@@ -33,6 +33,8 @@ public class RabbitConstant {
public static final String KEY_ORDER_FINLISH = "order.finlish";
public static final String KEY_ORDER_CANCEL = "order.cancel";
public static final String KEY_ORDER_PART_DEPOSIT = "order.partDeposit";
public static final String KEY_ORDER_END_1 = "order.end.1";
public static final String KEY_ORDER_END_2 = "order.end.2";
//钱包
public static final String KEY_WALLET_ADD = "wallet.add";
......
......@@ -16,6 +16,8 @@ public class OrderMQDTO extends BaseOrder implements OrderItemInter {
public static final int ORDER_PAY = 4;
public static final int ORDER_FINISH = 6;
public static final int ORDER_PART_DEPOSIT = 101;
public static final int ORDER_END_1 = 201;
public static final int ORDER_END_2 = 202;
OrderRentVehicleDetail orderRentVehicleDetail;
......
......@@ -83,6 +83,7 @@ import java.util.stream.Collectors;
import static com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant.*;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TRUE;
import static com.xxfc.platform.order.pojo.mq.OrderMQDTO.*;
import static com.xxfc.platform.universal.constant.DictionaryKey.APP_ORDER;
import static com.xxfc.platform.universal.constant.DictionaryKey.ILLEGAL_TYPE;
......@@ -824,9 +825,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
//处理后台用户提醒短信的发送
// orderMsgBiz.handelBgUserMsg4Pay(orvd, baseOrder, appUserDTO, OrderMsgBiz.RENT_PAY);
sendOrderMq(orvd, otd, omd, baseOrder, OrderMQDTO.ORDER_PAY);
sendOrderMq(orvd, otd, omd, baseOrder, ORDER_PAY);
if (OrderTypeEnum.MEMBER.getCode().equals(baseOrder.getType())) {
sendOrderMq(orvd, otd, omd, baseOrder, OrderMQDTO.ORDER_FINISH);
sendOrderMq(orvd, otd, omd, baseOrder, ORDER_FINISH);
sendOrderMq(orvd, otd, omd, baseOrder, ORDER_END_1);
//订单完成时,payway为 支付宝,则转支付
baseOrder.setPayWay(payWay);
orderAccountBiz.finishFreeze2PayAmount(baseOrder);
......@@ -935,18 +937,24 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
}};
sendMsgDTO.setJson(JSONUtil.toJsonStr(orderMQDTO));
switch (sign) {
case 2:
case ORDER_CANCEL:
sendMsgDTO.setRoutKey(KEY_ORDER_CANCEL);
break;
case 4:
case ORDER_PAY:
sendMsgDTO.setRoutKey(KEY_ORDER_PAY);
break;
case 6:
case ORDER_FINISH:
sendMsgDTO.setRoutKey(KEY_ORDER_FINLISH);
break;
case 101:
case ORDER_PART_DEPOSIT:
sendMsgDTO.setRoutKey(KEY_ORDER_PART_DEPOSIT);
break;
case ORDER_END_1:
sendMsgDTO.setRoutKey(KEY_ORDER_END_1);
break;
case ORDER_END_2:
sendMsgDTO.setRoutKey(KEY_ORDER_END_2);
break;
default:
break;
}
......
......@@ -550,6 +550,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//发送押金退还完成队列消息
baseOrderBiz.sendOrderMq(orderMQDTO.getOrderRentVehicleDetail(), null, null, orderMQDTO, OrderMQDTO.ORDER_PART_DEPOSIT);
baseOrderBiz.sendOrderMq(orderMQDTO.getOrderRentVehicleDetail(), null, null, orderMQDTO, OrderMQDTO.ORDER_END_1);
//捕捉异常
try {
......@@ -729,6 +730,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
refundTrigger(baseOrder, orvd, BigDecimal.ZERO, orvd.getReturnPayResidue(), refundAmont, refundDesc, RefundStatusEnum.REFUND_DEPOSIT.getCode(), AccountTypeEnum.OUT_RESIDUE_DEPOSIT, oad);
orderDepositRefundRecordBiz.completeRecordStatus(crosstown.getId(), DepositRefundStatus.VIOLATIONARRIVAL);
orderMsgBiz.handelMsgDeposit(orvd, baseOrder, userFeign.userDetailById(baseOrder.getUserId()).getData());
baseOrderBiz.sendOrderMq(orvd, null, null, baseOrder, OrderMQDTO.ORDER_END_2);
}
/**
......
......@@ -138,6 +138,7 @@ public class OrderTourVerificationBiz{
tourDetail = tourDetailBiz.updateSelectiveByIdReT(tourDetail);
tourFeign.updateTourGoodPersonNum(verificationId,"verification_person",total_number);
baseOrderBiz.sendOrderMq(null,tourDetail,null, baseOrder, OrderMQDTO.ORDER_FINISH);
baseOrderBiz.sendOrderMq(null,tourDetail,null, baseOrder, OrderMQDTO.ORDER_END_1);
//订单完成时,payway为 支付宝,则转支付
orderAccountBiz.finishFreeze2PayAmount(baseOrder);
return ObjectRestResponse.succ(tourDetail.getVerificationId());
......
......@@ -422,6 +422,7 @@ public class OrderCancelBiz {
//发送队列消息
baseOrderBiz.sendOrderMq(orvd, otd, omd, baseOrder, OrderMQDTO.ORDER_CANCEL);
baseOrderBiz.sendOrderMq(orvd, otd, omd, baseOrder, OrderMQDTO.ORDER_END_1);
//处理申请
//更新 申请状态
......
......@@ -22,8 +22,10 @@ public class RabbitOrderConfig extends RabbitCommonConfig {
public static final String ORDER_DEPOSIT_REFUND_QUEUE = "order.deposit.refund.queue";
//第一次分成结算
public static final String ORDER_DEPOSIT_FINISH_QUEUE = "order.deposit.finish.queue";
//第二次分成结算
public static final String ORDER_DEPOSIT_END2_QUEUE = "order.deposit.end2.queue";
//同步企业信息
......@@ -34,9 +36,14 @@ public class RabbitOrderConfig extends RabbitCommonConfig {
static {
myQueue = new ArrayList<BindDTO>(){{
//第一次押金退还
add(new BindDTO(ORDER_DEPOSIT_REFUND_QUEUE, ORDER_TOPIC, KEY_ORDER_FINLISH));
add(new BindDTO(ORDER_DEPOSIT_FINISH_QUEUE, ORDER_TOPIC, KEY_ORDER_FINLISH));
//第一次分成结算
add(new BindDTO(ORDER_DEPOSIT_FINISH_QUEUE, ORDER_TOPIC, KEY_ORDER_END_1));
//第二次分成结算
add(new BindDTO(ORDER_DEPOSIT_END2_QUEUE, ORDER_TOPIC, KEY_ORDER_END_2));
//企业
add(new BindDTO(ORDER_CORPORATION_UPD_QUEUE, VEHICLE_TOPIC, KEY_CORPORATION_UPD));
//门店
......
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