Commit 7aaaf9ee authored by Quxl's avatar Quxl

x

parent cf5d7e3d
......@@ -111,5 +111,16 @@ public class CommonService {
String timeString = DateUtil.formatDate(now, "yyyyMMddHHmmssSSS");
return sPrefix + timeString + this.getNextval(sName + "_TRACE_" + dateString);
}
public String getLoopIndex() {
String loopIndexName = "LOOP_INDEX";
Long index = this.getNextval(loopIndexName);
if(index < 100000) {
return StringUtil.format(index, "00000");
} else {
jdbcTemplate.update("update x_sequence set value = 1 where name = '" + loopIndexName + "'");
return this.getLoopIndex();
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment