All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mapper.HfsecRoleAuthorizeMapper.xml Maven / Gradle / Ivy

The newest version!
<?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.hframe.dao.HfsecRoleAuthorizeMapper" >
  <resultMap id="BaseResultMap" type="com.hframe.domain.model.HfsecRoleAuthorize" >
    <constructor >
      <idArg column="hfsec_role_authorize_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="hfsec_role_authorize_type" jdbcType="TINYINT" javaType="java.lang.Byte" />
      <arg column="hfsec_role_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="hfsec_menu_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="status" jdbcType="TINYINT" javaType="java.lang.Byte" />
      <arg column="creator_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="create_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
      <arg column="modifier_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="modify_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
      <arg column="operate_event_list" jdbcType="VARCHAR" javaType="java.lang.String" />
    </constructor>
  </resultMap>
  <sql id="Example_Where_Clause" >
    <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" >
    <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" >
    hfsec_role_authorize_id, hfsec_role_authorize_type, hfsec_role_id, hfsec_menu_id, 
    `status`, creator_id, create_time, modifier_id, modify_time, operate_event_list
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hframe.domain.model.HfsecRoleAuthorize_Example" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from `hfsec_role_authorize`
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
    <if test="limitEnd != null and limitEnd != 0" >
      limit #{limitStart} , #{limitEnd}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from `hfsec_role_authorize`
    where hfsec_role_authorize_id = #{hfsecRoleAuthorizeId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from `hfsec_role_authorize`
    where hfsec_role_authorize_id = #{hfsecRoleAuthorizeId,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.hframe.domain.model.HfsecRoleAuthorize_Example" >
    delete from `hfsec_role_authorize`
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.hframe.domain.model.HfsecRoleAuthorize" >
    <selectKey resultType="java.lang.Long" keyProperty="hfsecRoleAuthorizeId" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into `hfsec_role_authorize` (hfsec_role_authorize_type, hfsec_role_id, 
      hfsec_menu_id, `status`, creator_id, 
      create_time, modifier_id, modify_time, 
      operate_event_list)
    values (#{hfsecRoleAuthorizeType,jdbcType=TINYINT}, #{hfsecRoleId,jdbcType=BIGINT}, 
      #{hfsecMenuId,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{creatorId,jdbcType=BIGINT}, 
      #{createTime,jdbcType=TIMESTAMP}, #{modifierId,jdbcType=BIGINT}, #{modifyTime,jdbcType=TIMESTAMP}, 
      #{operateEventList,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.hframe.domain.model.HfsecRoleAuthorize" >
    <selectKey resultType="java.lang.Long" keyProperty="hfsecRoleAuthorizeId" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into `hfsec_role_authorize`
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="hfsecRoleAuthorizeType != null" >
        hfsec_role_authorize_type,
      </if>
      <if test="hfsecRoleId != null" >
        hfsec_role_id,
      </if>
      <if test="hfsecMenuId != null" >
        hfsec_menu_id,
      </if>
      <if test="status != null" >
        `status`,
      </if>
      <if test="creatorId != null" >
        creator_id,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="modifierId != null" >
        modifier_id,
      </if>
      <if test="modifyTime != null" >
        modify_time,
      </if>
      <if test="operateEventList != null" >
        operate_event_list,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="hfsecRoleAuthorizeType != null" >
        #{hfsecRoleAuthorizeType,jdbcType=TINYINT},
      </if>
      <if test="hfsecRoleId != null" >
        #{hfsecRoleId,jdbcType=BIGINT},
      </if>
      <if test="hfsecMenuId != null" >
        #{hfsecMenuId,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        #{status,jdbcType=TINYINT},
      </if>
      <if test="creatorId != null" >
        #{creatorId,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifierId != null" >
        #{modifierId,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null" >
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operateEventList != null" >
        #{operateEventList,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.hframe.domain.model.HfsecRoleAuthorize_Example" resultType="java.lang.Integer" >
    select count(*) from `hfsec_role_authorize`
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update `hfsec_role_authorize`
    <set >
      <if test="record.hfsecRoleAuthorizeId != null" >
        hfsec_role_authorize_id = #{record.hfsecRoleAuthorizeId,jdbcType=BIGINT},
      </if>
      <if test="record.hfsecRoleAuthorizeType != null" >
        hfsec_role_authorize_type = #{record.hfsecRoleAuthorizeType,jdbcType=TINYINT},
      </if>
      <if test="record.hfsecRoleId != null" >
        hfsec_role_id = #{record.hfsecRoleId,jdbcType=BIGINT},
      </if>
      <if test="record.hfsecMenuId != null" >
        hfsec_menu_id = #{record.hfsecMenuId,jdbcType=BIGINT},
      </if>
      <if test="record.status != null" >
        `status` = #{record.status,jdbcType=TINYINT},
      </if>
      <if test="record.creatorId != null" >
        creator_id = #{record.creatorId,jdbcType=BIGINT},
      </if>
      <if test="record.createTime != null" >
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifierId != null" >
        modifier_id = #{record.modifierId,jdbcType=BIGINT},
      </if>
      <if test="record.modifyTime != null" >
        modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.operateEventList != null" >
        operate_event_list = #{record.operateEventList,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update `hfsec_role_authorize`
    set hfsec_role_authorize_id = #{record.hfsecRoleAuthorizeId,jdbcType=BIGINT},
      hfsec_role_authorize_type = #{record.hfsecRoleAuthorizeType,jdbcType=TINYINT},
      hfsec_role_id = #{record.hfsecRoleId,jdbcType=BIGINT},
      hfsec_menu_id = #{record.hfsecMenuId,jdbcType=BIGINT},
      `status` = #{record.status,jdbcType=TINYINT},
      creator_id = #{record.creatorId,jdbcType=BIGINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      modifier_id = #{record.modifierId,jdbcType=BIGINT},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      operate_event_list = #{record.operateEventList,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.hframe.domain.model.HfsecRoleAuthorize" >
    update `hfsec_role_authorize`
    <set >
      <if test="hfsecRoleAuthorizeType != null" >
        hfsec_role_authorize_type = #{hfsecRoleAuthorizeType,jdbcType=TINYINT},
      </if>
      <if test="hfsecRoleId != null" >
        hfsec_role_id = #{hfsecRoleId,jdbcType=BIGINT},
      </if>
      <if test="hfsecMenuId != null" >
        hfsec_menu_id = #{hfsecMenuId,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        `status` = #{status,jdbcType=TINYINT},
      </if>
      <if test="creatorId != null" >
        creator_id = #{creatorId,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifierId != null" >
        modifier_id = #{modifierId,jdbcType=BIGINT},
      </if>
      <if test="modifyTime != null" >
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
      <if test="operateEventList != null" >
        operate_event_list = #{operateEventList,jdbcType=VARCHAR},
      </if>
    </set>
    where hfsec_role_authorize_id = #{hfsecRoleAuthorizeId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.hframe.domain.model.HfsecRoleAuthorize" >
    update `hfsec_role_authorize`
    set hfsec_role_authorize_type = #{hfsecRoleAuthorizeType,jdbcType=TINYINT},
      hfsec_role_id = #{hfsecRoleId,jdbcType=BIGINT},
      hfsec_menu_id = #{hfsecMenuId,jdbcType=BIGINT},
      `status` = #{status,jdbcType=TINYINT},
      creator_id = #{creatorId,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modifier_id = #{modifierId,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      operate_event_list = #{operateEventList,jdbcType=VARCHAR}
    where hfsec_role_authorize_id = #{hfsecRoleAuthorizeId,jdbcType=BIGINT}
  </update>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy