提现问题

This commit is contained in:
2024-12-28 11:59:05 +08:00
parent d24826f4bb
commit 5a305c2d43
3 changed files with 4 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ public interface CashOutDao extends BaseMapper<CashOut> {
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);

View File

@@ -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("提现必要参数未配置,请联系管理员");

View File

@@ -177,7 +177,7 @@
</select>
<select id="selectTodayCashCount" resultType="java.lang.Integer">
select count(*) from cash_out where create_at > CURDATE() and user_id=#{userId} and state=#{state};
select count(*) from cash_out where create_at > #{time} and user_id=#{userId} and state=#{state};
</select>