<?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.boco.nbd.wios.manage.mapper.def.RoleMapper" > <resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Role" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> <id column="id" property="id" jdbcType="INTEGER" /> <result column="name" property="name" jdbcType="VARCHAR" /> <result column="remark" property="remark" jdbcType="VARCHAR" /> <result column="status" property="status" jdbcType="INTEGER" /> <result column="parent_id" property="parentId" jdbcType="INTEGER" /> <result column="create_account_id" property="createAccountId" jdbcType="INTEGER" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> </resultMap> <sql id="Example_Where_Clause" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> <where > <foreach collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> id, name, remark, status,parent_id, create_account_id, create_time </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleCriteria" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> select <if test="distinct" > distinct </if> <include refid="Base_Column_List" /> from wb_role <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null" > order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> select <include refid="Base_Column_List" /> from wb_role where id = #{id,jdbcType=INTEGER} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> delete from wb_role where id = #{id,jdbcType=INTEGER} </delete> <delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleCriteria" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> delete from wb_role <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" useGeneratedKeys="true" keyProperty="id"> <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> insert into wb_role (id, name, remark, status,parent_id, create_account_id, create_time ) values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},#{parentId,jdbcType=INTEGER}, #{createAccountId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP} ) </insert> <insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" useGeneratedKeys="true" keyProperty="id"> <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> insert into wb_role <trim prefix="(" suffix=")" suffixOverrides="," > <if test="id != null" > id, </if> <if test="name != null" > name, </if> <if test="remark != null" > remark, </if> <if test="status != null" > status, </if> <if test="parentId != null" > parent_id, </if> <if test="createAccountId != null" > create_account_id, </if> <if test="createTime != null" > create_time, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="id != null" > #{id,jdbcType=INTEGER}, </if> <if test="name != null" > #{name,jdbcType=VARCHAR}, </if> <if test="remark != null" > #{remark,jdbcType=VARCHAR}, </if> <if test="status != null" > #{status,jdbcType=INTEGER}, </if> <if test="parentId != null" > #{parentId,jdbcType=INTEGER}, </if> <if test="createAccountId != null" > #{createAccountId,jdbcType=INTEGER}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> </trim> </insert> <select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleCriteria" resultType="java.lang.Integer" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> select count(*) from wb_role <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> update wb_role <set > <if test="record.id != null" > id = #{record.id,jdbcType=INTEGER}, </if> <if test="record.name != null" > name = #{record.name,jdbcType=VARCHAR}, </if> <if test="record.remark != null" > remark = #{record.remark,jdbcType=VARCHAR}, </if> <if test="record.status != null" > status = #{record.status,jdbcType=INTEGER}, </if> <if test="record.parentId != null" > parent_id = #{record.parentId,jdbcType=INTEGER}, </if> <if test="record.createAccountId != null" > create_account_id = #{record.createAccountId,jdbcType=INTEGER}, </if> <if test="record.createTime != null" > create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> update wb_role set id = #{record.id,jdbcType=INTEGER}, name = #{record.name,jdbcType=VARCHAR}, remark = #{record.remark,jdbcType=VARCHAR}, status = #{record.status,jdbcType=INTEGER}, parent_id = #{record.parentId,jdbcType=INTEGER}, create_account_id = #{record.createAccountId,jdbcType=INTEGER}, create_time = #{record.createTime,jdbcType=TIMESTAMP} <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> update wb_role <set > <if test="name != null" > name = #{name,jdbcType=VARCHAR}, </if> <if test="remark != null" > remark = #{remark,jdbcType=VARCHAR}, </if> <if test="status != null" > status = #{status,jdbcType=INTEGER}, </if> <if test="parentId != null" > parent_id = #{parentId,jdbcType=INTEGER}, </if> <if test="createAccountId != null" > create_account_id = #{createAccountId,jdbcType=INTEGER}, </if> <if test="createTime != null" > create_time = #{createTime,jdbcType=TIMESTAMP}, </if> </set> where id = #{id,jdbcType=INTEGER} </update> <update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" > <!-- WARNING - @mbggenerated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Mon May 18 17:08:33 CST 2020. --> update wb_role set name = #{name,jdbcType=VARCHAR}, remark = #{remark,jdbcType=VARCHAR}, status = #{status,jdbcType=INTEGER}, parent_id = #{parentId,jdbcType=INTEGER}, create_account_id = #{createAccountId,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=INTEGER} </update> </mapper>