|
@@ -0,0 +1,75 @@
|
|
|
+<?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.css.simulation.resource.system.mapper.RoleMapper" >
|
|
|
+
|
|
|
+ <select id="getRolePageList" parameterType="api.common.pojo.param.system.RoleParam" resultType="api.common.pojo.vo.system.RoleVO">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ role_name,
|
|
|
+ role_code,
|
|
|
+ description,
|
|
|
+ visible,
|
|
|
+ sort
|
|
|
+ FROM system_role
|
|
|
+ WHERE is_deleted = '0'
|
|
|
+ <if test="roleName != null and roleName != ''">
|
|
|
+ and c.role_name like CONCAT('%',#{roleName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="roleCode != null and roleCode != ''">
|
|
|
+ and c.role_code like CONCAT('%',#{roleCode,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="visible != null and visible != ''">
|
|
|
+ and c.visible = #{roleName,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ ORDER BY sort
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="api.common.pojo.po.system.RolePO">
|
|
|
+ INSERT INTO system_role(
|
|
|
+ id,
|
|
|
+ role_name,
|
|
|
+ role_code,
|
|
|
+ description,
|
|
|
+ visible,
|
|
|
+ sort,
|
|
|
+ create_time,
|
|
|
+ modify_time,
|
|
|
+ create_user_id,
|
|
|
+ modify_user_id,
|
|
|
+ is_deleted
|
|
|
+ )
|
|
|
+ VALUES(
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ #{roleName,jdbcType=VARCHAR},
|
|
|
+ #{roleCode,jdbcType=VARCHAR},
|
|
|
+ #{description,jdbcType=VARCHAR},
|
|
|
+ #{visible,jdbcType=VARCHAR},
|
|
|
+ #{sort,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
+ #{createUserId,jdbcType=VARCHAR},
|
|
|
+ #{modifyUserId,jdbcType=VARCHAR},
|
|
|
+ #{isDeleted,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="update" parameterType="api.common.pojo.po.system.RolePO">
|
|
|
+ update system_role set
|
|
|
+ role_name = #{roleName,jdbcType=VARCHAR},
|
|
|
+ role_code = #{roleCode,jdbcType=VARCHAR},
|
|
|
+ description = #{description,jdbcType=VARCHAR},
|
|
|
+ visible = #{visible,jdbcType=VARCHAR},
|
|
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
|
+ modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
+ modify_user_id = #{modifyUserId,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="delRoleById" parameterType="api.common.pojo.po.system.RolePO">
|
|
|
+ update system_role set
|
|
|
+ modify_time = #{modifyTime,jdbcType=TIMESTAMP},
|
|
|
+ modify_user_id = #{modifyUserId,jdbcType=VARCHAR},
|
|
|
+ is_deleted = #{isDeleted,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+</mapper>
|