|
@@ -50,7 +50,7 @@ class {{{ groovyClass }}} {
|
|
|
}
|
|
|
for (def row : params.modifyRows) {
|
|
|
// 提取 modifyRows 全部修改的数据,构建update的queryDsl语句,并添加到 "批量执行(addBatch)" 的缓存中
|
|
|
- if ({{#each updateWheres}}row._origin.{{{ paramField }}} != null{{/each}}) {
|
|
|
+ if ({{#each updateWheres}}row._origin.{{{ paramField }}} != null{{#if @last}}{{else}} && {{/if}}{{/each}}) {
|
|
|
update
|
|
|
{{#each updateColumns}}
|
|
|
.setx({{{ ../qClassTable }}}.{{{ qClassField }}}, row.{{{ paramField }}})
|
|
@@ -63,7 +63,7 @@ class {{{ groovyClass }}} {
|
|
|
}
|
|
|
for (def row : params.removeRecords) {
|
|
|
// 提取 removeRecords 全部删除的数据,构建删除条件,添加到 "批量执行(addBatch)" 的缓存中
|
|
|
- if ({{#each deleteWheres}}row._origin.{{{ paramField }}} != null{{/each}}) {
|
|
|
+ if ({{#each deleteWheres}}row._origin.{{{ paramField }}} != null{{#if @last}}{{else}} && {{/if}}{{/each}}) {
|
|
|
delete
|
|
|
{{#each deleteWheres}}
|
|
|
.where({{{ ../qClassTable }}}.{{{ qClassField }}}.eq(DbConv.{{{ dbConvMethod }}}(row._origin.{{{ paramField }}})))
|