| | |
| | | import com.ruoyi.common.core.utils.OrderCodeUtil; |
| | | import com.ruoyi.other.api.feignClient.CouponClient; |
| | | import com.ruoyi.other.api.feignClient.GoodsClient; |
| | | import com.ruoyi.payment.api.feignClient.AliPaymentClient; |
| | | import com.ruoyi.payment.api.feignClient.WxPaymentClient; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import io.swagger.annotations.Api; |
| | |
| | | private GoodsClient goodsClient; |
| | | @Resource |
| | | private CouponClient couponClient; |
| | | |
| | | |
| | | @PostMapping("/getExchangeOrderList") |
| | | @ApiOperation(value = "列表查询", tags = {"管理后台-兑换订单"}) |
| | |
| | | public AjaxResult cancelShoppingOrder(String id) { |
| | | TExchangeOrder byId = exchangeOrderService.getById(id); |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | // todo 根据支付方式 取消订单 |
| | | byId.setCancellationId(userid); |
| | | byId.setCancellationTime(LocalDateTime.now()); |
| | | byId.setStatus(4); |
| | | exchangeOrderService.updateById(byId); |
| | | // 回退积分 |
| | | Integer points = byId.getPoints(); |
| | | appUserClient.refundPoints(byId.getAppUserId()+"-"+points); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/consignerShoppingOrder") |