<?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="com.highdatas.mdm.mapper.MenuMappingMapper"> <!-- é€šç”¨æŸ¥è¯¢æ˜ å°„ç»“æžœ --> <resultMap id="BaseResultMap" type="com.highdatas.mdm.entity.MenuMapping"> <id column="id" property="id" /> <result column="code" property="code" /> <result column="name" property="name" /> <result column="chargeid" property="chargeid" /> <result column="systemid" property="systemid" /> <result column="menuid" property="menuid" /> <result column="datatype" property="datatype" /> <result column="tablename" property="tablename" /> <result column="starttime" property="starttime" /> <result column="endtime" property="endtime" /> <result column="createtime" property="createtime" /> <result column="updatetime" property="updatetime" /> </resultMap> <select id="getMapping" resultType="java.util.Map"> SELECT m.id,m.code, m.name, system_id as systemId, m.audit as audit, m.desc, c2.name as cname1, c2.id as cid1, c1.name as cname2, c1.id as cid2, c.name as cname3, c.id as cid3, start_time as startTime, end_time as endTime, m.create_time as createTime, m.update_time as updateTime, table_name as tableName, sm.name as theme, m.theme_id as themeId, m.charge_id as chargeId FROM `menu_mapping` m LEFT JOIN sys_datacategory c on c.id = m.data_type LEFT JOIN sys_datacategory c1 on c1.id = c.parent_id LEFT JOIN sys_datacategory c2 on c2.id = c1.parent_id LEFT JOIN sys_menu sm on sm.id = m.theme_id where m.menu_id = #{id} </select> </mapper>