7 changed files with 181 additions and 11 deletions
@ -0,0 +1,20 @@ |
|||||
|
package com.ccsens.carbasics.persist.dao; |
||||
|
|
||||
|
import com.ccsens.carbasics.persist.mapper.OrganizationDepartmentParentMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
@Repository |
||||
|
public interface OrganizationDepartmentParentDao extends OrganizationDepartmentParentMapper { |
||||
|
/** |
||||
|
* 查询部门的下级部门id |
||||
|
* @param departmentId 部门id |
||||
|
* @return 部门的下级部门id |
||||
|
*/ |
||||
|
List<Long> querySonDepartmentId(@Param("did") Long departmentId); |
||||
|
} |
@ -1,4 +1,4 @@ |
|||||
spring: |
spring: |
||||
profiles: |
profiles: |
||||
active: pre |
active: test |
||||
include: common, util-pre |
include: common, util-test |
||||
|
@ -0,0 +1,14 @@ |
|||||
|
<?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.ccsens.carbasics.persist.dao.OrganizationDepartmentParentDao"> |
||||
|
|
||||
|
<select id="querySonDepartmentId" resultType="java.lang.Long"> |
||||
|
SELECT |
||||
|
department_id |
||||
|
FROM |
||||
|
t_organization_department_parent |
||||
|
WHERE |
||||
|
rec_status = 0 |
||||
|
AND parent_id = #{did} |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue