| | |
| | | import com.ruoyi.order.api.query.ShoppingOrderQuery; |
| | | import com.ruoyi.order.dto.*; |
| | | import com.ruoyi.order.service.TShoppingOrderService; |
| | | import com.ruoyi.other.api.domain.TCoupon; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.feignClient.CouponClient; |
| | | import com.ruoyi.other.api.feignClient.GoodsClient; |
| | | import com.ruoyi.payment.api.feignClient.AliPaymentClient; |
| | |
| | | byId.setReceivingName(data.getName() + "-" + data.getPhone()); |
| | | byId.setReceivingAddress(data.getAddress()); |
| | | } |
| | | } |
| | | if (byId.getOrderType()==1){ |
| | | TGoods data = goodsClient.getGoodsById(byId.getGoodsId()).getData(); |
| | | if (data!=null){ |
| | | byId.setName(data.getName()); |
| | | } |
| | | }else { |
| | | TCoupon data = couponClient.getCouponById1(byId.getCouponId()).getData(); |
| | | if (data!=null){ |
| | | byId.setName(data.getName()); |
| | | } |
| | | } |
| | | return AjaxResult.success(byId); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/cancelShoppingOrderWxRefund") |
| | | public void cancelShoppingOrderWxRefund(HttpServletRequest request) { |
| | | WxRefundNotifyResp data = wxPaymentClient.refundNotify(request).getData(); |
| | | if (null != data) { |
| | | String out_refund_no = data.getOut_refund_no(); |
| | | String refund_id = data.getRefund_id(); |
| | | String tradeState = data.getTradeState(); |
| | | String success_time = data.getSuccess_time(); |
| | | shoppingOrderService.cancelShoppingOrderWxRefund(out_refund_no, refund_id, tradeState, success_time); |
| | | } |
| | | // WxRefundNotifyResp data = wxPaymentClient.refundNotify(request).getData(); |
| | | // if (null != data) { |
| | | // String out_refund_no = data.getOut_refund_no(); |
| | | // String refund_id = data.getRefund_id(); |
| | | // String tradeState = data.getTradeState(); |
| | | // String success_time = data.getSuccess_time(); |
| | | // shoppingOrderService.cancelShoppingOrderWxRefund(out_refund_no, refund_id, tradeState, success_time); |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | shoppingOrder.setOrderType(exchangeDto.getGoodType()); |
| | | if (exchangeDto.getGoodType() == 1) { |
| | | shoppingOrder.setGoodsId(exchangeDto.getGoodId()); |
| | | shoppingOrder.setStatus(1); |
| | | |
| | | } else { |
| | | shoppingOrder.setCouponId(exchangeDto.getGoodId()); |
| | | shoppingOrder.setStatus(3); |
| | | |
| | | } |
| | | shoppingOrder.setPurchaseQuantity(exchangeDto.getNum()); |
| | | shoppingOrder.setAppUserAddressId(exchangeDto.getAddressId()); |
| | |
| | | shoppingOrder.setPaymentStatus(1); |
| | | shoppingOrder.setPaymentType(exchangeDto.getPayMethod()); |
| | | shoppingOrder.setRemark(exchangeDto.getRemark()); |
| | | shoppingOrder.setStatus(1); |
| | | shoppingOrder.setPhone(exchangeDto.getPhone()); |
| | | shoppingOrder.setCreateTime(LocalDateTime.now()); |
| | | shoppingOrder.setDelFlag(false); |