67,538
社区成员
发帖
与我相关
我的任务
分享
private void updateSyncKnStatus() {
String queryStr = " update games_sync_kn kn set kn.sync_status = 'E' "
+ " where kn.sync_id in ( "
+ " select sync_id from ( "
+ " select distinct l.sync_id, "
+ " count(l.sync_id) over (partition by l.sync_id) synccount "
+ " from games_sync_kn_log l "
+ " ) where synccount>9 ) " ;
Log.debug("queryStr = "+ queryStr);
try{
org.hibernate.Query query = SessionFactoryUtils.getSession(
getSessionFactory(), true).createSQLQuery(queryStr);
query.executeUpate();
}catch(Exception e){
Log.debug("updateSyncKnStatus = "+e.getMessage());
}finally {
session.close();
}