提交地图与部门关联配置表接口
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.njcn.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.system.pojo.po.DeptMap;
|
||||
import com.njcn.system.pojo.vo.Dept;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/08/04 11:40
|
||||
*/
|
||||
public interface DeptMapMapper extends BaseMapper<DeptMap> {
|
||||
|
||||
/**
|
||||
* 查询部门id是否存在
|
||||
*/
|
||||
int selectCountByDept(String deptId);
|
||||
/**
|
||||
* 查询部门名称
|
||||
*/
|
||||
String selectDeptName(String deptId);
|
||||
/**
|
||||
* 查询部门名称返回集合
|
||||
*/
|
||||
List<Dept> selectDeptListName(@Param("deptIndexes") List<String> deptIndexes);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.system.mapper.DeptMapMapper">
|
||||
|
||||
<select id="selectCountByDept" resultType="int">
|
||||
SELECT count(Id) FROM sys_dept WHERE Id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="selectDeptName" resultType="java.lang.String">
|
||||
SELECT Name FROM sys_dept WHERE Id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="selectDeptListName" resultType="Dept">
|
||||
SELECT `Id` deptId, `Name` deptName
|
||||
FROM sys_dept
|
||||
WHERE Id IN
|
||||
<foreach item="item" collection="deptIndexes" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user