dongxin 1 год назад
Родитель
Сommit
40127ad894

+ 13 - 1
platform/src/main/java/com/jzg/controller/SysSystemController.java

@@ -95,13 +95,25 @@ public class SysSystemController {
      * @return
      */
     @PostMapping("/sysList")
-    @Operation(summary = "租户列表")
+    @Operation(summary = "租户列表分页")
     public HttpResult sysList(@RequestBody SysSystemParam param){
         Page page = param.getPage();
         Page<SysSystemVo> result = sysSystemService.queryPage(page,param);
         return HttpResult.ok(result);
     }
 
+    /**
+     * 租户列表
+     * @param param
+     * @return
+     */
+    @PostMapping("/sysListAll")
+    @Operation(summary = "租户列表")
+    public HttpResult sysListAll(@RequestBody SysSystemParam param){
+        List<SysSystemVo> result = sysSystemService.queryList(param);
+        return HttpResult.ok(result);
+    }
+
     /**
      * 租户信息查询
      * @param id

+ 10 - 1
platform/src/main/java/com/jzg/mapper/SysSystemMapper.java

@@ -8,6 +8,8 @@ import com.jzg.commons.entity.vo.SysSystemVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * 租户管理表Mapper sys_system
  *
@@ -17,13 +19,20 @@ import org.apache.ibatis.annotations.Param;
 public interface SysSystemMapper extends BaseMapper<SysSystem> {
 
     /**
-     * 列表查询
+     * 列表查询分页
      *
      * @param page
      * @param param
      * @return
      */
     Page<SysSystemVo> queryPage(Page page, @Param("sysSystemVo") SysSystemParam param);
+
+    /**
+     * 列表查询
+     * @param param
+     * @return
+     */
+    List<SysSystemVo> queryList(@Param("sysSystemVo") SysSystemParam param);
 }
 
 

+ 7 - 0
platform/src/main/java/com/jzg/service/SysSystemService.java

@@ -85,6 +85,13 @@ public interface SysSystemService extends IService<SysSystem> {
      */
     public Page<SysSystemVo> queryPage(Page page, SysSystemParam param);
 
+    /**
+     * 租户列表
+     * @param param
+     * @return
+     */
+    List<SysSystemVo> queryList(SysSystemParam param);
+
     /**
      * 租户明细
      * @param sysId

+ 6 - 0
platform/src/main/java/com/jzg/service/impl/SysSystemServiceImpl.java

@@ -247,6 +247,12 @@ public class SysSystemServiceImpl extends ServiceImpl<SysSystemMapper, SysSystem
         return sysPage;
     }
 
+    @Override
+    public List<SysSystemVo> queryList(SysSystemParam param) {
+        List<SysSystemVo> sysList = baseMapper.queryList(param);
+        return sysList;
+    }
+
     @Override
     public SysSystemVo queryById(String sysId) {
         SysSystem system = this.getById(sysId);

+ 10 - 0
platform/src/main/resources/mapper/SysSystemMapper.xml

@@ -69,4 +69,14 @@
         </where>
         ORDER BY create_time DESC
     </select>
+    <select id="queryList" resultType="com.jzg.commons.entity.vo.SysSystemVo">
+        <include refid="selectSystemVo"/>
+        <where>
+            <if test="sysSystemVo.searchValue != null and sysSystemVo.searchValue != ''">
+                and ( sys_name = #{sysSystemVo.searchValue} or sys_code = #{sysSystemVo.searchValue})
+            </if>
+            and is_tenant = 1 and parent_id <![CDATA[ <> ]]> '0' and is_delete = 0
+        </where>
+        ORDER BY create_time DESC
+    </select>
 </mapper>