Răsfoiți Sursa

feat(system): 新增用户参赛记录及统计功能- 在 PlayersItemsLogService 中新增 queryStatisticsAllDataPageList 方法用于查询所有数据的流水统计- 修改 Participants 实体类 registrationTime 类型从 Date 为 String
- 更新 ParticipantsMapper XML 配置文件优化 SQL 查询方式
- ParticipantsServiceImpl 增加关联用户、赛事等信息查询逻辑- 新增 UserParticipantsVo 视图对象支持导出用户参赛相关信息
- 调整 ScheduleTask 中比赛生成任务由3天改为7天
-修复 RewardClaimsServiceImpl 中备注字段拼接可能为空的问题
- 统计服务中支付订单查询增加 userId 参数兼容性处理
- 数据库连接超时时间由30秒调整为60秒提升稳定性

fugui001 2 luni în urmă
părinte
comite
fecf5549eb
18 a modificat fișierele cu 312 adăugiri și 46 ștergeri
  1. 1 1
      ruoyi-extend/ruoyi-snailjob-server/src/main/resources/application-prod.yml
  2. 13 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/controller/PlayersItemsLogController.java
  3. 1 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/Participants.java
  4. 3 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/bo/ParticipantsBo.java
  5. 47 18
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/vo/ParticipantsVo.java
  6. 17 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/vo/PlayersItemsLogVo.java
  7. 70 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/vo/UserParticipantsVo.java
  8. 1 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/mapper/ParticipantsMapper.java
  9. 1 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/mapper/PayOrderMapper.java
  10. 8 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/IPlayersItemsLogService.java
  11. 100 5
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/ParticipantsServiceImpl.java
  12. 37 3
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/PlayersItemsLogServiceImpl.java
  13. 3 2
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/RewardClaimsServiceImpl.java
  14. 1 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/StatisticsServiceImpl.java
  15. 1 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/job/business/ScheduleTask.java
  16. 7 8
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/ParticipantsMapper.xml
  17. 1 0
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/PayOrderMapper.xml
  18. 0 2
      ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/UserMapper.xml

+ 1 - 1
ruoyi-extend/ruoyi-snailjob-server/src/main/resources/application-prod.yml

@@ -6,7 +6,7 @@ spring:
     username: root
     password: root
     hikari:
-      connection-timeout: 30000
+      connection-timeout: 60000
       validation-timeout: 5000
       minimum-idle: 10
       maximum-pool-size: 20

+ 13 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/controller/PlayersItemsLogController.java

@@ -114,4 +114,17 @@ public class PlayersItemsLogController extends BaseController {
         return playersItemsLogService.queryStatisticsPageList(bo, pageQuery);
     }
 
+
+
+    /**
+     * 查询用户使用记录列表  统计
+     */
+    @SaCheckPermission("business:itemsLog:queryStatisticsAllDataPageList")
+    @GetMapping("/queryStatisticsAllDataPageList")
+    public TableDataInfo<PlayersItemsLogVo> queryStatisticsAllDataPageList(PlayersItemsLogBo bo, PageQuery pageQuery) {
+        return playersItemsLogService.queryStatisticsAllDataPageList(bo, pageQuery);
+    }
+
+
+
 }

+ 1 - 2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/Participants.java

@@ -2,7 +2,6 @@ package org.dromara.business.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
-import java.util.Date;
 import java.io.Serial;
 /**
  * 【请填写功能名称】对象 participants
@@ -56,7 +55,7 @@ public class Participants{
     /**
      * 报名时间
      */
-    private Date registrationTime;
+    private String registrationTime;
 
     /**
      * 状态,0-正常,1-已淘汰

+ 3 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/bo/ParticipantsBo.java

@@ -63,12 +63,14 @@ public class ParticipantsBo extends BaseEntity {
     /**
      * 报名时间
      */
-    private Date registrationTime;
+    private String registrationTime;
 
     /**
      * 状态,0-正常,1-已淘汰
      */
     private Long status;
 
+    private String userName;
+
 
 }

+ 47 - 18
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/vo/ParticipantsVo.java

@@ -1,6 +1,5 @@
 package org.dromara.business.domain.vo;
 
-import java.util.Date;
 import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
 import cn.idev.excel.annotation.ExcelProperty;
 import io.github.linpeilie.annotations.AutoMapper;
@@ -26,56 +25,86 @@ public class ParticipantsVo implements Serializable {
     /**
      *
      */
-    @ExcelProperty(value = "")
+    @ExcelProperty(value = "编号")
     private Long id;
 
-    /**
-     *
-     */
-    @ExcelProperty(value = "")
-    private Long tournamentId;
+
 
     /**
      * 玩家唯一标识
      */
-    @ExcelProperty(value = "玩家唯一标识")
+    // @ExcelProperty(value = "玩家唯一标识")
     private Long playerId;
 
     /**
      * 玩家姓名
      */
-    @ExcelProperty(value = "玩家姓名")
+    //@ExcelProperty(value = "玩家姓名")
     private String name;
 
     /**
      * 玩家手机号
      */
-    @ExcelProperty(value = "玩家手机号")
+    //@ExcelProperty(value = "玩家手机号")
     private String mobile;
 
     /**
      * 头像地址
      */
-    @ExcelProperty(value = "头像地址")
+    //@ExcelProperty(value = "头像地址")
     private String avatar;
 
     /**
      * 当前记分牌数量
      */
-    @ExcelProperty(value = "当前记分牌数量")
+    //@ExcelProperty(value = "当前记分牌数量")
     private Long currentChips;
 
-    /**
-     * 报名时间
-     */
-    @ExcelProperty(value = "报名时间")
-    private Date registrationTime;
 
     /**
      * 状态,0-正常,1-已淘汰
      */
-    @ExcelProperty(value = "状态,0-正常,1-已淘汰")
+    //@ExcelProperty(value = "状态,0-正常,1-已淘汰")
     private Long status;
 
 
+
+
+    /**
+     *
+     */
+    @ExcelProperty(value = "赛事ID")
+    private Long tournamentId;
+
+    /**
+     * 赛事名称
+     */
+    @ExcelProperty(value = "赛事名称")
+    private String tournamentsName;
+
+
+    @ExcelProperty(value = "赛事状态")
+    private String statusText;
+
+
+    @ExcelProperty(value = "报名用户")
+
+    private String userName;
+    /**
+     * 手机号
+     */
+    @ExcelProperty(value = "手机号")
+    private String phone;
+
+
+    @ExcelProperty(value = "报名条件")
+    public String tournamentCondition;
+
+    /**
+     * 报名时间
+     */
+    @ExcelProperty(value = "报名时间")
+    private String registrationTime;
+
+
 }

+ 17 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/vo/PlayersItemsLogVo.java

@@ -1,5 +1,6 @@
 package org.dromara.business.domain.vo;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
 import cn.idev.excel.annotation.ExcelProperty;
@@ -129,4 +130,20 @@ public class PlayersItemsLogVo implements Serializable {
 
     private String statusText;
 
+    /**
+     *  比赛数
+     */
+    private Integer tournamentCount;
+
+    /**
+     * 充值数
+     */
+    private Integer payOrderCount;
+
+    /**
+     * 充值金额
+     */
+    private BigDecimal payOrderAmount;
+
+
 }

+ 70 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/domain/vo/UserParticipantsVo.java

@@ -0,0 +1,70 @@
+package org.dromara.business.domain.vo;
+
+import cn.idev.excel.annotation.ExcelProperty;
+import lombok.Data;
+import java.io.Serial;
+import java.io.Serializable;
+
+
+/**
+ * 【请填写功能名称】视图对象 user
+ *
+ * @author Lion Li
+ * @date 2025-06-26
+ */
+@Data
+public class UserParticipantsVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *
+     */
+    @ExcelProperty(value = "比赛ID")
+    private Long id;
+
+    /**
+     * 赛事名称
+     */
+    @ExcelProperty(value = "比赛名")
+    private String name;
+
+    /**
+     * 赛事状态
+     */
+    @ExcelProperty(value = "赛事状态")
+    private String statusText;
+
+
+    /**
+     *
+     */
+    @ExcelProperty(value = "用户ID")
+    private Long userId;
+
+    /**
+     * 用户姓名
+     */
+    @ExcelProperty(value = "用户姓名")
+    private String realName;
+
+    /**
+     * 手机号
+     */
+    @ExcelProperty(value = "用户手机号")
+    private String phone;
+
+
+    @ExcelProperty(value = "报名要求")
+    public String tournamentCondition;
+
+    /**
+     * 报名时间
+     */
+    @ExcelProperty(value = "报名时间")
+    private String registrationTime;
+
+
+
+}

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/mapper/ParticipantsMapper.java

