修复
This commit is contained in:
@@ -96,7 +96,7 @@ public class AiUsageStatsServiceImpl implements AiUsageStatsService {
|
||||
public PageResult<AiUsageUserStatsRespVO> getUserStatsPage(AiUsageStatsPageReqVO reqVO) {
|
||||
// 查询用户统计数据
|
||||
List<Map<String, Object>> userStatsList = pointRecordMapper.selectUserStats(
|
||||
reqVO.getStartTime(), reqVO.getEndTime(), reqVO.getBizType(), reqVO.getUserId());
|
||||
reqVO.getStartTime(), reqVO.getEndTime(), reqVO.getBizType(), reqVO.getUserId(), reqVO.getMobile());
|
||||
|
||||
// 计算总数
|
||||
long total = userStatsList.size();
|
||||
|
||||
@@ -34,6 +34,9 @@ public class AiUsageStatsPageReqVO extends SortablePageParam {
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "服务标识")
|
||||
private String serviceCode;
|
||||
|
||||
|
||||
@@ -78,13 +78,15 @@ public interface PointRecordMapper extends BaseMapperX<PointRecordDO> {
|
||||
"<if test='endTime != null'> AND create_time <= #{endTime}</if>" +
|
||||
"<if test='bizType != null and bizType != \"\"'> AND biz_type = #{bizType}</if>" +
|
||||
"<if test='userId != null'> AND user_id = #{userId}</if>" +
|
||||
"<if test='mobile != null and mobile != \"\"'> AND mobile LIKE CONCAT('%', #{mobile}, '%')</if>" +
|
||||
"GROUP BY user_id, mobile " +
|
||||
"ORDER BY consumePoints DESC" +
|
||||
"</script>")
|
||||
List<Map<String, Object>> selectUserStats(@Param("startTime") LocalDateTime startTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("bizType") String bizType,
|
||||
@Param("userId") Long userId);
|
||||
@Param("userId") Long userId,
|
||||
@Param("mobile") String mobile);
|
||||
|
||||
/**
|
||||
* 按应用统计
|
||||
|
||||
Reference in New Issue
Block a user