puzhibing
2024-10-25 d3cce4c7823d8e54abbba9eff4417cbbcd24d393
bug修改
2个文件已修改
50 ■■■■ 已修改文件
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java
@@ -63,37 +63,37 @@
 */
@Service
public class TShoppingOrderServiceImpl extends ServiceImpl<TShoppingOrderMapper, TShoppingOrder> implements TShoppingOrderService {
    @Resource
    private TokenService tokenService;
    @Resource
    private GoodsClient goodsClient;
    @Resource
    private CouponClient couponClient;
    @Resource
    private AppUserClient appUserClient;
    @Resource
    private AppUserAddressClient appUserAddressClient;
    @Resource
    private AppCouponClient appCouponClient;
    @Resource
    private WxPaymentClient wxPaymentClient;
    @Resource
    private AliPaymentClient aliPaymentClient;
    @Resource
    private TShoppingOrderRefundService shoppingOrderRefundService;
    @Autowired
    public RedisTemplate redisTemplate;
    @Override
    public TActivityVO activityStatistics(TActivityStatisticsQuery dto) {
@@ -270,8 +270,8 @@
        res.setGrantVip(grantVip);
        return res;
    }
    /**
     * 获取小程序商城购买订单列表
     * @param query
@@ -318,8 +318,8 @@
        map.put("total", count);
        return map;
    }
    /**
     * 获取购买订单详情
     * @param id
@@ -369,8 +369,8 @@
        }
        return info;
    }
    /**
     * 取消订单
     * @param id
@@ -391,10 +391,10 @@
        if(shoppingOrder.getPaymentAmount().compareTo(bigDecimal) == 0 && shoppingOrder.getStatus() == 4){
            return AjaxResult.error("订单已取消,不能重复操作");
        }
        //退款金额
        BigDecimal refundAmount = shoppingOrder.getPaymentAmount().subtract(bigDecimal);
        //先查询第三方订单状态订单是否退款
        //支付方式(1=微信,2=支付宝)
        Integer paymentType = shoppingOrder.getPaymentType();
@@ -443,7 +443,7 @@
        shoppingOrderRefund.setRefundRemark("全额退款");
        shoppingOrderRefund.setRefundTotalAmount(refundAmount.add(bigDecimal));
        shoppingOrderRefund.setPayAmount(shoppingOrder.getPaymentAmount());
        shoppingOrder.setCancellationTime(LocalDateTime.now());
        shoppingOrder.setCancellationId(shoppingOrder.getAppUserId());
        if(1 == paymentType){
@@ -479,8 +479,8 @@
        }
        return AjaxResult.success();
    }
    /**
     * 商城订单取消订单微信退款处理
     * @param out_refund_no 退款单号
@@ -505,7 +505,7 @@
        shoppingOrder.setRefundStatus(2);
        shoppingOrder.setRefundTime(one.getRefundTime());
        this.updateById(shoppingOrder);
        //商品
        if(shoppingOrder.getOrderType() == 1){
            //redis锁 和支付使用同一个锁
@@ -546,7 +546,7 @@
        }
        return AjaxResult.success();
    }
    /**
     * 获取未开票的订单列表
     * @param query
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/util/task/TaskUtil.java
@@ -52,7 +52,7 @@
    // 每天凌晨12点执行的定时任务
@Scheduled(cron = "0 0 12 * * ?")
@Scheduled(cron = "0 0 0 * * ?")
//@Scheduled(fixedRate = 60000)
    public void taskMonth() {
        try {