优化 SqlMap 性能,增加 update 和 insert 生成参数接口,方便在 Mapper 中直接引用。

This commit is contained in:
thinkgem
2025-04-01 11:57:35 +08:00
parent 9bc8d5dd55
commit c0637ebf0d
2 changed files with 164 additions and 89 deletions

View File

@@ -24,5 +24,25 @@
</where>
ORDER BY ${sqlMap.order.toSql()}
</select>
<!-- 重写 Dao 中的 insert 查询方法 v5.11.1
<insert id="insert">
INSERT INTO ${sqlMap.insert.toTableSql()}
(${sqlMap.insert.toColumnSql()})
VALUES (${sqlMap.insert.toValuesSql()})
</insert> -->
<!-- 重写 Dao 中的 update 查询方法 v5.11.1
<update id="update">
UPDATE ${sqlMap.update.toTableSql()}
SET ${sqlMap.update.toColumnSql()}
WHERE ${sqlMap.update.toWhereSql()}
</update> -->
<!-- 重写 Dao 中的 phyDelete 查询方法 v5.11.1
<delete id="phyDelete">
DELETE FROM ${sqlMap.update.toTableSql()}
WHERE ${sqlMap.update.toWhereSql()}
</delete> -->
</mapper>