清单查询速度优化
This commit is contained in:
+4
-4
@@ -307,8 +307,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
if (ids.isEmpty()) {
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'");
|
||||
}else {
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" +
|
||||
"and r.STAND_ID in (" + id.substring(0, id.length() - 1) + ")");
|
||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" );
|
||||
// "and r.STAND_ID in (" + id.substring(0, id.length() - 1) + ")");
|
||||
}
|
||||
Page<SarStandardsInfo> page1 = new Page<>(current, pageSize);
|
||||
IPage<SarStandardsInfo> userIPage1 = SarStandardsInfoDao.selectPage(page1, wrapper1);
|
||||
@@ -320,8 +320,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
||||
if (ids.isEmpty()){
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='"+ standId+"'");
|
||||
}else {
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='" + standId + "' " +
|
||||
"and r.STAND_ID in (" + id.substring(0,id.length()-1) + ")");
|
||||
wrapper2.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_stand_attr_info.STAND_ID WHERE r.project_id ='" + standId + "' " );
|
||||
// "and r.STAND_ID in (" + id.substring(0,id.length()-1) + ")");
|
||||
}
|
||||
Page<SarStandAttrInfo> page2 = new Page<>(current, pageSize);
|
||||
IPage<SarStandAttrInfo> userIPage2 = sarStandAttrInfoDao.selectPage(page2, wrapper2);
|
||||
|
||||
Reference in New Issue
Block a user