Commit 18d4fa1c by naan1993

修改role的表名

parent 20145822
...@@ -2,6 +2,7 @@ package com.stylefeng.guns.common.persistence.model; ...@@ -2,6 +2,7 @@ package com.stylefeng.guns.common.persistence.model;
import com.baomidou.mybatisplus.activerecord.Model; import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.enums.IdType;
import java.io.Serializable; import java.io.Serializable;
...@@ -14,6 +15,7 @@ import java.io.Serializable; ...@@ -14,6 +15,7 @@ import java.io.Serializable;
* @author stylefeng * @author stylefeng
* @since 2017-07-11 * @since 2017-07-11
*/ */
@TableName("sys_role")
public class Role extends Model<Role> { public class Role extends Model<Role> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<select id="selectRoles" resultType="map"> <select id="selectRoles" resultType="map">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from role from sys_role
<if test="condition != null"> <if test="condition != null">
where name like CONCAT('%',#{condition},'%') where name like CONCAT('%',#{condition},'%')
</if> </if>
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<select id="roleTreeList" resultType="com.stylefeng.guns.core.node.ZTreeNode"> <select id="roleTreeList" resultType="com.stylefeng.guns.core.node.ZTreeNode">
select id "id",pId select id "id",pId
"pId",name as "name",(case when (pId=0 or pId is null) then 'true' "pId",name as "name",(case when (pId=0 or pId is null) then 'true'
else 'false' end) "open" from role else 'false' end) "open" from sys_role
</select> </select>
<select id="roleTreeListByRoleId" resultType="com.stylefeng.guns.core.node.ZTreeNode"> <select id="roleTreeListByRoleId" resultType="com.stylefeng.guns.core.node.ZTreeNode">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment