1.大哥员工业务查询自身数据

This commit is contained in:
2025-07-07 13:59:56 +08:00
parent 2d223d2a46
commit 5bd6bd18db
5 changed files with 207 additions and 26 deletions

View File

@@ -49,11 +49,93 @@ public class EmployeeBigBrotherPageReqVO extends PageParam {
@Schema(description = "该数据所属的账号id", example = "533")
private String userId;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "是否洽谈", example = "2")
private Integer operationStatus;
/**
* 大哥的等级
*/
@Schema(description="大哥的等级最小值")
private Integer levelMin;
/**
* 大哥的等级
*/
@Schema(description="大哥的等级最大值")
private Integer levelMax;
/**
* 大哥打赏的金币
*/
@Schema(description="大哥打赏的金币最小值")
private Integer hostcoinsMin;
/**
* 大哥打赏的金币
*/
@Schema(description="大哥打赏的金币最大值")
private Integer hostcoinsMax;
/**
* 大哥打赏的历史最高金币
*/
@Schema(description="大哥打赏的历史最高金币最小值")
private Integer historicHighCoinsMin;
/**
* 大哥打赏的历史最高金币
*/
@Schema(description="大哥打赏的历史最高金币最大值")
private Integer historicHighCoinsMax;
/**
* 大哥历史打赏金币总和
*/
@Schema(description="大哥历史打赏金币总和")
private Integer totalGiftCoinsMin;
/**
* 大哥历史打赏金币总和
*/
@Schema(description="大哥历史打赏金币总和")
private Integer totalGiftCoinsMax;
/**
* 租户 Id
*/
@Schema(description="租户 Id")
private Long tenantId;
/**
* 数据插入时间
*/
@Schema(description = "创建时间开始(yyyy-MM-dd)", example = "2023-01-01")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime createTimeStart;
/**
* 数据插入时间
*/
@Schema(description = "创建时间结束(yyyy-MM-dd)", example = "2023-01-01")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime createTimeEnd;
/**
* 排序规则
*/
@Schema(description = "排序方式(asc/desc)", example = "desc")
private String sort;
/**
* 按照何种业务排序
*/
@Schema(description = "排序字段(historicHighCoins/totalGiftCoins/level等)", example = "hostsCoins")
private String sortName;
@Schema(description = "国家名称")
private String countryName;
}

View File

@@ -80,5 +80,4 @@ public class EmployeeBigBrotherDO extends BaseDO {
*/
private Integer operationStatus;
}

View File

@@ -1,13 +1,12 @@
package cn.iocoder.yudao.module.tkdata.dal.mysql.employeebigbrother;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherPageReqVO;
import cn.iocoder.yudao.module.tkdata.dal.dataobject.employeebigbrother.EmployeeBigBrotherDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 大哥数据员工业务 Mapper
@@ -17,23 +16,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface EmployeeBigBrotherMapper extends BaseMapperX<EmployeeBigBrotherDO> {
default PageResult<EmployeeBigBrotherDO> selectPage(EmployeeBigBrotherPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<EmployeeBigBrotherDO>()
.eqIfPresent(EmployeeBigBrotherDO::getDisplayId, reqVO.getDisplayId())
.eqIfPresent(EmployeeBigBrotherDO::getUserIdStr, reqVO.getUserIdStr())
.likeIfPresent(EmployeeBigBrotherDO::getNickname, reqVO.getNickname())
.eqIfPresent(EmployeeBigBrotherDO::getLevel, reqVO.getLevel())
.eqIfPresent(EmployeeBigBrotherDO::getHostcoins, reqVO.getHostcoins())
.eqIfPresent(EmployeeBigBrotherDO::getFollowerCount, reqVO.getFollowerCount())
.eqIfPresent(EmployeeBigBrotherDO::getFollowingCount, reqVO.getFollowingCount())
.eqIfPresent(EmployeeBigBrotherDO::getRegion, reqVO.getRegion())
.eqIfPresent(EmployeeBigBrotherDO::getHistoricHighCoins, reqVO.getHistoricHighCoins())
.eqIfPresent(EmployeeBigBrotherDO::getTotalGiftCoins, reqVO.getTotalGiftCoins())
.eqIfPresent(EmployeeBigBrotherDO::getHostDisplayId, reqVO.getHostDisplayId())
.eqIfPresent(EmployeeBigBrotherDO::getUserId, reqVO.getUserId())
.betweenIfPresent(EmployeeBigBrotherDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(EmployeeBigBrotherDO::getOperationStatus, reqVO.getOperationStatus())
.orderByDesc(EmployeeBigBrotherDO::getId));
}
IPage<EmployeeBigBrotherDO> selectPagewithSelf(@Param("page") IPage<EmployeeBigBrotherDO> iPage,@Param("dto") EmployeeBigBrotherPageReqVO pageReqVO);
}

View File

@@ -1,10 +1,14 @@
package cn.iocoder.yudao.module.tkdata.service.employeebigbrother;
import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherPageReqVO;
import cn.iocoder.yudao.module.tkdata.controller.admin.employeebigbrother.vo.EmployeeBigBrotherSaveReqVO;
import cn.iocoder.yudao.module.tkdata.dal.dataobject.bigbrother.BigBrotherDO;
import cn.iocoder.yudao.module.tkdata.dal.dataobject.employeebigbrother.EmployeeBigBrotherDO;
import cn.iocoder.yudao.module.tkdata.dal.mysql.employeebigbrother.EmployeeBigBrotherMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@@ -88,7 +92,10 @@ public class EmployeeBigBrotherServiceImpl implements EmployeeBigBrotherService
@Override
public PageResult<EmployeeBigBrotherDO> getEmployeeBigBrotherPage(EmployeeBigBrotherPageReqVO pageReqVO) {
return employeeBigBrotherMapper.selectPage(pageReqVO);
pageReqVO.setTenantId(TenantContextHolder.getTenantId());
IPage<EmployeeBigBrotherDO> iPage = new Page<>(pageReqVO.getPageNo(),pageReqVO.getPageSize());
IPage<EmployeeBigBrotherDO> bigBrotherDOIPage = employeeBigBrotherMapper.selectPagewithSelf(iPage, pageReqVO);
return new PageResult<>(bigBrotherDOIPage.getRecords(),bigBrotherDOIPage.getTotal());
}
}