From 5ea8ef80312e8c1d3365abe7106622d676def195 Mon Sep 17 00:00:00 2001
From: huangzhen <867127663@qq.com>
Date: 星期五, 30 九月 2022 16:41:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/resources/mybatis/doublePrevention/DoublePreventDeptMapper.xml |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mybatis/doublePrevention/DoublePreventDeptMapper.xml b/src/main/resources/mybatis/doublePrevention/DoublePreventDeptMapper.xml
new file mode 100644
index 0000000..df88df4
--- /dev/null
+++ b/src/main/resources/mybatis/doublePrevention/DoublePreventDeptMapper.xml
@@ -0,0 +1,33 @@
+<?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.ruoyi.doublePrevention.repository.DoublePreventDeptRepository">
+    <resultMap type="com.ruoyi.doublePrevention.entity.DoublePreventDept" id="DeptResult">
+        <id     property="deptId"     column="dept_id"     />
+        <result property="parentId"   column="parent_id"   />
+        <result property="ancestors"  column="ancestors"   />
+        <result property="deptName"   column="dept_name"   />
+        <result property="orderNum"   column="order_num"   />
+        <result property="leader"     column="leader"      />
+        <result property="phone"      column="phone"       />
+        <result property="email"      column="email"       />
+        <result property="status"     column="status"      />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"   column="create_by"   />
+        <result property="createTime" column="create_time" />
+        <result property="updateBy"   column="update_by"   />
+        <result property="updateTime" column="update_time" />
+        <result property="companyId" column="company_id"/>
+    </resultMap>
+
+    <select id="getDepInfoByDepId" resultMap="DeptResult">
+        select *
+        from sys_dept
+        where dept_id = #{depId} and status = 0 and del_flag = 0
+    </select>
+
+    <select id="listDepAndSubDepIds" resultType="java.lang.Long">
+        select dept_id
+        from sys_dept
+        where ancestors like #{ancestors}"%" and status = 0 and del_flag = 0
+    </select>
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.2