| | |
| | | import java.time.LocalDateTime; |
| | | |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.ruoyi.account.api.feignClient.AppCouponClient; |
| | | import com.ruoyi.account.api.feignClient.AppUserAddressClient; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.TAppUserAddress; |
| | | import com.ruoyi.common.core.domain.R; |
| | |
| | | private SysUserClient sysUserClient; |
| | | @Resource |
| | | private TShoppingOrderRefundService shoppingOrderRefundService; |
| | | @Resource |
| | | private AppUserAddressClient appUserAddressClient; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 远程管理后台取消订单后退款回调 |
| | | */ |
| | |
| | | // todo 根据支付方式 取消订单 |
| | | byId.setCancellationId(userid); |
| | | byId.setCancellationTime(LocalDateTime.now()); |
| | | byId.setStatus(4); |
| | | byId.setStatus(5); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | TShoppingOrderRefund tShoppingOrderRefund = new TShoppingOrderRefund(); |
| | | tShoppingOrderRefund.setPayTime(byId.getPayTime()); |
| | |
| | | List<MyShoppingOrderList> list = shoppingOrderService.getNoInvoicedOrder(query); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/create") |
| | | public R<TShoppingOrder> shopCreate(@RequestBody ExchangeDto exchangeDto) { |
| | |
| | | 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); |
| | | |
| | | |
| | | TAppUserAddress data = appUserAddressClient.getAppUserAddressById(exchangeDto.getAddressId()).getData(); |
| | | shoppingOrder.setAddressJson(JSON.toJSONString(data)); |
| | | shoppingOrderService.save(shoppingOrder); |
| | | |
| | | return R.ok(shoppingOrder); |