|
@@ -19,4 +19,94 @@
|
|
|
<result column="order_num" property="orderNum" />
|
|
|
</resultMap>
|
|
|
|
|
|
+ <select id="selectMenuTreeAll" resultType="com.usky.system.service.vo.HceCategoryListVO">
|
|
|
+ select distinct m.menu_id as menuId,
|
|
|
+ m.menu_name as menuName,
|
|
|
+ rm.menu_alias_name as menuAliasName,
|
|
|
+ m.parent_id as parentId,
|
|
|
+ m.order_num as orderNum,
|
|
|
+ m.is_frame as isFrame,
|
|
|
+ m.is_cache as isCache,
|
|
|
+ h.id as categoryId,
|
|
|
+ h.imagePath as imagePath,
|
|
|
+ h.createdate as createdate,
|
|
|
+ h.modifydate as modifydate,
|
|
|
+ h.description as description
|
|
|
+ from sys_menu m
|
|
|
+ left join sys_role_menu rm on m.menu_id = rm.menu_id
|
|
|
+ LEFT JOIN hce_category h on m.menu_id = h.menu_id
|
|
|
+ where m.menu_type in ('M', 'C')
|
|
|
+ and m.visible = 0
|
|
|
+ and m.status = 0
|
|
|
+ <if test="categoryName != null">
|
|
|
+ and m.menu_name = #{categoryName}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
+ and h.createdate between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ order by m.parent_id, m.order_num
|
|
|
+ </select>
|
|
|
+ <select id="selectMenuTreeByUserId" resultType="com.usky.system.service.vo.HceCategoryListVO">
|
|
|
+ select distinct m.menu_id as menuId,
|
|
|
+ m.menu_name as menuName,
|
|
|
+ rm.menu_alias_name as menuAliasName,
|
|
|
+ m.parent_id as parentId,
|
|
|
+ m.order_num as orderNum,
|
|
|
+ m.is_frame as isFrame,
|
|
|
+ m.is_cache as isCache,
|
|
|
+ h.id as categoryId,
|
|
|
+ h.imagePath as imagePath,
|
|
|
+ h.createdate as createdate,
|
|
|
+ h.modifydate as modifydate,
|
|
|
+ h.description as description
|
|
|
+ from sys_menu m
|
|
|
+ left join sys_role_menu rm on m.menu_id = rm.menu_id
|
|
|
+ left join sys_user_role ur on rm.role_id = ur.role_id
|
|
|
+ left join sys_role ro on ur.role_id = ro.role_id
|
|
|
+ left join sys_user u on ur.user_id = u.user_id
|
|
|
+ LEFT JOIN hce_category h on m.menu_id = h.menu_id
|
|
|
+ where u.user_id = #{userId}
|
|
|
+ and m.menu_type in ('M', 'C')
|
|
|
+ and m.visible = 0
|
|
|
+ and m.status = 0
|
|
|
+ AND ro.status = 0
|
|
|
+ <if test="categoryName != null">
|
|
|
+ and m.menu_name = #{categoryName}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
+ and h.createdate between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ order by m.parent_id, m.order_num
|
|
|
+ </select>
|
|
|
+ <select id="selectMenuTreeByUserIdOne" resultType="com.usky.system.service.vo.HceCategoryListVO">
|
|
|
+ SELECT
|
|
|
+ distinct m.menu_id as menuId,
|
|
|
+ m.menu_name as menuName,
|
|
|
+ t.menu_alias_name as menuAliasName,
|
|
|
+ m.parent_id as parentId,
|
|
|
+ m.order_num as orderNum,
|
|
|
+ m.is_frame as isFrame,
|
|
|
+ m.is_cache as isCache,
|
|
|
+ h.id as categoryId,
|
|
|
+ h.imagePath as imagePath,
|
|
|
+ h.createdate as createdate,
|
|
|
+ h.modifydate as modifydate,
|
|
|
+ h.description as description
|
|
|
+ FROM
|
|
|
+ sys_menu m
|
|
|
+ JOIN sys_tenant_menu t on m.menu_id = t.menu_id
|
|
|
+ LEFT JOIN hce_category h on m.menu_id = h.menu_id
|
|
|
+ WHERE m.menu_type IN ('M', 'C')
|
|
|
+ and m.visible = 0
|
|
|
+ and m.status = 0
|
|
|
+ AND t.tenant_id=#{tenantId}
|
|
|
+ <if test="categoryName != null">
|
|
|
+ and m.menu_name = #{categoryName}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
|
+ and h.createdate between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ ORDER BY m.parent_id, m.order_num
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|