|
@@ -335,7 +335,7 @@ class TreeService extends Service {
|
|
const cacheKey = this.setting.keyPre + mid;
|
|
const cacheKey = this.setting.keyPre + mid;
|
|
let maxId = this.setting.cacheKey ? parseInt(await this.cache.get(cacheKey)) : undefined;
|
|
let maxId = this.setting.cacheKey ? parseInt(await this.cache.get(cacheKey)) : undefined;
|
|
if (!maxId) {
|
|
if (!maxId) {
|
|
- const sql = 'SELECT Max(??) As max_id FROM ?? Where ' + this.db.escape(this.setting.mid) + ' = ?';
|
|
|
|
|
|
+ const sql = 'SELECT Max(??) As max_id FROM ?? Where ' + this.setting.mid + ' = ?';
|
|
const sqlParam = [this.setting.kid, this.tableName, mid];
|
|
const sqlParam = [this.setting.kid, this.tableName, mid];
|
|
const queryResult = await this.db.queryOne(sql, sqlParam);
|
|
const queryResult = await this.db.queryOne(sql, sqlParam);
|
|
maxId = queryResult.max_id || 0;
|
|
maxId = queryResult.max_id || 0;
|