|
|
@@ -5,8 +5,7 @@
|
|
|
<!-- 通用设置 -->
|
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- menu_uuid
|
|
|
- , cp_id, staff_id, app_code, display_no, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
|
+ menu_uuid,grade_code, app_code, display_no, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
|
</sql>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -16,8 +15,7 @@
|
|
|
<result column="object_code" property="objectCode"/>
|
|
|
<result column="object_path" property="objectPath"/>
|
|
|
<result column="object_icon" property="objectIcon"/>
|
|
|
- <result column="cp_id" property="cpId"/>
|
|
|
- <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
|
|
|
+ <result column="grade_code" property="gradeCode"/>
|
|
|
<result column="app_code" property="appCode"/>
|
|
|
<result column="display_no" property="displayNo"/>
|
|
|
<result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
|
|
|
@@ -30,11 +28,8 @@
|
|
|
<!-- 通用条件列 -->
|
|
|
<sql id="Condition">
|
|
|
<where>
|
|
|
- <if test="cpId != null">
|
|
|
- AND cp_id = #{cpId}
|
|
|
- </if>
|
|
|
- <if test="staffId != null and staffId != ''">
|
|
|
- AND staff_id = #{staffId}
|
|
|
+ <if test="gradeCode != null and gradeCode != ''">
|
|
|
+ AND grade_code = #{gradeCode}
|
|
|
</if>
|
|
|
<if test="appCode != null and appCode != ''">
|
|
|
AND app_code = #{appCode}
|
|
|
@@ -52,21 +47,14 @@
|
|
|
|
|
|
<!-- 查询表t_mst_com_menu,(条件查询+分页)列表 -->
|
|
|
<select id="selectByCond" resultMap="BaseResultMap">
|
|
|
- SELECT
|
|
|
- sys.f_get_name_i18n ( tam.menu_name_i18n, #{i18n} ) menu_name,
|
|
|
- tmcm.menu_uuid,
|
|
|
- tam.object_code,
|
|
|
- tam.object_path,
|
|
|
- CASE WHEN tam.object_icon IS NULL THEN NULL ELSE tam.object_icon || '.png' END AS object_icon
|
|
|
+ SELECT tmcm.menu_uuid,
|
|
|
+ tmcm.display_no,
|
|
|
+ tmcm.app_code,
|
|
|
+ tmcm.grade_code
|
|
|
FROM
|
|
|
dkic_b.t_mst_com_menu tmcm
|
|
|
- INNER JOIN sys.t_app_menu tam ON tmcm.menu_uuid = tam.menu_uuid
|
|
|
- WHERE
|
|
|
- tmcm.staff_id = #{staffId} ::uuid
|
|
|
- AND tmcm.app_code = #{appCode}
|
|
|
- <if test="gradeCode != null and gradeCode != ''">
|
|
|
- AND (tam.grade_codes is null or #{gradeCode} = any(tam.grade_codes))
|
|
|
- </if>
|
|
|
+ <include refid="Condition"/>
|
|
|
+ ORDER BY tmcm.display_no
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询表t_mst_com_menu,(条件查询)个数 -->
|