| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.wechat.externalInterface.common.Signature; |
| | | import com.matrix.component.wechat.externalInterface.common.Util; |
| | | import com.matrix.component.wechat.externalInterface.protocol.queryProtocol.NotifyData; |
| | | import com.matrix.config.RabbitMqConfig; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinUserDao; |
| | | import com.matrix.system.shopXcx.dao.ShopOrderDao; |
| | | import com.matrix.system.shopXcx.dao.ShopPayLogDao; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @Autowired |
| | | ScoreVipDetailService scoreVipDetailService; |
| | | |
| | | @Autowired |
| | | AsyncMessageManager asyncMessageManager; |
| | | |
| | | |
| | | @Value("${evn}") |
| | |
| | | //设置支付状态为支付成功 |
| | | modifyMap.put("payStatus", ShopOrder.ORDER_PAY_STATUS_SUCCESS); |
| | | //设置订单状态 |
| | | if (ShopOrder.ORDER_TYPE_GOODS == order.getOrderType()) { |
| | | if (ShopOrder.SHIPPING_METHOD_WL == order.getShippingMethod()) { |
| | | //如果是商品订单则进入待发货 |
| | | modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_SEND); |
| | | } else { |
| | | //如果是服务订单则进入待评价 |
| | | modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_REMARK); |
| | | } else if (ShopOrder.SHIPPING_METHOD_MDZT == order.getShippingMethod()) { |
| | | //如果是门店自提则进入待收款 |
| | | modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_RECEIVE); |
| | | } |
| | | shopOrderDao.updateByMap(modifyMap); |
| | | |
| | |
| | | } |
| | | shopActivitiesGroupJoinDao.updateByModel(groupJoin); |
| | | |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectByPhone(order.getUserTel()); |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectByPhone(order.getUserTel(), order.getCompanyId()); |
| | | if(sysVipInfo!=null){ |
| | | sysVipInfo.setIsDeal(SysVipInfo.DEAL_VIP); |
| | | sysVipInfoDao.update(sysVipInfo); |
| | |
| | | } |
| | | |
| | | // 根据订单类型创建不同的处理任务 |
| | | rabiitMqTemplate.sendTopicMsg(RabbitMqConfig.MQ_EXCHANGE_TOPIC +evn, MQTaskRouting.CREATE_ORDER+evn, orderId); |
| | | |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.CREATE_ORDER,"orderId=%s",orderId); |
| | | |
| | | |
| | | threadResult.putInMap("status", "success"); |