|
@@ -9,6 +9,7 @@
|
|
|
<result property="parentId" column="parent_id" />
|
|
|
<result property="parentName" column="parent_name"/>
|
|
|
<result property="code" column="code_" />
|
|
|
+ <result property="groups" column="groups_" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="createBy" column="create_by" />
|
|
@@ -23,13 +24,14 @@
|
|
|
-->
|
|
|
<![CDATA[
|
|
|
insert into base_organization
|
|
|
- (id_,name_,parent_id,code_,del_flag,create_time,create_by,update_time,update_by)
|
|
|
+ (id_,name_,parent_id,code_,groups_,del_flag,create_time,create_by,update_time,update_by)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType=VARCHAR}
|
|
|
,#{name,jdbcType=VARCHAR}
|
|
|
,#{parentId,jdbcType=VARCHAR}
|
|
|
,#{code,jdbcType=VARCHAR}
|
|
|
+,#{groups,jdbcType=VARCHAR}
|
|
|
,#{delFlag,jdbcType= NUMERIC }
|
|
|
,#{createTime,jdbcType= TIMESTAMP }
|
|
|
,#{createBy,jdbcType=VARCHAR}
|
|
@@ -53,6 +55,9 @@
|
|
|
<if test="code!=null">
|
|
|
code_=#{code,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="groups!=null">
|
|
|
+ groups_=#{groups,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="delFlag!=null">
|
|
|
del_flag=#{delFlag,jdbcType= NUMERIC },
|
|
|
</if>
|
|
@@ -73,7 +78,7 @@
|
|
|
</update>
|
|
|
<select id="get" parameterType="string" resultMap="OrganizationMap">
|
|
|
select
|
|
|
-id_,name_,parent_id,code_,del_flag,create_time,create_by,update_time,update_by from base_organization where id_=#{0}
|
|
|
+id_,name_,parent_id,code_,groups_,del_flag,create_time,create_by,update_time,update_by from base_organization where id_=#{0}
|
|
|
</select>
|
|
|
<select id="exist" parameterType="string" resultType="int">
|
|
|
select count(*) from base_organization where id_=#{0}
|
|
@@ -112,6 +117,11 @@ id_,name_,parent_id,code_,del_flag,create_time,create_by,update_time,update_by
|
|
|
and a.parent_id is null
|
|
|
]]>
|
|
|
</if>
|
|
|
+ <if test="searchParams.group">
|
|
|
+ <![CDATA[
|
|
|
+ and a.groups_ like #{searchParams.group}
|
|
|
+ ]]>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
|
${sort.name} ${sort.order}
|
|
@@ -123,16 +133,9 @@ id_,name_,parent_id,code_,del_flag,create_time,create_by,update_time,update_by
|
|
|
<select id="findByName" parameterType="string" resultMap="OrganizationMap">
|
|
|
select * from base_organization where name_=#{0}
|
|
|
</select>
|
|
|
- <select id="listByDistrict" resultMap="OrganizationMap">
|
|
|
- select * from base_organization
|
|
|
- where del_flag = 0
|
|
|
- and (name_ like '%县' or name_ like '%市' or name_ like '%区')
|
|
|
- </select>
|
|
|
- <select id="listByOrg" resultMap="OrganizationMap">
|
|
|
+ <select id="listByGroups" resultMap="OrganizationMap">
|
|
|
select * from base_organization
|
|
|
where del_flag = 0
|
|
|
- and name_ not like '%县'
|
|
|
- and name_ not like '%市'
|
|
|
- and name_ not like '%区';
|
|
|
+ and groups_ like #{0};
|
|
|
</select>
|
|
|
</mapper>
|