@@ -37,7 +37,7 @@ public interface ParticipantsMapper extends BaseMapperPlus<Participants, Partici
     int deleteParticipantsById(@Param("ids") Collection<Long> ids);
 
     @InterceptorIgnore(tenantLine = "true")
-    List<ParticipantsVo> selectParticipantsList(@Param("ew") Wrapper<Participants> wrapper);
+    List<ParticipantsVo> selectVoPageList(@Param("ew") Wrapper<Participants> wrapper);
 
 
     @InterceptorIgnore(tenantLine = "true")

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/mapper/PayOrderMapper.java

@@ -39,7 +39,7 @@ public interface PayOrderMapper extends BaseMapperPlus<PayOrder, PayOrderVo> {
     List<PayOrderVo> selectPayOrderList(@Param("ew") Wrapper<PayOrder> wrapper);
 
     @InterceptorIgnore(tenantLine = "true")
-    PayOrderVo selectPayOrderCountByTime(@Param("beginTime") String beginTime, @Param("endTime") String endTime);
+    PayOrderVo selectPayOrderCountByTime(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("userId") Long userId);
 
 
     @InterceptorIgnore(tenantLine = "true")

+ 8 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/IPlayersItemsLogService.java

@@ -77,4 +77,12 @@ public interface IPlayersItemsLogService {
      */
     TableDataInfo<PlayersItemsLogVo> queryStatisticsPageList(PlayersItemsLogBo bo, PageQuery pageQuery);
 
+    /**
+     * 查询所以数据的流水统计总统计
+     * @param bo
+     * @param pageQuery
+     * @return
+     */
+    TableDataInfo<PlayersItemsLogVo> queryStatisticsAllDataPageList(PlayersItemsLogBo bo, PageQuery pageQuery);
+
 }

+ 100 - 5
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/ParticipantsServiceImpl.java

@@ -2,8 +2,15 @@ package org.dromara.business.service.impl;
 
 import org.dromara.business.domain.Participants;
 import org.dromara.business.domain.bo.ParticipantsBo;
+import org.dromara.business.domain.enums.GameStatus;
 import org.dromara.business.domain.vo.ParticipantsVo;
+import org.dromara.business.domain.vo.TournamentEntryConditionsVo;
+import org.dromara.business.domain.vo.TournamentsVo;
+import org.dromara.business.domain.vo.UserVo;
 import org.dromara.business.mapper.ParticipantsMapper;
+import org.dromara.business.mapper.TournamentEntryConditionsMapper;
+import org.dromara.business.mapper.TournamentsMapper;
+import org.dromara.business.mapper.UserMapper;
 import org.dromara.business.service.IParticipantsService;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
@@ -15,6 +22,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.util.List;
 import java.util.Map;
 import java.util.Collection;
@@ -32,6 +42,12 @@ public class ParticipantsServiceImpl implements IParticipantsService {
 
     private final ParticipantsMapper baseMapper;
 
+    private final UserMapper userMapper;
+
+    private final TournamentsMapper tournamentsMapper;
+
+    private final TournamentEntryConditionsMapper tournamentEntryConditionsMapper;
+
     /**
      * 查询【请填写功能名称】
      *
@@ -52,8 +68,46 @@ public class ParticipantsServiceImpl implements IParticipantsService {
      */
     @Override
     public TableDataInfo<ParticipantsVo> queryPageList(ParticipantsBo bo, PageQuery pageQuery) {
+
+        //根据用户名找到userId
+        if(StringUtils.isNotBlank(bo.getUserName())){
+            UserVo userVo = userMapper.selUserInfo(bo.getUserName());
+            if(userVo!=null){
+                bo.setPlayerId(userVo.getId());
+            }
+        }
+
         LambdaQueryWrapper<Participants> lqw = buildQueryWrapper(bo);
         Page<ParticipantsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        List<ParticipantsVo> resultRecords = result.getRecords();
+        for (ParticipantsVo resultRecord : resultRecords) {
+
+            UserVo userVo = userMapper.selectVoByIdInfo(resultRecord.getPlayerId());
+            if(userVo!=null){
+                resultRecord.setUserName(userVo.getNickName());
+                resultRecord.setPhone(userVo.getPhone());
+            }
+            TournamentsVo tournamentsVo = tournamentsMapper.selectVoByIdInfo(resultRecord.getTournamentId());
+            if(tournamentsVo!=null){
+                resultRecord.setTournamentId(tournamentsVo.getId());
+                resultRecord.setTournamentsName(tournamentsVo.getName());
+
+                String statusText= GameStatus.getDescriptionFromCode(tournamentsVo.getStatus());
+                resultRecord.setStatusText(statusText);
+            }
+
+
+            //赛事报名条件
+            TournamentEntryConditionsVo tournamentEntryConditionsVo = tournamentEntryConditionsMapper.selectByTournamentInfo(resultRecord.getTournamentId());
+            String tournamentCondition="";
+            if(tournamentEntryConditionsVo!=null){
+                tournamentCondition=tournamentEntryConditionsVo.getItemsName()+"*"+tournamentEntryConditionsVo.getRequiredQuantity();
+            }
+            resultRecord.setTournamentCondition(tournamentCondition);
+
+        }
+
+
         return TableDataInfo.build(result);
     }
 
@@ -65,22 +119,63 @@ public class ParticipantsServiceImpl implements IParticipantsService {
      */
     @Override
     public List<ParticipantsVo> queryList(ParticipantsBo bo) {
+        //根据用户名找到userId
+        if(StringUtils.isNotBlank(bo.getUserName())){
+            UserVo userVo = userMapper.selUserInfo(bo.getUserName());
+            if(userVo!=null){
+                bo.setPlayerId(userVo.getId());
+            }
+        }
         LambdaQueryWrapper<Participants> lqw = buildQueryWrapper(bo);
-        return baseMapper.selectVoList(lqw);
+        List<ParticipantsVo> participantsVoList = baseMapper.selectVoPageList(lqw);
+        for (ParticipantsVo resultRecord : participantsVoList) {
+
+            UserVo userVo = userMapper.selectVoByIdInfo(resultRecord.getPlayerId());
+            if(userVo!=null){
+                resultRecord.setUserName(userVo.getNickName());
+                resultRecord.setPhone(userVo.getPhone());
+            }
+            TournamentsVo tournamentsVo = tournamentsMapper.selectVoByIdInfo(resultRecord.getTournamentId());
+            if(tournamentsVo!=null){
+                resultRecord.setTournamentId(tournamentsVo.getId());
+                resultRecord.setTournamentsName(tournamentsVo.getName());
+
+                String statusText= GameStatus.getDescriptionFromCode(tournamentsVo.getStatus());
+                resultRecord.setStatusText(statusText);
+            }
+
+
+            //赛事报名条件
+            TournamentEntryConditionsVo tournamentEntryConditionsVo = tournamentEntryConditionsMapper.selectByTournamentInfo(resultRecord.getTournamentId());
+            String tournamentCondition="";
+            if(tournamentEntryConditionsVo!=null){
+                tournamentCondition=tournamentEntryConditionsVo.getItemsName()+"*"+tournamentEntryConditionsVo.getRequiredQuantity();
+            }
+            resultRecord.setTournamentCondition(tournamentCondition);
+
+        }
+         return participantsVoList;
     }
 
     private LambdaQueryWrapper<Participants> buildQueryWrapper(ParticipantsBo bo) {
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<Participants> lqw = Wrappers.lambdaQuery();
-        lqw.orderByAsc(Participants::getId);
+        lqw.orderByDesc(Participants::getRegistrationTime);
         lqw.eq(bo.getTournamentId() != null, Participants::getTournamentId, bo.getTournamentId());
         lqw.eq(bo.getPlayerId() != null, Participants::getPlayerId, bo.getPlayerId());
         lqw.like(StringUtils.isNotBlank(bo.getName()), Participants::getName, bo.getName());
-        lqw.eq(StringUtils.isNotBlank(bo.getMobile()), Participants::getMobile, bo.getMobile());
+        lqw.like(StringUtils.isNotBlank(bo.getMobile()), Participants::getMobile, bo.getMobile());
         lqw.eq(StringUtils.isNotBlank(bo.getAvatar()), Participants::getAvatar, bo.getAvatar());
         lqw.eq(bo.getCurrentChips() != null, Participants::getCurrentChips, bo.getCurrentChips());
-        lqw.eq(bo.getRegistrationTime() != null, Participants::getRegistrationTime, bo.getRegistrationTime());
-        lqw.eq(bo.getStatus() != null, Participants::getStatus, bo.getStatus());
+        if (bo.getRegistrationTime() != null) {
+            String dateStr = bo.getRegistrationTime();
+            // 假设格式为 yyyy-MM-dd
+            String startOfDay = dateStr + " 00:00:00";
+            String endOfDay = dateStr + " 23:59:59";
+
+            lqw.ge(Participants::getRegistrationTime, startOfDay);
+            lqw.le(Participants::getRegistrationTime, endOfDay);
+        }        lqw.eq(bo.getStatus() != null, Participants::getStatus, bo.getStatus());
         return lqw;
     }
 

+ 37 - 3
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/PlayersItemsLogServiceImpl.java

@@ -6,9 +6,7 @@ import org.dromara.business.domain.enums.ItemsTypeEnum;
 import org.dromara.business.domain.vo.ItemsVo;
 import org.dromara.business.domain.vo.PlayersItemsLogVo;
 import org.dromara.business.domain.vo.UserVo;
-import org.dromara.business.mapper.ItemsMapper;
-import org.dromara.business.mapper.PlayersItemsLogMapper;
-import org.dromara.business.mapper.UserMapper;
+import org.dromara.business.mapper.*;
 import org.dromara.business.service.IPlayersItemsLogService;
 import org.dromara.business.utils.DateTimeRangeUtils;
 import org.dromara.common.core.utils.MapstructUtils;
@@ -45,6 +43,10 @@ public class PlayersItemsLogServiceImpl implements IPlayersItemsLogService {
 
     private final UserMapper userMapper;
 
+    private final ParticipantsMapper participantsMapper;
+
+    private final PayOrderMapper payOrderMapper;
+
     /**
      * 查询道具使用记录
      *
@@ -257,6 +259,38 @@ public class PlayersItemsLogServiceImpl implements IPlayersItemsLogService {
 
 
 
+    @Override
+    public TableDataInfo<PlayersItemsLogVo> queryStatisticsAllDataPageList(PlayersItemsLogBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<PlayersItemsLog> lqw = buildQueryWrapper(bo);
+        Page<PlayersItemsLogVo> result = baseMapper.selectPlayerItemsLogInfoList(pageQuery.build(), lqw);
+        List<PlayersItemsLogVo> resultRecords = result.getRecords();
+        for (PlayersItemsLogVo resultRecord : resultRecords) {
+            ItemsVo itemsVo = itemsMapper.selectVoByIdInfo(resultRecord.getItemId());
+            resultRecord.setItemName(itemsVo.getName());
+            ItemsTypeEnum itemsTypeEnum = ItemsTypeEnum.fromCode(resultRecord.getItemType());
+            if(itemsTypeEnum!=null){
+                resultRecord.setItermTypeWay(ItemsTypeEnum.fromCode(resultRecord.getItemType()).getDescription());
+            }
+            UserVo userVo = userMapper.selectVoByIdInfo(resultRecord.getUserId());
+            if(userVo!=null){
+                resultRecord.setUserName(userVo.getNickName());
+                resultRecord.setPhone(userVo.getPhone());
+            }
+            resultRecord.setStatusText("成功");
+
+           /* int tournamentCount= participantsMapper.selectUserTournamentTotal(userVo.getId());
+            resultRecord.setTournamentCount(tournamentCount);
+
+            PayOrderVo payOrderVo = payOrderMapper.selectPayOrderCountByTime(bo.getBeginTime(), bo.getEndTime(),userVo.getId());
+            if(payOrderVo!=null){
+                resultRecord.setPayOrderAmount(payOrderVo.getPayOrderAmount());
+                resultRecord.setPayOrderCount(payOrderVo.getPayOrderCount());
+            }*/
+        }
+
+
+        return TableDataInfo.build(result);
+    }
 
 
 }

+ 3 - 2
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/RewardClaimsServiceImpl.java

@@ -695,8 +695,9 @@ public class RewardClaimsServiceImpl implements IRewardClaimsService {
                     logEntry.setBeforeNum(beforeNum.longValue());
                     /*    logEntry.setItemType(ItermTypeLogEnum.COMPETITION.getCode());*/
                     logEntry.setItemTypeText(itemsVo.getName());
-                    logEntry.setRemark(ItemsTypeEnum.REWARD.getDescription()+"-"+itemsVo.getItemDesc());
-                    logEntry.setCreatedAt(new Date());
+                    String itemDesc = itemsVo.getItemDesc();
+                    logEntry.setRemark(ItemsTypeEnum.REWARD.getDescription() +
+                        (StringUtils.isNotBlank(itemDesc) ? "-" + itemDesc : ""));                    logEntry.setCreatedAt(new Date());
 
                     logEntry.setItemType(ItemsTypeEnum.REWARD.getCode());
                     playersItemsLogs.add(logEntry);

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/business/service/impl/StatisticsServiceImpl.java

@@ -53,7 +53,7 @@ public class StatisticsServiceImpl implements IStatisticsService {
         int tournamentCount = tournamentsMapper.selectTournamentsCountByTime(startDate, endDate);
         statisticsVo.setTournamentCount(tournamentCount);
 
-        PayOrderVo payOrderVo = payOrderMapper.selectPayOrderCountByTime(startDate, endDate);
+        PayOrderVo payOrderVo = payOrderMapper.selectPayOrderCountByTime(startDate, endDate,null);
         if(payOrderVo!=null){
             statisticsVo.setPayOrderAmount(payOrderVo.getPayOrderAmount());
             statisticsVo.setPayOrderCount(payOrderVo.getPayOrderCount());

+ 1 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/job/business/ScheduleTask.java

@@ -271,7 +271,7 @@ public class ScheduleTask {
                     scheduleExecutionMapper.updateSelective(exec.getId(), "FAILED");
                 }
             }
-            log.info("未来天比赛生成完成,共处理 {} 条", executions.size());
+            log.info("未来7天比赛生成完成,共处理 {} 条", executions.size());
         }
 
 

+ 7 - 8
ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/ParticipantsMapper.xml

@@ -50,14 +50,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectVoPage" parameterType="org.dromara.business.domain.Participants" resultType="org.dromara.business.domain.vo.ParticipantsVo">
         SELECT *
         FROM participants
-        <where>
-            <if test="id != null">AND id = #{id}</if>
-            <if test="tournamentId != null">AND tournament_id = #{tournamentId}</if>
-            <if test="playerId != null">AND player_id = #{playerId}</if>
-            <if test="name != null and name != ''">AND name LIKE CONCAT('%', #{name}, '%')</if>
-            <if test="mobile != null and mobile != ''">AND mobile = #{mobile}</if>
-            <if test="status != null">AND status = #{status}</if>
-        </where>
+        ${ew.customSqlSegment}
+    </select>
+
+    <select id="selectVoPageList" parameterType="org.dromara.business.domain.Participants" resultType="org.dromara.business.domain.vo.ParticipantsVo">
+        SELECT *
+        FROM participants
+                 ${ew.customSqlSegment}
     </select>
 
     <select id="selectParticipantsById" parameterType="int" resultType="org.dromara.business.domain.vo.ParticipantsVo">

+ 1 - 0
ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/PayOrderMapper.xml

@@ -173,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             ifnull(count(distinct trade_no),0) as payOrderCount,
             ifnull(sum(total_amount),0) as payOrderAmount
         FROM pay_order  where status= 'success' and pay_time >= #{beginTime} and pay_time &lt; #{endTime}
+        <if test="userId != null">and user_id=#{userId}</if>
     </select>
 
 

+ 0 - 2
ruoyi-modules/ruoyi-system/src/main/resources/mapper/business/UserMapper.xml

@@ -378,6 +378,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         DELETE FROM user_message_status
     </delete>
 
-
-
 </mapper>