Эх сурвалжийг харах

feat:根据btnKey查询按钮详情接口

xuezizhuo 1 жил өмнө
parent
commit
3605232c8a

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DragTableBtnMapper.java

@@ -77,4 +77,12 @@ public interface DragTableBtnMapper
      * @return 结果
      */
     int hasChildByBtnId(Long btnId);
+
+    /**
+     * 查询格绑定的自定义按钮
+     *
+     * @param btnKey 格绑定的自定义按钮唯一标识
+     * @return 格绑定的自定义按钮
+     */
+    DragTableBtn selectDragTableBtnByBtnKey(String btnKey);
 }

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IDragTableBtnService.java

@@ -67,4 +67,12 @@ public interface IDragTableBtnService
      * @return 结果 true 存在 false 不存在
      */
     boolean hasChildByBtnId(Long btnId);
+
+    /**
+     * 查询格绑定的自定义按钮
+     *
+     * @param btnKey 格绑定的自定义按钮唯一标识
+     * @return 格绑定的自定义按钮
+     */
+    DragTableBtn selectDragTableBtnByBtnKey(String btnKey);
 }

+ 5 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragTableBtnServiceImpl.java

@@ -162,4 +162,9 @@ public class DragTableBtnServiceImpl implements IDragTableBtnService
     public boolean hasChildByBtnId(Long btnId) {
         return dragTableBtnMapper.hasChildByBtnId(btnId) > 0;
     }
+
+    @Override
+    public DragTableBtn selectDragTableBtnByBtnKey(String btnKey) {
+        return dragTableBtnMapper.selectDragTableBtnByBtnKey(btnKey);
+    }
 }

+ 5 - 0
ruoyi-system/src/main/resources/mapper/dragmapper/DragTableBtnMapper.xml

@@ -166,4 +166,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select count(1) from drag_table_btn where btn_parent_id = #{btnId} and del_flag = '0'
     </select>
 
+    <select id="selectDragTableBtnByBtnKey" parameterType="String" resultMap="DragTableBtnResult">
+        <include refid="selectDragTableBtnVo"/>
+        where btn_key = #{btnKey}
+    </select>
+
 </mapper>