|
|
@@ -21,7 +21,7 @@
|
|
|
deleted_sign as deletedSign, aut_no as autNo, hierarchies,status ,show_order as showOrder, super_id as superId,type
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from permission
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -87,14 +87,14 @@
|
|
|
where tur.uid = #{userId,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="findAll" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from permission order by name
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertBatch" parameterType="com.goafanti.common.model.Permission">
|
|
|
insert into permission (id, name, url)
|
|
|
- values
|
|
|
+ values
|
|
|
<foreach item="item" index="index" collection="list" separator=",">
|
|
|
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.url,jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
@@ -102,31 +102,31 @@
|
|
|
name = values(name),
|
|
|
url = values(url)
|
|
|
</insert>
|
|
|
-
|
|
|
+
|
|
|
<delete id="deleteByPrimaryKeys" parameterType="java.lang.String">
|
|
|
delete from permission
|
|
|
- where id in
|
|
|
- <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
- #{item,jdbcType=VARCHAR}
|
|
|
+ where id in
|
|
|
+ <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
|
|
+ #{item,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<insert id="insertn" parameterType="com.goafanti.common.model.Permission">
|
|
|
- insert into permission (id, url, name,
|
|
|
- create_id, create_time, update_time,
|
|
|
- deleted_sign, aut_no, hierarchies,
|
|
|
+ insert into permission (id, url, name,
|
|
|
+ create_id, create_time, update_time,
|
|
|
+ deleted_sign, aut_no, hierarchies,
|
|
|
status, show_order, super_id,type
|
|
|
)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
- #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- #{deletedSign,jdbcType=VARCHAR}, #{autNo,jdbcType=VARCHAR}, #{hierarchies,jdbcType=VARCHAR},
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
+ #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ #{deletedSign,jdbcType=VARCHAR}, #{autNo,jdbcType=VARCHAR}, #{hierarchies,jdbcType=VARCHAR},
|
|
|
#{status,jdbcType=VARCHAR}, #{showOrder,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR},#{type,jdbcType=INTEGER}
|
|
|
)
|
|
|
</insert>
|
|
|
<select id="selectAdminNameById" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
- select
|
|
|
+ select
|
|
|
name
|
|
|
from admin
|
|
|
- where
|
|
|
+ where
|
|
|
id=#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectAutNoCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
@@ -135,7 +135,7 @@
|
|
|
from permission
|
|
|
where
|
|
|
super_id=#{superId,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
<select id="selectIdByAutNo" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
select
|
|
|
id
|
|
|
@@ -155,14 +155,14 @@
|
|
|
name as superId
|
|
|
from permission
|
|
|
where
|
|
|
- id=#{id,jdbcType=VARCHAR}
|
|
|
+ id=#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<delete id="deleteById" parameterType="java.lang.String">
|
|
|
delete from permission
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<select id="selectAllById" parameterType="java.lang.String" resultType="com.goafanti.common.model.Permission">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from permission
|
|
|
where
|
|
|
@@ -223,12 +223,12 @@
|
|
|
type = #{type,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="selectIDNBySuperId" parameterType="java.lang.String" resultType="com.goafanti.common.model.Permission">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
- from permission
|
|
|
+ from permission
|
|
|
where
|
|
|
super_id=#{superId,jdbcType=VARCHAR}
|
|
|
order by aut_no
|
|
|
@@ -244,9 +244,8 @@
|
|
|
<select id="selectOneAll" resultType="com.goafanti.permission.bo.PermissionBo">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
- from permission
|
|
|
- where
|
|
|
- hierarchies=1
|
|
|
+ from permission
|
|
|
+ where 1=1
|
|
|
order by show_order
|
|
|
</select>
|
|
|
<select id="selectNameById" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
@@ -254,7 +253,7 @@
|
|
|
name as superId
|
|
|
from permission
|
|
|
where
|
|
|
- id=#{id,jdbcType=VARCHAR}
|
|
|
+ id=#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectAllBySuperId" parameterType="String" resultType="com.goafanti.permission.bo.PermissionBo">
|
|
|
select
|
|
|
@@ -278,7 +277,7 @@
|
|
|
where
|
|
|
name=#{name,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectIdByNameCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from permission
|
|
|
@@ -290,7 +289,7 @@
|
|
|
count(0)
|
|
|
from role_permission
|
|
|
where
|
|
|
- pid=#{id,jdbcType=VARCHAR}
|
|
|
+ pid=#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectNavList" parameterType="java.lang.String" resultType="com.goafanti.permission.bo.Navigation">
|
|
|
<choose>
|
|
|
@@ -302,7 +301,7 @@
|
|
|
url
|
|
|
from
|
|
|
permission
|
|
|
- where type = 0
|
|
|
+ where type = 0
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
select
|
|
|
@@ -334,7 +333,7 @@
|
|
|
super_id = #{superId,jdbcType=VARCHAR}
|
|
|
and (type = 1 or type = 2)
|
|
|
</when>
|
|
|
- <otherwise>
|
|
|
+ <otherwise>
|
|
|
select
|
|
|
d.id,
|
|
|
d.name,
|
|
|
@@ -356,4 +355,4 @@
|
|
|
<select id="selectTopNavBySubUrl" resultType="java.lang.String" parameterType="java.lang.String">
|
|
|
select super_id from permission where id = (select super_id from permission where url = #{subUrl,jdbcType=VARCHAR})
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|