From 17badd7ea4d77c0aafbdfa65e05743cb7856489c Mon Sep 17 00:00:00 2001 From: chenhj <chenhj@lunor.cn> Date: 星期五, 30 五月 2025 14:40:58 +0800 Subject: [PATCH] Merge pull request 'chen' (#12) from chen into master --- ruoyi-admin/src/main/resources/templates/mapper.xml.ftl | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/mapper.xml.ftl b/ruoyi-admin/src/main/resources/templates/mapper.xml.ftl new file mode 100644 index 0000000..9dc8071 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/mapper.xml.ftl @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="${package.Mapper}.${table.mapperName}"> + + <#if enableCache> + <!-- 寮�鍚簩绾х紦瀛� --> + <cache type="${cacheClassName}"/> + + </#if> + <#if baseResultMap> + <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> + <resultMap id="BaseResultMap" type="${package.Entity}.${entity}"> + <#list table.fields as field> + <#if field.keyFlag><#--鐢熸垚涓婚敭鎺掑湪绗竴浣�--> + <id column="${field.name}" property="${field.propertyName}" /> + </#if> + </#list> + <#list table.commonFields as field><#--鐢熸垚鍏叡瀛楁 --> + <result column="${field.name}" property="${field.propertyName}" /> + </#list> + <#list table.fields as field> + <#if !field.keyFlag><#--鐢熸垚鏅�氬瓧娈� --> + <result column="${field.name}" property="${field.propertyName}" /> + </#if> + </#list> + </resultMap> + + </#if> + <#if baseColumnList> + <!-- 閫氱敤鏌ヨ缁撴灉鍒� --> + <sql id="Base_Column_List"> + <#list table.commonFields as field> + ${field.columnName}, + </#list> + ${table.fieldNames} + </sql> + + </#if> +</mapper> \ No newline at end of file -- Gitblit v1.9.3