|
|
@@ -1,17 +1,411 @@
|
|
|
<?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" parameterType="String">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationManagement">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
+ <result column="create_id" jdbcType="VARCHAR" property="createId" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="deleted_sign" jdbcType="VARCHAR" property="deletedSign" />
|
|
|
+ <result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
+ <result column="type" jdbcType="VARCHAR" property="type" />
|
|
|
+ <result column="manager_id" jdbcType="VARCHAR" property="managerId" />
|
|
|
+ <result column="dep_no" jdbcType="VARCHAR" property="depNo" />
|
|
|
+ <result column="super_id" jdbcType="VARCHAR" property="superId" />
|
|
|
+ <result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
|
|
+ <result column="status" jdbcType="VARCHAR" property="status" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ <where>
|
|
|
+ <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Update_By_Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ <where>
|
|
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
+ <if test="criteria.valid">
|
|
|
+ <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
+ <foreach collection="criteria.criteria" item="criterion">
|
|
|
+ <choose>
|
|
|
+ <when test="criterion.noValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.singleValue">
|
|
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.betweenValue">
|
|
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
+ </when>
|
|
|
+ <when test="criterion.listValue">
|
|
|
+ and ${criterion.condition}
|
|
|
+ <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
+ #{listItem}
|
|
|
+ </foreach>
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ </foreach>
|
|
|
+ </trim>
|
|
|
+ </if>
|
|
|
+ </foreach>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ id, create_id, create_time, update_time, deleted_sign, name, type, manager_id, dep_no,
|
|
|
+ super_id, remarks, status
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.goafanti.common.model.OrganizationManagementExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from organization_management
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from organization_management
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ delete from organization_management
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.goafanti.common.model.OrganizationManagementExample">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ delete from organization_management
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.OrganizationManagement">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ insert into organization_management (id, create_id, create_time,
|
|
|
+ update_time, deleted_sign, name,
|
|
|
+ type, manager_id, dep_no,
|
|
|
+ super_id, remarks, status
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
+ #{type,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR},
|
|
|
+ #{superId,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationManagement">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ insert into organization_management
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="createId != null">
|
|
|
+ create_id,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time,
|
|
|
+ </if>
|
|
|
+ <if test="deletedSign != null">
|
|
|
+ deleted_sign,
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ name,
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ type,
|
|
|
+ </if>
|
|
|
+ <if test="managerId != null">
|
|
|
+ manager_id,
|
|
|
+ </if>
|
|
|
+ <if test="depNo != null">
|
|
|
+ dep_no,
|
|
|
+ </if>
|
|
|
+ <if test="superId != null">
|
|
|
+ super_id,
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ remarks,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createId != null">
|
|
|
+ #{createId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="deletedSign != null">
|
|
|
+ #{deletedSign,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ #{type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="managerId != null">
|
|
|
+ #{managerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="depNo != null">
|
|
|
+ #{depNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="superId != null">
|
|
|
+ #{superId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.goafanti.common.model.OrganizationManagementExample" resultType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ select count(*) from organization_management
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ update organization_management
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createId != null">
|
|
|
+ create_id = #{record.createId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createTime != null">
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.updateTime != null">
|
|
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.deletedSign != null">
|
|
|
+ deleted_sign = #{record.deletedSign,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.name != null">
|
|
|
+ name = #{record.name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.type != null">
|
|
|
+ type = #{record.type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.managerId != null">
|
|
|
+ manager_id = #{record.managerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.depNo != null">
|
|
|
+ dep_no = #{record.depNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.superId != null">
|
|
|
+ super_id = #{record.superId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.remarks != null">
|
|
|
+ remarks = #{record.remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.status != null">
|
|
|
+ status = #{record.status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ update organization_management
|
|
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ create_id = #{record.createId,jdbcType=VARCHAR},
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
+ deleted_sign = #{record.deletedSign,jdbcType=VARCHAR},
|
|
|
+ name = #{record.name,jdbcType=VARCHAR},
|
|
|
+ type = #{record.type,jdbcType=VARCHAR},
|
|
|
+ manager_id = #{record.managerId,jdbcType=VARCHAR},
|
|
|
+ dep_no = #{record.depNo,jdbcType=VARCHAR},
|
|
|
+ super_id = #{record.superId,jdbcType=VARCHAR},
|
|
|
+ remarks = #{record.remarks,jdbcType=VARCHAR},
|
|
|
+ status = #{record.status,jdbcType=VARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationManagement">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ update organization_management
|
|
|
+ <set>
|
|
|
+ <if test="createId != null">
|
|
|
+ create_id = #{createId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="deletedSign != null">
|
|
|
+ deleted_sign = #{deletedSign,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ type = #{type,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="managerId != null">
|
|
|
+ manager_id = #{managerId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="depNo != null">
|
|
|
+ dep_no = #{depNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="superId != null">
|
|
|
+ super_id = #{superId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status = #{status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationManagement">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Thu Nov 30 11:09:29 CST 2017.
|
|
|
+ -->
|
|
|
+ update organization_management
|
|
|
+ set create_id = #{createId,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ deleted_sign = #{deletedSign,jdbcType=VARCHAR},
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ type = #{type,jdbcType=VARCHAR},
|
|
|
+ manager_id = #{managerId,jdbcType=VARCHAR},
|
|
|
+ dep_no = #{depNo,jdbcType=VARCHAR},
|
|
|
+ super_id = #{superId,jdbcType=VARCHAR},
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <select id="selectOrganizationList" parameterType="String" resultType="com.goafanti.organization.bo.OrganizationListOut">
|
|
|
select
|
|
|
- u.id as uid,om.id,om.create_id as createId,om.create_time as createTime,
|
|
|
+ om.id,om.create_id as createId,om.create_time as createTime,
|
|
|
om.update_time as updateTime,om.deleted_sign as deletedSign,
|
|
|
om.name,om.type,om.manager_id as managerId,
|
|
|
om.dep_no as depNo,
|
|
|
om.super_id as superId,
|
|
|
- om.desc
|
|
|
- from user u
|
|
|
- left join organization_management om on om.id = u.id
|
|
|
+ om.remarks,om.status
|
|
|
+ from organization_management om
|
|
|
where
|
|
|
+ om.deleted_sign = '0'
|
|
|
<if test="name !=null">
|
|
|
AND om.name=#{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -24,16 +418,16 @@
|
|
|
<if test="depNo !=null">
|
|
|
AND om.dep_no=#{depNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<select id="selectOrganizationCount" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(0)
|
|
|
- from
|
|
|
- (select
|
|
|
- id
|
|
|
- from idorganization_management
|
|
|
- )as a
|
|
|
+ from organization_management om
|
|
|
where
|
|
|
+ om.deleted_sign='0'
|
|
|
<if test="name !=null">
|
|
|
AND om.name=#{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -47,13 +441,42 @@
|
|
|
AND om.dep_no=#{depNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</select>
|
|
|
- <select id="selectsuperId" resultType="String">
|
|
|
+ <select id="selectSuperId" resultType="com.goafanti.organization.bo.OrganizationListOut">
|
|
|
select
|
|
|
- om.super_id
|
|
|
- from organization_management om
|
|
|
+ id,name,dep_no as depNo
|
|
|
+ from organization_management
|
|
|
+ </select>
|
|
|
+ <insert id="insert1" parameterType="com.goafanti.organization.bo.OrganizationListOut">
|
|
|
+ insert into organization_management(
|
|
|
+ id,create_id,create_time,update_time,deleted_sign,
|
|
|
+ name,type,manager_id,dep_no,super_id,desc,status)
|
|
|
+ values(#{id,jdbcType=VARCHAR},#{createId,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=VARCHAR},#{updateTime,jdbcType=VARCHAR},
|
|
|
+ #{deletedSign,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},
|
|
|
+ #{type,jdbcType=VARCHAR},#{managerId,jdbcType=VARCHAR},
|
|
|
+ #{depNo,jdbcType=VARCHAR},#{superId,jdbcType=VARCHAR},
|
|
|
+ #{desc,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <select id="selectDepNoByName" resultType="String">
|
|
|
+ select
|
|
|
+ dep_no as depNo
|
|
|
+ from organization_management
|
|
|
where
|
|
|
- <if test="name !=null">
|
|
|
- AND om.name=#{name,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
+ name=#{name,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <select id="selectDepNoCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(0)
|
|
|
+ from organization_management
|
|
|
+ where
|
|
|
+ dep_no like concat(#{depNo,jdbcType=VARCHAR},'%')
|
|
|
+ </select>
|
|
|
+ <select id="selectManagerIdByName" resultType="String">
|
|
|
+ select
|
|
|
+ manager_id
|
|
|
+ from organization_management
|
|
|
+ where
|
|
|
+ name=#{name,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
+
|
|
|
</mapper>
|