|
|
@@ -1,7 +1,7 @@
|
|
|
<?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.goafanti.common.dao.OrganizationManagementMapper">
|
|
|
- <select id="selectOrganizationList" resultType="com.goafanti.organization.bo.OrganizationListOut">
|
|
|
+ <select id="selectOrganizationList" resultType="com.goafanti.organization.bo.OrganizationListOut" parameterType="String">
|
|
|
select
|
|
|
u.id as uid,om.id,om.create_id as createId,om.create_time as createTime,
|
|
|
om.update_time as updateTime,om.deleted_sign as deletedSign,
|
|
|
@@ -11,6 +11,19 @@
|
|
|
om.desc
|
|
|
from user u
|
|
|
left join organization_management om on om.id = u.id
|
|
|
+ where
|
|
|
+ <if test="name !=null">
|
|
|
+ AND om.name=#{name,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="superId !=null">
|
|
|
+ AND om.super_id=#{superId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="type !=null">
|
|
|
+ AND om.type=#{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="depNo !=null">
|
|
|
+ AND om.dep_no=#{depNo,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<select id="selectOrganizationCount" resultType="java.lang.Integer">
|
|
|
select
|
|
|
@@ -19,6 +32,28 @@
|
|
|
(select
|
|
|
id
|
|
|
from idorganization_management
|
|
|
- )
|
|
|
+ )as a
|
|
|
+ where
|
|
|
+ <if test="name !=null">
|
|
|
+ AND om.name=#{name,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="superId !=null">
|
|
|
+ AND om.super_id=#{superId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="type !=null">
|
|
|
+ AND om.type=#{type,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="depNo !=null">
|
|
|
+ AND om.dep_no=#{depNo,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectsuperId" resultType="String">
|
|
|
+ select
|
|
|
+ om.super_id
|
|
|
+ from organization_management om
|
|
|
+ where
|
|
|
+ <if test="name !=null">
|
|
|
+ AND om.name=#{name,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|