| | |
| | | package cn.lili.modules.order.order.service; |
| | | |
| | | import cn.lili.common.vo.ResultMessage; |
| | | import cn.lili.modules.member.entity.dto.MemberAddressDTO; |
| | | import cn.lili.modules.order.cart.entity.dto.TradeDTO; |
| | | import cn.lili.modules.order.order.entity.dos.Order; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | */ |
| | | OrderDetailVO queryDetail(String orderSn); |
| | | |
| | | String sendMqMessage(String snNo); |
| | | /** |
| | | * 创建订单 |
| | | * 1.检查交易信息 |
| | |
| | | import cn.lili.common.utils.CurrencyUtil; |
| | | import cn.lili.common.utils.SnowFlake; |
| | | import cn.lili.common.utils.StringUtils; |
| | | import cn.lili.common.vo.ResultMessage; |
| | | import cn.lili.modules.goods.entity.dos.Goods; |
| | | import cn.lili.modules.goods.entity.dto.GoodsCompleteMessage; |
| | | import cn.lili.modules.goods.service.GoodsService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public String sendMqMessage(String snNo) { |
| | | Order order = this.getBySn(snNo); |
| | | if (order == null) { |
| | | throw new ServiceException(ResultCode.ORDER_NOT_EXIST); |
| | | } |
| | | if (!OrderStatusEnum.PAID.name().equals(order.getOrderStatus())) { |
| | | throw new ServiceException("订单状态不是已支付状态"); |
| | | } |
| | | OrderMessage orderMessage = new OrderMessage(); |
| | | //发送订单已付款消息 |
| | | orderMessage.setOrderSn(order.getSn()); |
| | | orderMessage.setPaymentMethod(order.getPaymentMethod()); |
| | | orderMessage.setNewStatus(OrderStatusEnum.PAID); |
| | | this.sendUpdateStatusMessage(orderMessage); |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | @OrderLogPoint(description = "'订单['+#orderSn+']取消,原因为:'+#reason", orderSn = "#orderSn") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Order cancel(String orderSn, String reason) { |
| | |
| | | public ResultMessage<IPage<OrderSimpleVO>> queryMineOrder(OrderSearchParams orderSearchParams) { |
| | | return ResultUtil.data(orderService.queryByParams(orderSearchParams)); |
| | | } |
| | | @ApiOperation(value = "更新订单状态") |
| | | @GetMapping("/sendMessage/{snNo}") |
| | | public ResultMessage<String> sendMqMessage(@PathVariable String snNo) { |
| | | return ResultUtil.data(orderService.sendMqMessage(snNo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询订单导出列表") |
| | | @GetMapping("/queryExportOrder") |