Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
Tankaikai 2025-01-14 10:18:27 +08:00
commit beef5768d3
4 changed files with 12 additions and 3 deletions

View File

@ -67,6 +67,7 @@ public class CourseCollectServiceImpl extends ServiceImpl<CourseCollectDao, Cour
if (collect != null) {
baseMapper.update(null, new LambdaUpdateWrapper<CourseCollect>()
.eq(CourseCollect::getCourseCollectId, collect.getCourseCollectId())
.eq(CourseCollect::getCourseId, collect.getCourseId())
.set(CourseCollect::getUpdateTime, DateUtil.now())
.set(CourseCollect::getCourseDetailsId, collect.getCourseDetailsId()));
return Result.success("操作成功!");

View File

@ -27,7 +27,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,@Param("time") String time);
Integer selectTodayCashCount(@Param("userId") Long userId, @Param("stateList") List<Integer> stateList,@Param("time") String time);
Double selectSysUserCashOutSum(@Param("sysUserId") Long sysUserId, @Param("time") String time);

View File

@ -1,7 +1,9 @@
package com.sqx.modules.pay.wuyou;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.exceptions.ValidateException;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONObject;
@ -100,7 +102,7 @@ public class WuyouPay {
public void checkCanCash(long userId, WithdrawTypeEnum type, BigDecimal money) {
if (WithdrawTypeEnum.MANUAL.equals(type)) {
// 查询当日体现次数
Integer successCashCount = cashOutDao.selectTodayCashCount(userId, 1, DateUtil.today() + " 00:00:00");
Integer successCashCount = cashOutDao.selectTodayCashCount(userId, CollectionUtil.newArrayList(1, 3), DateUtil.today() + " 00:00:00");
CommonInfo cashLimit = commonInfoService.findOne(922);
if (cashLimit == null || StrUtil.isBlank(cashLimit.getValue())) {
logger.warn("提现必要参数未配置,请联系管理员");

View File

@ -188,7 +188,13 @@
</select>
<select id="selectTodayCashCount" resultType="java.lang.Integer">
select count(*) from cash_out where create_at > #{time} and user_id=#{userId} and state=#{state} and withdraw_type=1;
select count(*) from cash_out where create_at > #{time} and user_id=#{userId}
and state in
<foreach collection="stateList" item="state" open="(" separator="," close=")">
#{state}
</foreach>
and state=#{state}
and withdraw_type=1;
</select>