提交 fad6a070 编写于 作者: sq3536's avatar sq3536

完成逻辑修改

上级 9b4bd960
......@@ -198,10 +198,15 @@ public class DABuildExService extends DABuildServiceImpl {
ex.printStackTrace();
}
String updateSql = "UPDATE ibzdabuild SET processed=(CASE WHEN processed is null then 0 else processed end+#{et.count}),lastruntime=CASE WHEN total <= processed THEN #{et.runtime} ELSE lastruntime END," +
"BUILDSTATE=CASE WHEN total <= processed THEN 'FINISH' ELSE BUILDSTATE END WHERE buildid = #{et.engineId}";
String updateSql = "UPDATE ibzdabuild SET processed=(CASE WHEN processed is null then 0 else processed end+#{et.count}) WHERE buildid = #{et.engineId}";
HashMap<String, Object> param = new HashMap<>();
param.put("count", engineMQMsg.getCount());
param.put("engineId", engineMQMsg.getEngineId());
this.execute(updateSql, param);
updateSql = "UPDATE ibzdabuild SET lastruntime=#{et.runtime}," +
"BUILDSTATE='FINISH' WHERE buildid = #{et.engineId} and total <= processed";
param = new HashMap<>();
param.put("runtime", engineMQMsg.getRunTime());
param.put("engineId", engineMQMsg.getEngineId());
this.execute(updateSql, param);
......
......@@ -154,10 +154,15 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
ex.printStackTrace();
}
String updateSql = "UPDATE ibzruleengine SET processed=(CASE WHEN processed is null then 0 else processed end+#{et.count}),lastruntime=CASE WHEN total <= processed THEN #{et.runtime} ELSE lastruntime END," +
"EXECSTATE=CASE WHEN total <= processed THEN 'FINISH' ELSE EXECSTATE END WHERE engineid = #{et.engineId}";
String updateSql = "UPDATE ibzruleengine SET processed=(CASE WHEN processed is null then 0 else processed end+#{et.count}) WHERE engineid = #{et.engineId}";
HashMap<String, Object> param = new HashMap<>();
param.put("count", engineMQMsg.getCount());
param.put("engineId", engineMQMsg.getEngineId());
this.execute(updateSql, param);
updateSql = "UPDATE ibzruleengine SET lastruntime=#{et.runtime}," +
"EXECSTATE='FINISH' WHERE engineid = #{et.engineId} and total <= processed ";
param = new HashMap<>();
param.put("runtime", engineMQMsg.getRunTime());
param.put("engineId", engineMQMsg.getEngineId());
this.execute(updateSql, param);
......
......@@ -154,12 +154,17 @@ public class TableSyncExService extends TableSyncServiceImpl {
if(rt)
{
String updateSql = "UPDATE ibztablesync SET lastwrite=(CASE WHEN lastwrite is null then 0 else lastwrite end+#{et.count})," +
"lastendtime=CASE WHEN lastread <= lastwrite THEN #{et.lastendtime} ELSE lastendtime END," +
"etltimestamp=CASE WHEN lastread <= lastwrite THEN #{et.etltimestamp} ELSE etltimestamp END," +
"lastrunresult=CASE WHEN lastread <= lastwrite THEN 'FINISH' ELSE lastrunresult END WHERE syncid = #{et.syncid}";
String updateSql = "UPDATE ibztablesync SET lastwrite=(CASE WHEN lastwrite is null then 0 else lastwrite end+#{et.count}) WHERE syncid = #{et.syncid}";
HashMap<String, Object> param = new HashMap<>();
param.put("count", datas.size());
param.put("syncid", sync.getId());
updateBySQL(updateSql,param);
updateSql = "UPDATE ibztablesync SET "+
"lastendtime=#{et.lastendtime}," +
"etltimestamp=#{et.etltimestamp}," +
"lastrunresult='FINISH' WHERE syncid = #{et.syncid} and lastread <= lastwrite ";
param = new HashMap<>();
param.put("lastendtime", new Timestamp(System.currentTimeMillis()));
param.put("etltimestamp", runTimestamp);
param.put("syncid", sync.getId());
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册