|
|
@@ -1600,8 +1600,9 @@ public class ProductServiceImpl implements ProductService {
|
|
|
standard = v_productPersonDao.getCountByEnuuAndUserUUAndStatusAndEnabled(enUU, userUU, ShortConstant.YES_SHORT, IntegerConstant.YES_SHORT);
|
|
|
nStandard = v_productPersonDao.getCountByEnuuAndUserUUAndStatusAndEnabled(enUU, userUU, ShortConstant.NO_SHORT, IntegerConstant.YES_SHORT);
|
|
|
} else {
|
|
|
- standard = productDao.getCountByEnuuAndStatusAndEnabled(enUU, ShortConstant.YES_SHORT, IntegerConstant.YES_SHORT);
|
|
|
- nStandard = productDao.getCountByEnuuAndStatusAndEnabled(enUU, ShortConstant.NO_SHORT, IntegerConstant.YES_SHORT);
|
|
|
+ // 数据量大时,从数据库查询数量也变得很慢,所以改用查索引获取 dongbw 2018年5月28日 11:24:17
|
|
|
+ standard = (int) searchService.getProducts(enUU, null, 1, 10, "standard").getTotalElement();
|
|
|
+ nStandard = (int) searchService.getProducts(enUU, null, 1, 10, "nStandard").getTotalElement();
|
|
|
}
|
|
|
resultMap.put("standard", standard);
|
|
|
resultMap.put("nStandard", nStandard);
|