mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix store app loading issue
This commit is contained in:
parent
315e918c3b
commit
c821808797
@ -173,14 +173,14 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic
|
|||||||
if (deviceTypeId != -1) {
|
if (deviceTypeId != -1) {
|
||||||
sql += "AND AP_APP.DEVICE_TYPE_ID = ? ";
|
sql += "AND AP_APP.DEVICE_TYPE_ID = ? ";
|
||||||
}
|
}
|
||||||
sql += "GROUP BY AP_APP.ID ";
|
sql += "GROUP BY AP_APP.ID ORDER BY AP_APP.ID ";
|
||||||
if (StringUtils.isNotEmpty(filter.getSortBy())) {
|
if (StringUtils.isNotEmpty(filter.getSortBy())) {
|
||||||
sql += "ORDER BY ID " + filter.getSortBy() +" ";
|
sql += filter.getSortBy() +" ";
|
||||||
}
|
}
|
||||||
if (filter.getLimit() != -1) {
|
if (filter.getLimit() != -1) {
|
||||||
sql += "LIMIT ? OFFSET ? ";
|
sql += "LIMIT ? OFFSET ? ";
|
||||||
}
|
}
|
||||||
sql += ") AS app_data ON app_data.ID = AP_APP.ID WHERE AP_APP.TENANT_ID = ?";
|
sql += ") AS app_data ON app_data.ID = AP_APP.ID WHERE AP_APP.TENANT_ID = ? ORDER BY AP_APP.ID";
|
||||||
try {
|
try {
|
||||||
Connection conn = this.getDBConnection();
|
Connection conn = this.getDBConnection();
|
||||||
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
||||||
|
|||||||
@ -118,15 +118,14 @@ public class OracleApplicationDAOImpl extends GenericApplicationDAOImpl {
|
|||||||
if (deviceTypeId != -1) {
|
if (deviceTypeId != -1) {
|
||||||
sql += "AND AP_APP.DEVICE_TYPE_ID = ? ";
|
sql += "AND AP_APP.DEVICE_TYPE_ID = ? ";
|
||||||
}
|
}
|
||||||
sql += "GROUP BY AP_APP.ID ";
|
sql += "GROUP BY AP_APP.ID ORDER BY AP_APP.ID ";
|
||||||
if (StringUtils.isNotEmpty(filter.getSortBy())) {
|
if (StringUtils.isNotEmpty(filter.getSortBy())) {
|
||||||
sql += "ORDER BY ID " + filter.getSortBy() + " ";
|
sql += filter.getSortBy() +" ";
|
||||||
}
|
}
|
||||||
if (filter.getLimit() != -1) {
|
if (filter.getLimit() != -1) {
|
||||||
sql += "OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
sql += "OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
||||||
}
|
}
|
||||||
sql += ") AS app_data ON app_data.ID = AP_APP.ID " +
|
sql += ") AS app_data ON app_data.ID = AP_APP.ID WHERE AP_APP.TENANT_ID = ? ORDER BY AP_APP.ID";
|
||||||
"WHERE AP_APP.TENANT_ID = ?";
|
|
||||||
try {
|
try {
|
||||||
Connection conn = this.getDBConnection();
|
Connection conn = this.getDBConnection();
|
||||||
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
||||||
|
|||||||
@ -117,15 +117,14 @@ public class SQLServerApplicationDAOImpl extends GenericApplicationDAOImpl {
|
|||||||
if (deviceTypeId != -1) {
|
if (deviceTypeId != -1) {
|
||||||
sql += "AND AP_APP.DEVICE_TYPE_ID = ? ";
|
sql += "AND AP_APP.DEVICE_TYPE_ID = ? ";
|
||||||
}
|
}
|
||||||
sql += "GROUP BY AP_APP.ID ";
|
sql += "GROUP BY AP_APP.ID ORDER BY AP_APP.ID ";
|
||||||
if (StringUtils.isNotEmpty(filter.getSortBy())) {
|
if (StringUtils.isNotEmpty(filter.getSortBy())) {
|
||||||
sql += "ORDER BY ID " + filter.getSortBy() + " ";
|
sql += filter.getSortBy() +" ";
|
||||||
}
|
}
|
||||||
if (filter.getLimit() != -1) {
|
if (filter.getLimit() != -1) {
|
||||||
sql += "ORDER BY ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
sql += "ORDER BY ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY ";
|
||||||
}
|
}
|
||||||
sql += ") AS app_data ON app_data.ID = AP_APP.ID " +
|
sql += ") AS app_data ON app_data.ID = AP_APP.ID WHERE AP_APP.TENANT_ID = ? ORDER BY AP_APP.ID";
|
||||||
"WHERE AP_APP.TENANT_ID = ?";
|
|
||||||
try {
|
try {
|
||||||
Connection conn = this.getDBConnection();
|
Connection conn = this.getDBConnection();
|
||||||
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
try (PreparedStatement stmt = conn.prepareStatement(sql)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user