删除日志统计和日志报表接口

This commit is contained in:
zhangdongxu
2017-12-22 15:22:11 +08:00
parent 9bcc1211c6
commit ed111ec4b8
149 changed files with 44 additions and 20019 deletions

View File

@@ -192,6 +192,43 @@ public class UpdateCompileByJDBCThread implements Runnable {
}
}
/**
*
* @Description: 根据compileId更新与之对应的group关系表的生效状态
* @author (zdx)
* @date 2017年8月16日 上午9:46:44
* @param compileList
* @param conn
* @param opTime
* @param msgList
*/
public static void updateGroupByCompileId(List<ConfigCompile> compileList, Connection conn, Date opTime,
List<Exception> msgList) {
if (null != compileList && compileList.size() > 0) {
try {
StringBuffer sb = new StringBuffer();
sb.append("update CONFIG_GROUP set IS_VALID=?,op_time=?,LAST_UPDATE=sysdate where COMPILE_ID=? ");
conn.setAutoCommit(false);
PreparedStatement ps = conn.prepareStatement(sb.toString());
for (ConfigCompile compile : compileList) {
Object[] obj = new Object[] { compile.getIsValid(), opTime,compile.getCompileId() };
for (int x = 0; x < obj.length; x++) {
if (x == 1) {
ps.setTimestamp(x + 1, utileDate2TimeStamp(opTime));
} else {
ps.setObject(x + 1, obj[x]);
}
}
ps.addBatch();
}
ps.executeBatch();
} catch (Exception e) {
logger.error(e);
msgList.add(e);
}
}
}
public static void updateGroup(List<ConfigGroupRelation> groupList, Connection conn, Date opTime,
List<Exception> msgList) {
if (null != groupList && groupList.size() > 0) {
@@ -451,6 +488,10 @@ public class UpdateCompileByJDBCThread implements Runnable {
} else if (null != numRegionList && numRegionList.size() > 0) {
updateNumRegion(tableName, numRegionList, conn, opTime, msgList);
}
if((null !=compileList && compileList.size() > 0)&&(null != groupList && groupList.size()==0)){
updateGroupByCompileId(compileList, conn, opTime, msgList);
}
latch.countDown();
// System.out.println("latchCount=======================" +
// latch.getCount());