Browse Source

字段管理-列表查询新增bug修复

jichaobo 2 years ago
parent
commit
ccfdff704d

+ 7 - 5
base-modules/service-system/service-system-biz/src/main/java/com/usky/system/mapper/SysDictTypeMapper.java

@@ -3,6 +3,7 @@ package com.usky.system.mapper;
 
 import com.usky.common.mybatis.core.CrudMapper;
 import com.usky.system.domain.SysDictType;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -37,7 +38,7 @@ public interface SysDictTypeMapper extends CrudMapper<SysDictType>
      * @param dictId 字典类型ID
      * @return 字典类型
      */
-    public SysDictType selectDictTypeById(Long dictId);
+    public SysDictType selectDictTypeById(@Param("dictId") Long dictId);
 
     /**
      * 根据字典类型查询信息
@@ -45,7 +46,7 @@ public interface SysDictTypeMapper extends CrudMapper<SysDictType>
      * @param dictType 字典类型
      * @return 字典类型
      */
-    public SysDictType selectDictTypeByType(String dictType);
+    public SysDictType selectDictTypeByType(@Param("dictType") String dictType);
 
     /**
      * 通过字典ID删除字典信息
@@ -53,7 +54,7 @@ public interface SysDictTypeMapper extends CrudMapper<SysDictType>
      * @param dictId 字典ID
      * @return 结果
      */
-    public int deleteDictTypeById(Long dictId);
+    public int deleteDictTypeById(@Param("dictId") Long dictId);
 
     /**
      * 批量删除字典类型信息
@@ -61,7 +62,7 @@ public interface SysDictTypeMapper extends CrudMapper<SysDictType>
      * @param dictIds 需要删除的字典ID
      * @return 结果
      */
-    public int deleteDictTypeByIds(Long[] dictIds);
+    public int deleteDictTypeByIds(@Param("dictIds") Long[] dictIds);
 
     /**
      * 新增字典类型信息
@@ -85,5 +86,6 @@ public interface SysDictTypeMapper extends CrudMapper<SysDictType>
      * @param dictType 字典类型
      * @return 结果
      */
-    public SysDictType checkDictTypeUnique(String dictType,Integer tenantId);
+    public SysDictType checkDictTypeUnique(@Param("dictType") String dictType,
+                                           @Param("tenantId") Integer tenantId);
 }

+ 1 - 1
base-modules/service-system/service-system-biz/src/main/java/com/usky/system/mapper/SysPostMapper.java

@@ -29,7 +29,7 @@ public interface SysPostMapper extends CrudMapper<SysPost>
      * 
      * @return 岗位列表
      */
-    public List<SysPost> selectPostAll();
+    public List<SysPost> selectPostAll(@Param("tenantId") Integer tenantId);
 
     /**
      * 通过岗位ID查询岗位信息

+ 1 - 1
base-modules/service-system/service-system-biz/src/main/java/com/usky/system/service/impl/SysPostServiceImpl.java

@@ -50,7 +50,7 @@ public class SysPostServiceImpl extends AbstractCrudService<SysPostMapper, SysPo
     @Override
     public List<SysPost> selectPostAll()
     {
-        return postMapper.selectPostAll();
+        return postMapper.selectPostAll(SecurityUtils.getTenantId());
     }
 
     /**

+ 4 - 0
base-modules/service-system/service-system-biz/src/main/resources/mapper/system/SysPostMapper.xml

@@ -43,6 +43,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="selectPostAll" resultMap="SysPostResult">
 		<include refid="selectPostVo"/>
+		where
+		<if test="tenantId != null and tenantId != '' and tenantId !=0">
+			tenant_id = #{tenantId}
+		</if>
 	</select>
 	
 	<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">