this.updateSQL = "UPDATE WF_PRIMARYKEY SET code = code + ? WHERE name = ? ";
this.insertSQL = "INSERT INTO WF_PRIMARYKEY (code, name) VALUES (?, ?)";
}
public CacheValue getCacheValue(int cacheNum, String name) {
CacheValue cache = null;
try {
cache = getCurrCode(name);
if(cache == null) {
insert(name);
cache = getCurrCode(name);
}
update(cacheNum, name);
cache.setMaxVal(cache.getMinVal() + cacheNum);
} catch(Exception e) {
logger.error("获取主键失败", e);
}
return cache;
}