We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议添加batchInsert代码生成
The text was updated successfully, but these errors were encountered:
亲你好,有没有batchInsert的模板可以share一下,这样可以更好的增加
Sorry, something went wrong.
mybatis的批量新增生成,供参考,生成的代码可能需自行移除一些无需的字段。 <insert id="batchInsert" parameterType="${packageName}.entity.${classInfo.className}"> INSERT INTO ${classInfo.originTableName} <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> ( <#list classInfo.fieldList as fieldItem > <#if fieldItem.columnName != "id" > ${fieldItem.columnName}<#if fieldItem_has_next>,</#if> </#if> </#list> ) </#if> VALUES <#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0> <foreach collection="list" index="index" item="item" separator=","> ( <#list classInfo.fieldList as fieldItem > <#if fieldItem.columnName != "id" > ${r"#{item."}${fieldItem.fieldName}${r"}"}<#if fieldItem_has_next>,</#if> </#if> </#list> ) </foreach> </#if> </insert>
No branches or pull requests
建议添加batchInsert代码生成
The text was updated successfully, but these errors were encountered: