记得上下班打卡 | git大法好,push需谨慎

Commit 323e1079 authored by anjiabin's avatar anjiabin

提交chime社交相关

parent b75d2eba
......@@ -57,21 +57,23 @@ public class ChimePerformanceServiceImpl implements IChimePerformanceService {
if(StringUtil.isNotEmpty(reqDto.getSex())){
criteria = criteria.and("sex").is(reqDto.getSex());
}
Query query = Query.query(criteria);
query.fields().include("_id");
Pageable pageableCount = PageRequest.of(1, 1000); // get 5 profiles on a page
Query queryCount = Query.query(criteria);
queryCount.fields().include("_id");
queryCount.with(pageableCount);
// 排序
// 查询总数
long startTime = System.currentTimeMillis();
// int count = (int) mongoTemplate.count(query, ChimeUserInfoVo.class, ChimeUserInfoVo.class.getSimpleName());
int count = 1000;
int count = (int) mongoTemplate.count(queryCount, ChimeUserInfoVo.class, ChimeUserInfoVo.class.getSimpleName());
long endTime = System.currentTimeMillis();
log.info("查询标签数据 count:{} 耗时:{}ms",count,endTime-startTime);
// 每页五个
Pageable pageable = PageRequest.of(pageNum, pageSize); // get 5 profiles on a page
query = Query.query(criteria);
Query query = Query.query(criteria);
query.with(pageable);
startTime = System.currentTimeMillis();
......
......@@ -223,8 +223,7 @@ public class TestDataUtils {
reqDto.setOrderItem(null);
reqDto.setOrderSc(null);
reqDto.setSex("男");
reqDto.setTags("Tags8,tags9,tags2");
// PageInfo<ChimeUserInfoDto> pageInfo = chimePerformanceService.getUserListByCon(reqDto);
reqDto.setTags("tags1");
NewPageResult<ChimeUserInfoDto> pageInfo = chimePerformanceService.getUserListByCon(reqDto);
long endTime = System.currentTimeMillis();
log.info("耗时:{}ms",endTime-startTime);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment