Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
beef5768d3
|
|
@ -67,6 +67,7 @@ public class CourseCollectServiceImpl extends ServiceImpl<CourseCollectDao, Cour
|
||||||
if (collect != null) {
|
if (collect != null) {
|
||||||
baseMapper.update(null, new LambdaUpdateWrapper<CourseCollect>()
|
baseMapper.update(null, new LambdaUpdateWrapper<CourseCollect>()
|
||||||
.eq(CourseCollect::getCourseCollectId, collect.getCourseCollectId())
|
.eq(CourseCollect::getCourseCollectId, collect.getCourseCollectId())
|
||||||
|
.eq(CourseCollect::getCourseId, collect.getCourseId())
|
||||||
.set(CourseCollect::getUpdateTime, DateUtil.now())
|
.set(CourseCollect::getUpdateTime, DateUtil.now())
|
||||||
.set(CourseCollect::getCourseDetailsId, collect.getCourseDetailsId()));
|
.set(CourseCollect::getCourseDetailsId, collect.getCourseDetailsId()));
|
||||||
return Result.success("操作成功!");
|
return Result.success("操作成功!");
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public interface CashOutDao extends BaseMapper<CashOut> {
|
||||||
|
|
||||||
Double selectCashOutSum(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
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);
|
Double selectSysUserCashOutSum(@Param("sysUserId") Long sysUserId, @Param("time") String time);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.sqx.modules.pay.wuyou;
|
package com.sqx.modules.pay.wuyou;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.exceptions.ValidateException;
|
import cn.hutool.core.exceptions.ValidateException;
|
||||||
|
import cn.hutool.core.util.ArrayUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
@ -100,7 +102,7 @@ public class WuyouPay {
|
||||||
public void checkCanCash(long userId, WithdrawTypeEnum type, BigDecimal money) {
|
public void checkCanCash(long userId, WithdrawTypeEnum type, BigDecimal money) {
|
||||||
if (WithdrawTypeEnum.MANUAL.equals(type)) {
|
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);
|
CommonInfo cashLimit = commonInfoService.findOne(922);
|
||||||
if (cashLimit == null || StrUtil.isBlank(cashLimit.getValue())) {
|
if (cashLimit == null || StrUtil.isBlank(cashLimit.getValue())) {
|
||||||
logger.warn("提现必要参数未配置,请联系管理员");
|
logger.warn("提现必要参数未配置,请联系管理员");
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,13 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTodayCashCount" resultType="java.lang.Integer">
|
<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>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue