Bladeren bron

小程序菜单区分app

ct 3 dagen geleden
bovenliggende
commit
b2d63a140b

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsMenuScrm.java

@@ -33,5 +33,7 @@ public class FsMenuScrm extends BaseEntity
 
     private Integer menuType;//菜单类型
 
+    private String appId;
+
 
 }

+ 6 - 1
fs-service/src/main/resources/mapper/hisStore/FsMenuScrmMapper.xml

@@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"    column="update_time"    />
         <result property="sort"    column="sort"    />
         <result property="menuType"    column="menu_type"    />
+        <result property="appId"    column="app_id"    />
     </resultMap>
 
     <sql id="selectFsMenuVo">
-        select menu_id, menu_name,menu_type, icon, is_show,link_type,link_url, create_time, update_time,sort from fs_menu
+        select menu_id, menu_name,menu_type, icon, is_show,link_type,link_url, create_time, update_time,sort,app_id from fs_menu
     </sql>
 
     <select id="selectFsMenuList" parameterType="FsMenuScrm" resultMap="FsMenuResult">
@@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null "> and link_url = #{linkUrl}</if>
             <if test="sort != null "> and sort = #{sort}</if>
             <if test="menuType != null "> and menu_type = #{menuType}</if>
+            <if test="appId != null and appId != ''"> and app_id = #{appId}</if>
         </where>
         order by sort asc
     </select>
@@ -52,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null">link_url,</if>
             <if test="sort != null">sort,</if>
             <if test="menuType != null">menu_type,</if>
+            <if test="appId != null">app_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="menuName != null">#{menuName},</if>
@@ -63,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null">#{linkUrl},</if>
             <if test="sort != null">#{sort},</if>
             <if test="menuType != null">#{menuType},</if>
+            <if test="appId != null">#{appId},</if>
          </trim>
     </insert>
 
@@ -78,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="linkUrl != null">link_url = #{linkUrl},</if>
             <if test="sort != null">sort = #{sort},</if>
             <if test="menuType != null">menu_type = #{menuType},</if>
+            <if test="appId != null and appId != ''">app_id = #{appId},</if>
         </trim>
         where menu_id = #{menuId}
     </update>