Commit 2c142656 authored by 钱坤's avatar 钱坤

Merge remote-tracking branch 'origin/api_opt_branch' into dev

parents 17df7a6d 7f656595
......@@ -1728,11 +1728,12 @@ public class ProductServiceImpl implements ProductService, Constant {
//查询同类基金
FundInfo fundInfo = fundInfoMapper.selectByPrimaryKey(fundId);
PageMethod.startPage(1, 10);
// 使用分页查询会先count再limit查询,浪费资源,这里取top 10即可,所以直接limit 10好了
// PageMethod.startPage(1, 10);
FundCountExample example = new FundCountExample();
example.createCriteria().andSubstrategyEqualTo(fundInfo.getSubstrategy()).andIdNotEqualTo(fundId)
.andDataSourcesEqualTo(Constant.ONE_NUM).andDeleteTagEqualTo(BizEnums.DeleteTag.tag_init);
example.setOrderByClause("ret_1y desc");
example.setOrderByClause("ret_1y desc limit 10");
List<FundCount> fundCounts = fundCountMapper.selectByExample(example);
......
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