陶杰
2024-11-06 0300162ac6797562b2b2bad4f540c1e0a6e2cba4
src/main/java/com/mzl/flower/schedule/ScheduleService.java
@@ -18,6 +18,7 @@
import com.mzl.flower.service.flower.FlowerCategoryService;
import com.mzl.flower.service.menber.impl.GrowthValueDealService;
import com.mzl.flower.service.payment.*;
import com.mzl.flower.service.wallet.WalletBillRecordService;
import com.mzl.flower.thread.FlowerCategoryPriceThread;
import com.mzl.flower.utils.SmsUtil;
import lombok.extern.slf4j.Slf4j;
@@ -51,9 +52,6 @@
    private UserPaymentV3Service paymentV3Service;
    @Autowired
    private UserPaymentSybService paymentSybService;
    @Autowired
    private OrderService orderService;
    @Autowired
@@ -85,6 +83,10 @@
    @Autowired
    private BaseService baseService;
    @Autowired
    private WalletBillRecordService walletBillRecordService;
    @Scheduled(cron = "1 1 0/2 * * ?")
    public void calculateAvePrice() {
@@ -125,11 +127,10 @@
                try {
                    LocalDateTime createdTime = o.getCreateTime().plusMinutes(5);
                    if (createdTime.isBefore(LocalDateTime.now())) {
                        /*boolean f = paymentV3Service.checkOrderStatus(o.getId());
                        boolean f = paymentV3Service.checkOrderStatus(o.getId());
                        if(!f){
                            paymentV3Service.cancelOrder(o.getId());
                        }*/
                        paymentSybService.cancelOrder(o.getId());
                        }
                    }
                } catch (Exception e) {
                    log.error(e.getMessage(), e);
@@ -187,6 +188,8 @@
                try {
                    paymentV3Service.checkTransferStatus(t);
                    settlementService.updateSettlementStatus(t.getId());
                    //2024-10-24更新钱包提现信息
                    walletBillRecordService.updateTransferStatus(t.getId());
                } catch (Exception e) {
                    log.error(e.getMessage(), e);
                }
@@ -275,11 +278,11 @@
        LocalDateTime endDateTime = LocalDateTime.of(currentDate, LocalTime.of(17, 0));
        System.out.println("开始时间: " + startDateTime);
        System.out.println("结束时间: " + endDateTime);
        List<String> sends = orderMapper.getWaitSendMessageInfoBySupplier("SEND", startDateTime, endDateTime);
        List<String> sends = orderMapper.getWaitSendMessageInfoBySupplier("COLLECTION", startDateTime, endDateTime);
        if(CollectionUtils.isNotEmpty(sends)) {
            sends.forEach(s -> {
                try {
                    SmsUtil.sendSms(s, "SMS_474500141", null);
                    SmsUtil.sendSms(s, "SMS_474905508", null);
                } catch (ClientException e) {
                    log.error("发送短信失败,手机号:" + s, e);
                }