<?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.artfess.sysConfig.persistence.dao.SysAppDao">
	<resultMap id="SysApp" type="com.artfess.sysConfig.persistence.model.SysApp">
		<id property="id" column="ID_" jdbcType="VARCHAR"/>
		<result property="name" column="NAME_" jdbcType="VARCHAR"/>
		<result property="icon" column="ICON_" jdbcType="VARCHAR"/>
		<result property="iconColor" column="ICON_COLOR_" jdbcType="VARCHAR"/>
		<result property="type" column="TYPE_" jdbcType="NUMERIC"/>
		<result property="menuId" column="MENU_ID_" jdbcType="VARCHAR"/>
		<result property="sn" column="SN_" jdbcType="NUMERIC"/>
		<result property="isPublish" column="IS_PUBLISH_" jdbcType="NUMERIC"/>
		<result property="content" column="CONTENT_" jdbcType="CLOB"/>
		<result property="createTime" column="CREATE_TIME_" jdbcType="TIMESTAMP"/>
		<result property="updateTime" column="UPDATE_TIME_" jdbcType="TIMESTAMP"/>
		<result property="createBy" column="CREATE_BY_" jdbcType="VARCHAR"/>
		<result property="updateBy" column="UPDATE_BY_" jdbcType="VARCHAR"/>
		<result property="tenantId" column="TENANT_ID_" jdbcType="VARCHAR"/>
	</resultMap>

	<select id="getValidMenu" resultType="java.lang.String">
		select id_ from portal_sys_menu menu where path_ like '-1.4.%.'
		and exists (
		select menu_id_ from portal_sys_app app where app.menu_id_ = menu.id_ and app.is_publish_ = 1
		)
	</select>

</mapper>