Selaa lähdekoodia

主题查询全部接口,和sql优化

lidongyu 1 vuosi sitten
vanhempi
commit
a5e0311232

+ 5 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/handleAffairs/TopicTypeController.java

@@ -41,7 +41,11 @@ public class TopicTypeController extends BaseController {
         List<TopicType> list = topicTypeService.selectTopicTypeList(topicType);
         return getDataTable(list);
     }
-
+    @GetMapping("/listAll")
+    public AjaxResult listAll(TopicType topicType)
+    {
+        return success(topicTypeService.selectTopicTypeList(topicType));
+    }
     /**
      * 导出主题类型配置列表
      */

+ 2 - 1
sooka-jnb/src/main/java/com/sooka/jnb/handleAffairs/service/impl/TopicTypeServiceImpl.java

@@ -43,7 +43,8 @@ public class TopicTypeServiceImpl implements ITopicTypeService
      */
     @Override
     public List<TopicType> selectTopicTypeList(TopicType topicType)
-    {   List<TopicType> list = topicTypeMapper.selectTopicTypeList(topicType);
+    {
+        List<TopicType> list = topicTypeMapper.selectTopicTypeList(topicType);
         list.forEach(e->{
             e.setObjectOfHandlingArray(Arrays.asList(e.getObjectOfHandling().split(",")));
         });

+ 1 - 1
sooka-jnb/src/main/resources/mapper/handleAffairs/TopicTypeMapper.xml

@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and del_flag = 0
             <if test="deptName != null  and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
             <if test="yesOrNoShow != null  and yesOrNoShow != ''"> and yes_or_no_show = #{yesOrNoShow}</if>
-            <if test="objectOfHandling != null  and objectOfHandling != ''"> and object_of_handling = #{objectOfHandling}</if>
+            <if test="objectOfHandling != null  and objectOfHandling != ''"> and object_of_handling like concat('%',#{objectOfHandling},'%')</if>
         </where>
     </select>