|
@@ -3558,7 +3558,7 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
+ " case"
|
|
+ " case"
|
|
|
+ " when nvl(item.SYNC_STAGE,'pending')='pending' then 0"
|
|
+ " when nvl(item.SYNC_STAGE,'pending')='pending' then 0"
|
|
|
+ " when item.NEXT_RETRY_TIME is null then 1"
|
|
+ " when item.NEXT_RETRY_TIME is null then 1"
|
|
|
- + " when item.NEXT_RETRY_TIME<=:nowTs then 2"
|
|
|
|
|
|
|
+ + " when item.NEXT_RETRY_TIME<=:priorityNowTs then 2"
|
|
|
+ " else 9 end pendingPriority"
|
|
+ " else 9 end pendingPriority"
|
|
|
+ " from RCHKLA_ITEM item"
|
|
+ " from RCHKLA_ITEM item"
|
|
|
+ " join RC rc on rc.RCID=item.RCID"
|
|
+ " join RC rc on rc.RCID=item.RCID"
|
|
@@ -3567,11 +3567,13 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
+ " and nvl(item.DELETE_CONFIRMED,0)=0"
|
|
+ " and nvl(item.DELETE_CONFIRMED,0)=0"
|
|
|
+ " and (nvl(item.PLATFORM_CONFIG_CONFIRMED,0)=0 or nvl(item.CONFIG_SEARCH_MATCHED,0)=0)"
|
|
+ " and (nvl(item.PLATFORM_CONFIG_CONFIRMED,0)=0 or nvl(item.CONFIG_SEARCH_MATCHED,0)=0)"
|
|
|
+ " and nvl(item.SYNC_STAGE,'pending') in ('pending','accepted','retrying')"
|
|
+ " and nvl(item.SYNC_STAGE,'pending') in ('pending','accepted','retrying')"
|
|
|
- + " and (nvl(item.SYNC_STAGE,'pending')='pending' or item.NEXT_RETRY_TIME is null or item.NEXT_RETRY_TIME<=:nowTs)"
|
|
|
|
|
|
|
+ + " and (nvl(item.SYNC_STAGE,'pending')='pending' or item.NEXT_RETRY_TIME is null or item.NEXT_RETRY_TIME<=:retryNowTs)"
|
|
|
+ " order by pendingPriority asc,item.AUTH_BEG asc,item.ITEM_ID asc"
|
|
+ " order by pendingPriority asc,item.AUTH_BEG asc,item.ITEM_ID asc"
|
|
|
+ " ) where rownum<=:limit";
|
|
+ " ) where rownum<=:limit";
|
|
|
SqlCmd sqlCmd = new SqlCmd(sql);
|
|
SqlCmd sqlCmd = new SqlCmd(sql);
|
|
|
sqlCmd.wrTimeParm("nowTs", now);
|
|
sqlCmd.wrTimeParm("nowTs", now);
|
|
|
|
|
+ sqlCmd.wrTimeParm("priorityNowTs", now);
|
|
|
|
|
+ sqlCmd.wrTimeParm("retryNowTs", now);
|
|
|
sqlCmd.wrTimeParm("windowEndTs", windowEnd);
|
|
sqlCmd.wrTimeParm("windowEndTs", windowEnd);
|
|
|
sqlCmd.wrIntParm("limit", Math.max(1, limit));
|
|
sqlCmd.wrIntParm("limit", Math.max(1, limit));
|
|
|
List<Map<String, Object>> rowList = gdba.doSelMapListByC(sqlCmd);
|
|
List<Map<String, Object>> rowList = gdba.doSelMapListByC(sqlCmd);
|