|
|
<?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.tianbo.warehouse.dao.DataPermissionDao">
|
|
|
<resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.DataPermission">
|
|
|
<id column="data_perm_id" jdbcType="INTEGER" property="data_perm_id" />
|
|
|
<result column="perm_name" jdbcType="VARCHAR" property="perm_name" />
|
|
|
<result column="perm_des" jdbcType="VARCHAR" property="perm_des" />
|
|
|
<result column="perm_sort" jdbcType="TINYINT" property="perm_sort" />
|
|
|
<result column="perm_status" jdbcType="BOOLEAN" property="perm_status" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="create_time" />
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="update_time" />
|
|
|
<result column="create_user" jdbcType="VARCHAR" property="create_user" />
|
|
|
<result column="row_condition" jdbcType="VARCHAR" property="row_condition" />
|
|
|
<result column="row_condition_property" jdbcType="VARCHAR" property="row_condition_property" />
|
|
|
<result column="cols_list" jdbcType="VARCHAR" property="cols_list" />
|
|
|
<result column="permission_id" jdbcType="INTEGER" property="permission_id" />
|
|
|
<result column="path" jdbcType="VARCHAR" property="path" />
|
|
|
<result column="interface_name" jdbcType="VARCHAR" property="interface_name" />
|
|
|
<result column="service_name" jdbcType="VARCHAR" property="service_name" />
|
|
|
<result column="service_name_des" jdbcType="VARCHAR" property="service_name_des" />
|
|
|
<result column="perm_keyword" jdbcType="VARCHAR" property="perm_keyword" />
|
|
|
<result column="perm_type" jdbcType="VARCHAR" property="perm_type" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
data_perm_id, perm_name, perm_des, perm_sort, perm_status, create_time, update_time,
|
|
|
create_user, row_condition, row_condition_property, cols_list, permission_id, `path`,
|
|
|
interface_name, service_name, service_name_des, perm_keyword, perm_type
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from data_permission
|
|
|
where data_perm_id = #{data_perm_id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from data_permission
|
|
|
where data_perm_id = #{data_perm_id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="data_perm_id" keyProperty="data_perm_id" parameterType="com.tianbo.warehouse.model.DataPermission" useGeneratedKeys="true">
|
|
|
insert into data_permission (perm_name, perm_des, perm_sort,
|
|
|
perm_status, create_time, update_time,
|
|
|
create_user, row_condition, row_condition_property,
|
|
|
cols_list, permission_id, `path`,
|
|
|
interface_name, service_name, service_name_des,
|
|
|
perm_keyword, perm_type)
|
|
|
values (#{perm_name,jdbcType=VARCHAR}, #{perm_des,jdbcType=VARCHAR}, #{perm_sort,jdbcType=TINYINT},
|
|
|
#{perm_status,jdbcType=BOOLEAN}, #{create_time,jdbcType=TIMESTAMP}, #{update_time,jdbcType=TIMESTAMP},
|
|
|
#{create_user,jdbcType=VARCHAR}, #{row_condition,jdbcType=VARCHAR}, #{row_condition_property,jdbcType=VARCHAR},
|
|
|
#{cols_list,jdbcType=VARCHAR}, #{permission_id,jdbcType=INTEGER}, #{path,jdbcType=VARCHAR},
|
|
|
#{interface_name,jdbcType=VARCHAR}, #{service_name,jdbcType=VARCHAR}, #{service_name_des,jdbcType=VARCHAR},
|
|
|
#{perm_keyword,jdbcType=VARCHAR}, #{perm_type,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="data_perm_id" keyProperty="data_perm_id" parameterType="com.tianbo.warehouse.model.DataPermission" useGeneratedKeys="true">
|
|
|
insert into data_permission
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="perm_name != null">
|
|
|
perm_name,
|
|
|
</if>
|
|
|
<if test="perm_des != null">
|
|
|
perm_des,
|
|
|
</if>
|
|
|
<if test="perm_sort != null">
|
|
|
perm_sort,
|
|
|
</if>
|
|
|
<if test="perm_status != null">
|
|
|
perm_status,
|
|
|
</if>
|
|
|
<if test="create_time != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
<if test="update_time != null">
|
|
|
update_time,
|
|
|
</if>
|
|
|
<if test="create_user != null">
|
|
|
create_user,
|
|
|
</if>
|
|
|
<if test="row_condition != null">
|
|
|
row_condition,
|
|
|
</if>
|
|
|
<if test="row_condition_property != null">
|
|
|
row_condition_property,
|
|
|
</if>
|
|
|
<if test="cols_list != null">
|
|
|
cols_list,
|
|
|
</if>
|
|
|
<if test="permission_id != null">
|
|
|
permission_id,
|
|
|
</if>
|
|
|
<if test="path != null">
|
|
|
`path`,
|
|
|
</if>
|
|
|
<if test="interface_name != null">
|
|
|
interface_name,
|
|
|
</if>
|
|
|
<if test="service_name != null">
|
|
|
service_name,
|
|
|
</if>
|
|
|
<if test="service_name_des != null">
|
|
|
service_name_des,
|
|
|
</if>
|
|
|
<if test="perm_keyword != null">
|
|
|
perm_keyword,
|
|
|
</if>
|
|
|
<if test="perm_type != null">
|
|
|
perm_type,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="perm_name != null">
|
|
|
#{perm_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_des != null">
|
|
|
#{perm_des,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_sort != null">
|
|
|
#{perm_sort,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="perm_status != null">
|
|
|
#{perm_status,jdbcType=BOOLEAN},
|
|
|
</if>
|
|
|
<if test="create_time != null">
|
|
|
#{create_time,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="update_time != null">
|
|
|
#{update_time,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="create_user != null">
|
|
|
#{create_user,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="row_condition != null">
|
|
|
#{row_condition,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="row_condition_property != null">
|
|
|
#{row_condition_property,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="cols_list != null">
|
|
|
#{cols_list,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="permission_id != null">
|
|
|
#{permission_id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="path != null">
|
|
|
#{path,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="interface_name != null">
|
|
|
#{interface_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="service_name != null">
|
|
|
#{service_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="service_name_des != null">
|
|
|
#{service_name_des,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_keyword != null">
|
|
|
#{perm_keyword,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_type != null">
|
|
|
#{perm_type,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.DataPermission">
|
|
|
update data_permission
|
|
|
<set>
|
|
|
<if test="perm_name != null">
|
|
|
perm_name = #{perm_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_des != null">
|
|
|
perm_des = #{perm_des,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_sort != null">
|
|
|
perm_sort = #{perm_sort,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="perm_status != null">
|
|
|
perm_status = #{perm_status,jdbcType=BOOLEAN},
|
|
|
</if>
|
|
|
<if test="create_time != null">
|
|
|
create_time = #{create_time,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="update_time != null">
|
|
|
update_time = #{update_time,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
<if test="create_user != null">
|
|
|
create_user = #{create_user,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="row_condition != null">
|
|
|
row_condition = #{row_condition,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="row_condition_property != null">
|
|
|
row_condition_property = #{row_condition_property,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="cols_list != null">
|
|
|
cols_list = #{cols_list,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="permission_id != null">
|
|
|
permission_id = #{permission_id,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="path != null">
|
|
|
`path` = #{path,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="interface_name != null">
|
|
|
interface_name = #{interface_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="service_name != null">
|
|
|
service_name = #{service_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="service_name_des != null">
|
|
|
service_name_des = #{service_name_des,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_keyword != null">
|
|
|
perm_keyword = #{perm_keyword,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="perm_type != null">
|
|
|
perm_type = #{perm_type,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where data_perm_id = #{data_perm_id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.DataPermission">
|
|
|
update data_permission
|
|
|
set perm_name = #{perm_name,jdbcType=VARCHAR},
|
|
|
perm_des = #{perm_des,jdbcType=VARCHAR},
|
|
|
perm_sort = #{perm_sort,jdbcType=TINYINT},
|
|
|
perm_status = #{perm_status,jdbcType=BOOLEAN},
|
|
|
create_time = #{create_time,jdbcType=TIMESTAMP},
|
|
|
update_time = #{update_time,jdbcType=TIMESTAMP},
|
|
|
create_user = #{create_user,jdbcType=VARCHAR},
|
|
|
row_condition = #{row_condition,jdbcType=VARCHAR},
|
|
|
row_condition_property = #{row_condition_property,jdbcType=VARCHAR},
|
|
|
cols_list = #{cols_list,jdbcType=VARCHAR},
|
|
|
permission_id = #{permission_id,jdbcType=INTEGER},
|
|
|
`path` = #{path,jdbcType=VARCHAR},
|
|
|
interface_name = #{interface_name,jdbcType=VARCHAR},
|
|
|
service_name = #{service_name,jdbcType=VARCHAR},
|
|
|
service_name_des = #{service_name_des,jdbcType=VARCHAR},
|
|
|
perm_keyword = #{perm_keyword,jdbcType=VARCHAR},
|
|
|
perm_type = #{perm_type,jdbcType=VARCHAR}
|
|
|
where data_perm_id = #{data_perm_id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|