|
@@ -10,8 +10,8 @@
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
<!-- 通用查询映射结果 -->
|
|
|
- <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.MenuFrequency">
|
|
|
|
|
- <id column="menu_uuid" property="menuUuid"/>
|
|
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.dk.mdm.model.response.mst.MenuFrequencyResponse">
|
|
|
|
|
+ <id column="menu_uuid" property="menuUuid" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="cp_id" property="cpId"/>
|
|
<result column="cp_id" property="cpId"/>
|
|
|
<result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
|
|
<result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="app_code" property="appCode"/>
|
|
<result column="app_code" property="appCode"/>
|
|
@@ -35,24 +35,9 @@
|
|
|
<if test="appCode != null and appCode != ''">
|
|
<if test="appCode != null and appCode != ''">
|
|
|
AND app_code = #{appCode}
|
|
AND app_code = #{appCode}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="qty != null">
|
|
|
|
|
- AND qty = #{qty}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="opUpdateTime != null">
|
|
|
|
|
- AND op_update_time = #{opUpdateTime}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="opUpdateUserId != null and opUpdateUserId != ''">
|
|
|
|
|
- AND op_update_user_id = #{opUpdateUserId}
|
|
|
|
|
- </if>
|
|
|
|
|
<if test="opAppCode != null and opAppCode != ''">
|
|
<if test="opAppCode != null and opAppCode != ''">
|
|
|
AND op_app_code = #{opAppCode}
|
|
AND op_app_code = #{opAppCode}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="opTimestamp != null">
|
|
|
|
|
- AND op_timestamp = #{opTimestamp}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="opDbUser != null and opDbUser != ''">
|
|
|
|
|
- AND op_db_user = #{opDbUser}
|
|
|
|
|
- </if>
|
|
|
|
|
</where>
|
|
</where>
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
@@ -67,21 +52,47 @@
|
|
|
<!-- 查询表t_mst_menu_frequency,(条件查询+分页)列表 -->
|
|
<!-- 查询表t_mst_menu_frequency,(条件查询+分页)列表 -->
|
|
|
<select id="selectByCond" resultMap="BaseResultMap">
|
|
<select id="selectByCond" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
|
|
- FROM t_mst_menu_frequency
|
|
|
|
|
- <include refid="Condition"/>
|
|
|
|
|
- <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
|
|
- limit #{end} offset #{start}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ sys.f_get_name_i18n ( tam.menu_name_i18n, #{i18n} ) menu_name,
|
|
|
|
|
+ tmf.menu_uuid,
|
|
|
|
|
+ tam.object_code,
|
|
|
|
|
+ tam.object_path,
|
|
|
|
|
+ tam.object_icon
|
|
|
|
|
+ FROM
|
|
|
|
|
+ dkic_b.t_mst_menu_frequency tmf
|
|
|
|
|
+ INNER JOIN sys.t_app_menu tam ON tmf.menu_uuid = tam.menu_uuid
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ tmf.staff_id = #{staffId} ::uuid
|
|
|
|
|
+ AND tmf.app_code = #{appCode}
|
|
|
|
|
+ ORDER BY
|
|
|
|
|
+ tmf.qty DESC
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <!-- 查询表t_mst_menu_frequency,(条件查询)个数 -->
|
|
|
|
|
- <select id="countByCond" resultType="Long">
|
|
|
|
|
- SELECT
|
|
|
|
|
- count(1)
|
|
|
|
|
- FROM t_mst_menu_frequency
|
|
|
|
|
- <include refid="Condition"/>
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
+ <!--新建编辑用户功能频率-->
|
|
|
|
|
+ <insert id="save">
|
|
|
|
|
+ insert into dkic_b.t_mst_menu_frequency
|
|
|
|
|
+ (
|
|
|
|
|
+ <trim suffixOverrides=",">
|
|
|
|
|
+ menu_uuid,
|
|
|
|
|
+ cp_id,
|
|
|
|
|
+ staff_id,
|
|
|
|
|
+ app_code,
|
|
|
|
|
+ qty,
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ )
|
|
|
|
|
+ values
|
|
|
|
|
+ (
|
|
|
|
|
+ <trim suffixOverrides=",">
|
|
|
|
|
+ #{menuUuid} ::uuid,
|
|
|
|
|
+ #{cpId},
|
|
|
|
|
+ #{staffId} ::uuid,
|
|
|
|
|
+ #{appCode},
|
|
|
|
|
+ #{qty},
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ )
|
|
|
|
|
+ on conflict (menu_uuid,staff_id,app_code) do update set
|
|
|
|
|
+ cp_id = excluded."cp_id",
|
|
|
|
|
+ qty = excluded."qty" + 1;
|
|
|
|
|
+ </insert>
|
|
|
|
|
|
|
|
<!-- 根据主键查询表t_mst_menu_frequency的一行数据 -->
|
|
<!-- 根据主键查询表t_mst_menu_frequency的一行数据 -->
|
|
|
<select id="selectById" resultMap="BaseResultMap">
|
|
<select id="selectById" resultMap="BaseResultMap">
|