修改:
1.添加大哥信息查询筛选接口
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package com.yupi.springbootinit.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yupi.springbootinit.common.BaseResponse;
|
||||
import com.yupi.springbootinit.common.ResultUtils;
|
||||
import com.yupi.springbootinit.model.dto.host.HostInfoDTO;
|
||||
import com.yupi.springbootinit.model.dto.host.ServerBigBrotherDTO;
|
||||
import com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO;
|
||||
import com.yupi.springbootinit.model.vo.hosts.NewHostsVO;
|
||||
import com.yupi.springbootinit.service.HostInfoService;
|
||||
import com.yupi.springbootinit.service.ServerBigBrotherService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/6/25 19:22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/big-brother")
|
||||
@Slf4j
|
||||
@CrossOrigin
|
||||
public class BigBrotherController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ServerBigBrotherService bigBrotherService;
|
||||
|
||||
@PostMapping("page")
|
||||
public BaseResponse<Page<ServerBigBrotherVO>> hostsInfo(@RequestBody ServerBigBrotherDTO serverBigBrotherDTO){
|
||||
Page<ServerBigBrotherVO> conditionHosts = bigBrotherService.getConditionHosts(serverBigBrotherDTO);
|
||||
return ResultUtils.success(conditionHosts);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.yupi.springbootinit.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yupi.springbootinit.model.dto.host.ServerBigBrotherDTO;
|
||||
import com.yupi.springbootinit.model.entity.ServerBigBrother;
|
||||
import com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO;
|
||||
import com.yupi.springbootinit.model.vo.hosts.NewHostsVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/6/25 19:21
|
||||
*/
|
||||
|
||||
public interface ServerBigBrotherMapper extends BaseMapper<ServerBigBrother> {
|
||||
|
||||
Page<ServerBigBrotherVO> selectPageByCondition(Page<ServerBigBrotherVO> page,@Param("dto") ServerBigBrotherDTO dto);
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.yupi.springbootinit.model.dto.host;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yupi.springbootinit.common.PageRequest;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/6/25 19:21
|
||||
*/
|
||||
|
||||
@ApiModel(description="server_big_brother")
|
||||
@Data
|
||||
@TableName(value = "server_big_brother")
|
||||
public class ServerBigBrotherDTO extends PageRequest implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* 大哥的display_id
|
||||
*/
|
||||
@TableField(value = "display_id")
|
||||
@ApiModelProperty(value="大哥的display_id")
|
||||
private String displayId;
|
||||
|
||||
|
||||
/**
|
||||
* 大哥的等级
|
||||
*/
|
||||
@TableField(value = "`level`")
|
||||
@ApiModelProperty(value="大哥的等级最小值")
|
||||
private Integer levelMin;
|
||||
|
||||
/**
|
||||
* 大哥的等级
|
||||
*/
|
||||
@TableField(value = "`level`")
|
||||
@ApiModelProperty(value="大哥的等级最大值")
|
||||
private Integer levelMax;
|
||||
|
||||
|
||||
/**
|
||||
* 大哥打赏的金币
|
||||
*/
|
||||
@TableField(value = "hostcoins")
|
||||
@ApiModelProperty(value="大哥打赏的金币最小值")
|
||||
private Integer hostcoinsMin;
|
||||
|
||||
/**
|
||||
* 大哥打赏的金币
|
||||
*/
|
||||
@TableField(value = "hostcoins")
|
||||
@ApiModelProperty(value="大哥打赏的金币最大值")
|
||||
private Integer hostcoinsMax;
|
||||
|
||||
/**
|
||||
* 大哥所在的地区
|
||||
*/
|
||||
@TableField(value = "region")
|
||||
@ApiModelProperty(value="大哥所在的地区")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 大哥打赏的历史最高金币
|
||||
*/
|
||||
@TableField(value = "historic_high_coins")
|
||||
@ApiModelProperty(value="大哥打赏的历史最高金币最小值")
|
||||
private Integer historicHighCoinsMin;
|
||||
|
||||
|
||||
/**
|
||||
* 大哥打赏的历史最高金币
|
||||
*/
|
||||
@TableField(value = "historic_high_coins")
|
||||
@ApiModelProperty(value="大哥打赏的历史最高金币最大值")
|
||||
private Integer historicHighCoinsMax;
|
||||
|
||||
/**
|
||||
* 大哥历史打赏金币总和
|
||||
*/
|
||||
@TableField(value = "total_gift_coins")
|
||||
@ApiModelProperty(value="大哥历史打赏金币总和")
|
||||
private Integer totalGiftCoinsMin;
|
||||
|
||||
/**
|
||||
* 大哥历史打赏金币总和
|
||||
*/
|
||||
@TableField(value = "total_gift_coins")
|
||||
@ApiModelProperty(value="大哥历史打赏金币总和")
|
||||
private Integer totalGiftCoinsMax;
|
||||
/**
|
||||
* 租户 Id
|
||||
*/
|
||||
@TableField(value = "tenant_id")
|
||||
@ApiModelProperty(value="租户 Id")
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 数据插入时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间开始(yyyy-MM-dd)", example = "2023-01-01")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date createTimeStart;
|
||||
|
||||
/**
|
||||
* 数据插入时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间结束(yyyy-MM-dd)", example = "2023-01-01")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date createTimeEnd;
|
||||
|
||||
/**
|
||||
* 排序规则
|
||||
*/
|
||||
@ApiModelProperty(value = "排序方式(asc/desc)", example = "desc")
|
||||
private String sort;
|
||||
|
||||
/**
|
||||
* 按照何种业务排序
|
||||
*/
|
||||
@ApiModelProperty(value = "排序字段(createTime/hostsCoins/fans等)", example = "hostsCoins")
|
||||
private String sortName;
|
||||
|
||||
|
||||
/**
|
||||
* 大哥的等级
|
||||
*/
|
||||
@TableField(value = "`level`")
|
||||
@ApiModelProperty(value="大哥的等级")
|
||||
private Integer level;
|
||||
|
||||
|
||||
/**
|
||||
* 大哥打赏的历史最高金币
|
||||
*/
|
||||
@TableField(value = "historic_high_coins")
|
||||
@ApiModelProperty(value="大哥打赏的历史最高金币")
|
||||
private Integer historicHighCoins;
|
||||
|
||||
/**
|
||||
* 大哥历史打赏金币总和
|
||||
*/
|
||||
@TableField(value = "total_gift_coins")
|
||||
@ApiModelProperty(value="大哥历史打赏金币总和")
|
||||
private Integer totalGiftCoins;
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.yupi.springbootinit.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/6/25 19:21
|
||||
*/
|
||||
|
||||
@ApiModel(description="server_big_brother")
|
||||
@Data
|
||||
@TableName(value = "server_big_brother")
|
||||
public class ServerBigBrother {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value="主键id")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 大哥的display_id
|
||||
*/
|
||||
@TableField(value = "display_id")
|
||||
@ApiModelProperty(value="大哥的display_id")
|
||||
private String displayId;
|
||||
|
||||
/**
|
||||
* 大哥的用户id
|
||||
*/
|
||||
@TableField(value = "user_id_str")
|
||||
@ApiModelProperty(value="大哥的用户id")
|
||||
private String userIdStr;
|
||||
|
||||
/**
|
||||
* 大哥的用户昵称
|
||||
*/
|
||||
@TableField(value = "nickname")
|
||||
@ApiModelProperty(value="大哥的用户昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 大哥的等级
|
||||
*/
|
||||
@TableField(value = "`level`")
|
||||
@ApiModelProperty(value="大哥的等级")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 大哥打赏的金币
|
||||
*/
|
||||
@TableField(value = "hostcoins")
|
||||
@ApiModelProperty(value="大哥打赏的金币")
|
||||
private Integer hostcoins;
|
||||
|
||||
/**
|
||||
* 大哥的粉丝数
|
||||
*/
|
||||
@TableField(value = "follower_count")
|
||||
@ApiModelProperty(value="大哥的粉丝数")
|
||||
private Integer followerCount;
|
||||
|
||||
/**
|
||||
* 大哥的关注数
|
||||
*/
|
||||
@TableField(value = "following_count")
|
||||
@ApiModelProperty(value="大哥的关注数")
|
||||
private Integer followingCount;
|
||||
|
||||
/**
|
||||
* 大哥所在的地区
|
||||
*/
|
||||
@TableField(value = "region")
|
||||
@ApiModelProperty(value="大哥所在的地区")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 大哥打赏的历史最高金币
|
||||
*/
|
||||
@TableField(value = "historic_high_coins")
|
||||
@ApiModelProperty(value="大哥打赏的历史最高金币")
|
||||
private Integer historicHighCoins;
|
||||
|
||||
/**
|
||||
* 大哥历史打赏金币总和
|
||||
*/
|
||||
@TableField(value = "total_gift_coins")
|
||||
@ApiModelProperty(value="大哥历史打赏金币总和")
|
||||
private Integer totalGiftCoins;
|
||||
|
||||
/**
|
||||
* 大哥所在的直播间的主播display_id
|
||||
*/
|
||||
@TableField(value = "host_display_id")
|
||||
@ApiModelProperty(value="大哥所在的直播间的主播display_id")
|
||||
private String hostDisplayId;
|
||||
|
||||
/**
|
||||
* 该数据所属的账号id
|
||||
*/
|
||||
@TableField(value = "owner_id")
|
||||
@ApiModelProperty(value="该数据所属的账号id")
|
||||
private String ownerId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "creator")
|
||||
@ApiModelProperty(value="创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "updater")
|
||||
@ApiModelProperty(value="更新人")
|
||||
private String updater;
|
||||
|
||||
/**
|
||||
* 逻辑删除标志,0-未删除,1-已删除
|
||||
*/
|
||||
@TableField(value = "deleted")
|
||||
@ApiModelProperty(value="逻辑删除标志,0-未删除,1-已删除")
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 租户 Id
|
||||
*/
|
||||
@TableField(value = "tenant_id")
|
||||
@ApiModelProperty(value="租户 Id")
|
||||
private Long tenantId;
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.yupi.springbootinit.model.vo.bigbrother;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/6/25 19:21
|
||||
*/
|
||||
|
||||
@ApiModel(description="server_big_brother")
|
||||
@Data
|
||||
@TableName(value = "server_big_brother")
|
||||
public class ServerBigBrotherVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value="主键id")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 大哥的display_id
|
||||
*/
|
||||
@TableField(value = "display_id")
|
||||
@ApiModelProperty(value="大哥的display_id")
|
||||
private String displayId;
|
||||
|
||||
/**
|
||||
* 大哥的用户id
|
||||
*/
|
||||
@TableField(value = "user_id_str")
|
||||
@ApiModelProperty(value="大哥的用户id")
|
||||
private String userIdStr;
|
||||
|
||||
/**
|
||||
* 大哥的用户昵称
|
||||
*/
|
||||
@TableField(value = "nickname")
|
||||
@ApiModelProperty(value="大哥的用户昵称")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 大哥的等级
|
||||
*/
|
||||
@TableField(value = "`level`")
|
||||
@ApiModelProperty(value="大哥的等级")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 大哥打赏的金币
|
||||
*/
|
||||
@TableField(value = "hostcoins")
|
||||
@ApiModelProperty(value="大哥打赏的金币")
|
||||
private Integer hostcoins;
|
||||
|
||||
/**
|
||||
* 大哥的粉丝数
|
||||
*/
|
||||
@TableField(value = "follower_count")
|
||||
@ApiModelProperty(value="大哥的粉丝数")
|
||||
private Integer followerCount;
|
||||
|
||||
/**
|
||||
* 大哥的关注数
|
||||
*/
|
||||
@TableField(value = "following_count")
|
||||
@ApiModelProperty(value="大哥的关注数")
|
||||
private Integer followingCount;
|
||||
|
||||
/**
|
||||
* 大哥所在的地区
|
||||
*/
|
||||
@TableField(value = "region")
|
||||
@ApiModelProperty(value="大哥所在的地区")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 大哥打赏的历史最高金币
|
||||
*/
|
||||
@TableField(value = "historic_high_coins")
|
||||
@ApiModelProperty(value="大哥打赏的历史最高金币")
|
||||
private Integer historicHighCoins;
|
||||
|
||||
/**
|
||||
* 大哥历史打赏金币总和
|
||||
*/
|
||||
@TableField(value = "total_gift_coins")
|
||||
@ApiModelProperty(value="大哥历史打赏金币总和")
|
||||
private Integer totalGiftCoins;
|
||||
|
||||
/**
|
||||
* 大哥所在的直播间的主播display_id
|
||||
*/
|
||||
@TableField(value = "host_display_id")
|
||||
@ApiModelProperty(value="大哥所在的直播间的主播display_id")
|
||||
private String hostDisplayId;
|
||||
|
||||
/**
|
||||
* 该数据所属的账号id
|
||||
*/
|
||||
@TableField(value = "owner_id")
|
||||
@ApiModelProperty(value="该数据所属的账号id")
|
||||
private String ownerId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@ApiModelProperty(value="创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(value = "update_time")
|
||||
@ApiModelProperty(value="更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(value = "creator")
|
||||
@ApiModelProperty(value="创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(value = "updater")
|
||||
@ApiModelProperty(value="更新人")
|
||||
private String updater;
|
||||
|
||||
/**
|
||||
* 逻辑删除标志,0-未删除,1-已删除
|
||||
*/
|
||||
@TableField(value = "deleted")
|
||||
@ApiModelProperty(value="逻辑删除标志,0-未删除,1-已删除")
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* 租户 Id
|
||||
*/
|
||||
@TableField(value = "tenant_id")
|
||||
@ApiModelProperty(value="租户 Id")
|
||||
private Long tenantId;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yupi.springbootinit.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yupi.springbootinit.model.dto.host.HostInfoDTO;
|
||||
import com.yupi.springbootinit.model.dto.host.ServerBigBrotherDTO;
|
||||
import com.yupi.springbootinit.model.entity.ServerBigBrother;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO;
|
||||
import com.yupi.springbootinit.model.vo.hosts.NewHostsVO;
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/6/25 19:21
|
||||
*/
|
||||
|
||||
public interface ServerBigBrotherService extends IService<ServerBigBrother>{
|
||||
|
||||
|
||||
Page<ServerBigBrotherVO> getConditionHosts(ServerBigBrotherDTO serverBigBrotherDTO);
|
||||
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class HostInfoServiceImpl extends ServiceImpl<NewHostsMapper, NewHosts> i
|
||||
private NewHostsMapper newHostsMapper;
|
||||
|
||||
@Override
|
||||
public Page<NewHostsVO> getConditionHosts(@RequestBody HostInfoDTO hostInfoDTO) {
|
||||
public Page<NewHostsVO> getConditionHosts(HostInfoDTO hostInfoDTO) {
|
||||
Page<NewHostsVO> page = new Page<>(hostInfoDTO.getCurrent(),hostInfoDTO.getPageSize());
|
||||
return newHostsMapper.selectPageByCondition(page, hostInfoDTO);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.yupi.springbootinit.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.yupi.springbootinit.model.dto.host.HostInfoDTO;
|
||||
import com.yupi.springbootinit.model.dto.host.ServerBigBrotherDTO;
|
||||
import com.yupi.springbootinit.model.vo.bigbrother.ServerBigBrotherVO;
|
||||
import com.yupi.springbootinit.model.vo.hosts.NewHostsVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yupi.springbootinit.mapper.ServerBigBrotherMapper;
|
||||
import com.yupi.springbootinit.model.entity.ServerBigBrother;
|
||||
import com.yupi.springbootinit.service.ServerBigBrotherService;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
/*
|
||||
* @author: ziin
|
||||
* @date: 2025/6/25 19:21
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class ServerBigBrotherServiceImpl extends ServiceImpl<ServerBigBrotherMapper, ServerBigBrother> implements ServerBigBrotherService{
|
||||
|
||||
@Resource
|
||||
private ServerBigBrotherMapper serverBigBrotherMapper;
|
||||
|
||||
@Override
|
||||
public Page<ServerBigBrotherVO> getConditionHosts(ServerBigBrotherDTO serverBigBrotherDTO) {
|
||||
|
||||
Page<ServerBigBrotherVO> page = new Page<>(serverBigBrotherDTO.getCurrent(),serverBigBrotherDTO.getPageSize());
|
||||
return serverBigBrotherMapper.selectPageByCondition(page, serverBigBrotherDTO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user