|
@@ -15,6 +15,7 @@
|
|
|
*/
|
|
|
package com.baomidou.mybatisplus.extension.kotlin
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.SharedString
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.Query
|
|
|
import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments
|
|
|
import com.baomidou.mybatisplus.core.metadata.TableFieldInfo
|
|
@@ -49,13 +50,16 @@ class KtQueryWrapper<T : Any> : AbstractKtWrapper<T, KtQueryWrapper<T>>, Query<K
|
|
|
}
|
|
|
|
|
|
internal constructor(entity: T, entityClass: Class<T>?, sqlSelect: String?, paramNameSeq: AtomicInteger,
|
|
|
- paramNameValuePairs: Map<String, Any>, mergeSegments: MergeSegments) {
|
|
|
+ paramNameValuePairs: Map<String, Any>, mergeSegments: MergeSegments,
|
|
|
+ lastSql: SharedString, sqlComment: SharedString) {
|
|
|
this.setEntity(entity)
|
|
|
this.paramNameSeq = paramNameSeq
|
|
|
this.paramNameValuePairs = paramNameValuePairs
|
|
|
this.expression = mergeSegments
|
|
|
this.sqlSelect = sqlSelect
|
|
|
this.entityClass = entityClass
|
|
|
+ this.lastSql = lastSql
|
|
|
+ this.sqlComment = sqlComment
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -108,6 +112,7 @@ class KtQueryWrapper<T : Any> : AbstractKtWrapper<T, KtQueryWrapper<T>>, Query<K
|
|
|
* 故 sqlSelect 不向下传递
|
|
|
*/
|
|
|
override fun instance(): KtQueryWrapper<T> {
|
|
|
- return KtQueryWrapper(entity, entityClass, null, paramNameSeq, paramNameValuePairs, expression)
|
|
|
+ return KtQueryWrapper(entity, entityClass, null, paramNameSeq, paramNameValuePairs, expression,
|
|
|
+ SharedString.emptyString(), SharedString.emptyString())
|
|
|
}
|
|
|
}
|