From 5a305c2d434b74e204d87f1a165a87d42f8c39bd Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Sat, 28 Dec 2024 11:59:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/sqx/modules/pay/dao/CashOutDao.java | 2 +- src/main/java/com/sqx/modules/pay/wuyou/WuyouPay.java | 6 ++---- src/main/resources/mapper/pay/CashDao.xml | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/sqx/modules/pay/dao/CashOutDao.java b/src/main/java/com/sqx/modules/pay/dao/CashOutDao.java index 16bc0eed..d06d8a83 100644 --- a/src/main/java/com/sqx/modules/pay/dao/CashOutDao.java +++ b/src/main/java/com/sqx/modules/pay/dao/CashOutDao.java @@ -28,7 +28,7 @@ public interface CashOutDao extends BaseMapper { Double selectCashOutSum(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime); - Integer selectTodayCashCount(@Param("userId") Long userId, @Param("state") Integer state); + Integer selectTodayCashCount(@Param("userId") Long userId, @Param("state") Integer state,@Param("time") String time); Double selectSysUserCashOutSum(@Param("sysUserId") Long sysUserId, @Param("time") String time); diff --git a/src/main/java/com/sqx/modules/pay/wuyou/WuyouPay.java b/src/main/java/com/sqx/modules/pay/wuyou/WuyouPay.java index 85ec37d0..e1ff9baa 100644 --- a/src/main/java/com/sqx/modules/pay/wuyou/WuyouPay.java +++ b/src/main/java/com/sqx/modules/pay/wuyou/WuyouPay.java @@ -1,15 +1,13 @@ package com.sqx.modules.pay.wuyou; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpRequest; import com.alibaba.fastjson.JSONObject; -import com.sqx.common.utils.Result; -import com.sqx.modules.common.dao.CommonInfoDao; import com.sqx.modules.common.entity.CommonInfo; import com.sqx.modules.common.service.CommonInfoService; import com.sqx.modules.pay.dao.CashOutDao; import com.sqx.modules.pay.entity.WithdrawTypeEnum; -import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; @@ -87,7 +85,7 @@ public class WuyouPay { public static boolean checkCanCash(long userId, WithdrawTypeEnum type, BigDecimal money) { if (WithdrawTypeEnum.MANUAL.equals(type)) { // 查询当日体现次数 - Integer successCashCount = cashOutDao.selectTodayCashCount(userId, 1); + Integer successCashCount = cashOutDao.selectTodayCashCount(userId, 1, DateUtil.today()+ " 00:00:00"); CommonInfo cashLimit = commonInfoService.findOne(922); if (cashLimit == null || StrUtil.isBlank(cashLimit.getValue())) { logger.warn("提现必要参数未配置,请联系管理员"); diff --git a/src/main/resources/mapper/pay/CashDao.xml b/src/main/resources/mapper/pay/CashDao.xml index 07cd4311..853a7fce 100644 --- a/src/main/resources/mapper/pay/CashDao.xml +++ b/src/main/resources/mapper/pay/CashDao.xml @@ -177,7 +177,7 @@