| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; |
| | | import com.matrix.config.RabbitMqConfig; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | |
| | | import com.matrix.system.shopXcx.bean.ShopOrder; |
| | | import com.matrix.system.shopXcx.bean.ShopPayLog; |
| | | import com.matrix.system.shopXcx.dao.*; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | ShopCouponRecordDao shopCouponRecordDao; |
| | |
| | | private ShopActivitiesGroupJoinDao shopActivitiesGroupJoinDao; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | private AsyncMessageManager asyncMessageManager; |
| | | |
| | | @Autowired |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @PostMapping(value = "/moneyCardPay/{orderId}") |
| | | @GetMapping(value = "/moneyCardPay/{orderId}") |
| | | @ResponseBody |
| | | @Transactional |
| | | public AjaxResult moneyCardPay(@PathVariable Integer orderId) throws Exception { |
| | |
| | | } |
| | | 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); |
| | | |
| | | //支付记录 |
| | | recordPayLog(Integer.valueOf(orderId), 1, order.getOrderNo(), order.getOrderMoney(), "会员卡余额支付成功", ShopOrder.ORDER_PAY_STATUS_SUCCESS); |
| | | |
| | |
| | | @GetMapping(value = "/getOrderStatusCount") |
| | | @ResponseBody |
| | | public AjaxResult getOrderStatusCount() { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance( |
| | | shopOrderDao.selectOrderStatusCount(sysVipInfo.getId())); |
| | | return result; |