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

mapper.HfsecUserAuthorizeMapper.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.HfsecUserAuthorizeMapper" >
  <resultMap id="BaseResultMap" type="com.hframe.domain.model.HfsecUserAuthorize" >
    <constructor >
      <idArg column="hfsec_user_authorize_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="hfsec_user_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="hfsec_organize_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="hfsec_role_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" />
    </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_user_authorize_id, hfsec_user_id, hfsec_organize_id, hfsec_role_id, status, 
    creator_id, create_time, modifier_id, modify_time
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hframe.domain.model.HfsecUserAuthorize_Example" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from hfsec_user_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_user_authorize
    where hfsec_user_authorize_id = #{hfsecUserAuthorizeId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from hfsec_user_authorize
    where hfsec_user_authorize_id = #{hfsecUserAuthorizeId,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.hframe.domain.model.HfsecUserAuthorize_Example" >
    delete from hfsec_user_authorize
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.hframe.domain.model.HfsecUserAuthorize" >
    <selectKey resultType="java.lang.Long" keyProperty="hfsecUserAuthorizeId" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into hfsec_user_authorize (hfsec_user_id, hfsec_organize_id, hfsec_role_id, 
      status, creator_id, create_time, 
      modifier_id, modify_time)
    values (#{hfsecUserId,jdbcType=BIGINT}, #{hfsecOrganizeId,jdbcType=BIGINT}, #{hfsecRoleId,jdbcType=BIGINT}, 
      #{status,jdbcType=TINYINT}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, 
      #{modifierId,jdbcType=BIGINT}, #{modifyTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.hframe.domain.model.HfsecUserAuthorize" >
    <selectKey resultType="java.lang.Long" keyProperty="hfsecUserAuthorizeId" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into hfsec_user_authorize
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="hfsecUserId != null" >
        hfsec_user_id,
      </if>
      <if test="hfsecOrganizeId != null" >
        hfsec_organize_id,
      </if>
      <if test="hfsecRoleId != null" >
        hfsec_role_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>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="hfsecUserId != null" >
        #{hfsecUserId,jdbcType=BIGINT},
      </if>
      <if test="hfsecOrganizeId != null" >
        #{hfsecOrganizeId,jdbcType=BIGINT},
      </if>
      <if test="hfsecRoleId != null" >
        #{hfsecRoleId,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>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.hframe.domain.model.HfsecUserAuthorize_Example" resultType="java.lang.Integer" >
    select count(*) from hfsec_user_authorize
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update hfsec_user_authorize
    <set >
      <if test="record.hfsecUserAuthorizeId != null" >
        hfsec_user_authorize_id = #{record.hfsecUserAuthorizeId,jdbcType=BIGINT},
      </if>
      <if test="record.hfsecUserId != null" >
        hfsec_user_id = #{record.hfsecUserId,jdbcType=BIGINT},
      </if>
      <if test="record.hfsecOrganizeId != null" >
        hfsec_organize_id = #{record.hfsecOrganizeId,jdbcType=BIGINT},
      </if>
      <if test="record.hfsecRoleId != null" >
        hfsec_role_id = #{record.hfsecRoleId,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>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update hfsec_user_authorize
    set hfsec_user_authorize_id = #{record.hfsecUserAuthorizeId,jdbcType=BIGINT},
      hfsec_user_id = #{record.hfsecUserId,jdbcType=BIGINT},
      hfsec_organize_id = #{record.hfsecOrganizeId,jdbcType=BIGINT},
      hfsec_role_id = #{record.hfsecRoleId,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}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.hframe.domain.model.HfsecUserAuthorize" >
    update hfsec_user_authorize
    <set >
      <if test="hfsecUserId != null" >
        hfsec_user_id = #{hfsecUserId,jdbcType=BIGINT},
      </if>
      <if test="hfsecOrganizeId != null" >
        hfsec_organize_id = #{hfsecOrganizeId,jdbcType=BIGINT},
      </if>
      <if test="hfsecRoleId != null" >
        hfsec_role_id = #{hfsecRoleId,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>
    </set>
    where hfsec_user_authorize_id = #{hfsecUserAuthorizeId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.hframe.domain.model.HfsecUserAuthorize" >
    update hfsec_user_authorize
    set hfsec_user_id = #{hfsecUserId,jdbcType=BIGINT},
      hfsec_organize_id = #{hfsecOrganizeId,jdbcType=BIGINT},
      hfsec_role_id = #{hfsecRoleId,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}
    where hfsec_user_authorize_id = #{hfsecUserAuthorizeId,jdbcType=BIGINT}
  </update>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy