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

mapper.HfsecUserMapper.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.HfsecUserMapper" >
  <resultMap id="BaseResultMap" type="com.hframe.domain.model.HfsecUser" >
    <constructor >
      <idArg column="hfsec_user_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="hfsec_user_name" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="account" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="PASSWORD" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="gender" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="mobile" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="email" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="addr" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <arg column="avatar" jdbcType="VARCHAR" javaType="java.lang.String" />
      <arg column="last_login_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
      <arg column="hfsec_organize_id" jdbcType="BIGINT" javaType="java.lang.Long" />
      <arg column="STATUS" jdbcType="INTEGER" javaType="java.lang.Integer" />
      <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="del_flag" jdbcType="INTEGER" javaType="java.lang.Integer" />
    </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_id, hfsec_user_name, account, PASSWORD, gender, mobile, email, addr, avatar, 
    last_login_time, hfsec_organize_id, STATUS, creator_id, create_time, modifier_id, 
    modify_time, del_flag
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hframe.domain.model.HfsecUser_Example" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from hfsec_user
    <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
    where hfsec_user_id = #{hfsecUserId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from hfsec_user
    where hfsec_user_id = #{hfsecUserId,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.hframe.domain.model.HfsecUser_Example" >
    delete from hfsec_user
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.hframe.domain.model.HfsecUser" >
    <selectKey resultType="java.lang.Long" keyProperty="hfsecUserId" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into hfsec_user (hfsec_user_name, account, PASSWORD, 
      gender, mobile, email, 
      addr, avatar, last_login_time, 
      hfsec_organize_id, STATUS, creator_id, 
      create_time, modifier_id, modify_time, 
      del_flag)
    values (#{hfsecUserName,jdbcType=VARCHAR}, #{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
      #{gender,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=INTEGER}, 
      #{addr,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP}, 
      #{hfsecOrganizeId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{creatorId,jdbcType=BIGINT}, 
      #{createTime,jdbcType=TIMESTAMP}, #{modifierId,jdbcType=BIGINT}, #{modifyTime,jdbcType=TIMESTAMP}, 
      #{delFlag,jdbcType=INTEGER})
  </insert>
  <insert id="insertSelective" parameterType="com.hframe.domain.model.HfsecUser" >
    <selectKey resultType="java.lang.Long" keyProperty="hfsecUserId" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into hfsec_user
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="hfsecUserName != null" >
        hfsec_user_name,
      </if>
      <if test="account != null" >
        account,
      </if>
      <if test="password != null" >
        PASSWORD,
      </if>
      <if test="gender != null" >
        gender,
      </if>
      <if test="mobile != null" >
        mobile,
      </if>
      <if test="email != null" >
        email,
      </if>
      <if test="addr != null" >
        addr,
      </if>
      <if test="avatar != null" >
        avatar,
      </if>
      <if test="lastLoginTime != null" >
        last_login_time,
      </if>
      <if test="hfsecOrganizeId != null" >
        hfsec_organize_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="delFlag != null" >
        del_flag,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="hfsecUserName != null" >
        #{hfsecUserName,jdbcType=VARCHAR},
      </if>
      <if test="account != null" >
        #{account,jdbcType=VARCHAR},
      </if>
      <if test="password != null" >
        #{password,jdbcType=VARCHAR},
      </if>
      <if test="gender != null" >
        #{gender,jdbcType=INTEGER},
      </if>
      <if test="mobile != null" >
        #{mobile,jdbcType=VARCHAR},
      </if>
      <if test="email != null" >
        #{email,jdbcType=INTEGER},
      </if>
      <if test="addr != null" >
        #{addr,jdbcType=INTEGER},
      </if>
      <if test="avatar != null" >
        #{avatar,jdbcType=VARCHAR},
      </if>
      <if test="lastLoginTime != null" >
        #{lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="hfsecOrganizeId != null" >
        #{hfsecOrganizeId,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </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="delFlag != null" >
        #{delFlag,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.hframe.domain.model.HfsecUser_Example" resultType="java.lang.Integer" >
    select count(*) from hfsec_user
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update hfsec_user
    <set >
      <if test="record.hfsecUserId != null" >
        hfsec_user_id = #{record.hfsecUserId,jdbcType=BIGINT},
      </if>
      <if test="record.hfsecUserName != null" >
        hfsec_user_name = #{record.hfsecUserName,jdbcType=VARCHAR},
      </if>
      <if test="record.account != null" >
        account = #{record.account,jdbcType=VARCHAR},
      </if>
      <if test="record.password != null" >
        PASSWORD = #{record.password,jdbcType=VARCHAR},
      </if>
      <if test="record.gender != null" >
        gender = #{record.gender,jdbcType=INTEGER},
      </if>
      <if test="record.mobile != null" >
        mobile = #{record.mobile,jdbcType=VARCHAR},
      </if>
      <if test="record.email != null" >
        email = #{record.email,jdbcType=INTEGER},
      </if>
      <if test="record.addr != null" >
        addr = #{record.addr,jdbcType=INTEGER},
      </if>
      <if test="record.avatar != null" >
        avatar = #{record.avatar,jdbcType=VARCHAR},
      </if>
      <if test="record.lastLoginTime != null" >
        last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.hfsecOrganizeId != null" >
        hfsec_organize_id = #{record.hfsecOrganizeId,jdbcType=BIGINT},
      </if>
      <if test="record.status != null" >
        STATUS = #{record.status,jdbcType=INTEGER},
      </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.delFlag != null" >
        del_flag = #{record.delFlag,jdbcType=INTEGER},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update hfsec_user
    set hfsec_user_id = #{record.hfsecUserId,jdbcType=BIGINT},
      hfsec_user_name = #{record.hfsecUserName,jdbcType=VARCHAR},
      account = #{record.account,jdbcType=VARCHAR},
      PASSWORD = #{record.password,jdbcType=VARCHAR},
      gender = #{record.gender,jdbcType=INTEGER},
      mobile = #{record.mobile,jdbcType=VARCHAR},
      email = #{record.email,jdbcType=INTEGER},
      addr = #{record.addr,jdbcType=INTEGER},
      avatar = #{record.avatar,jdbcType=VARCHAR},
      last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
      hfsec_organize_id = #{record.hfsecOrganizeId,jdbcType=BIGINT},
      STATUS = #{record.status,jdbcType=INTEGER},
      creator_id = #{record.creatorId,jdbcType=BIGINT},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      modifier_id = #{record.modifierId,jdbcType=BIGINT},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
      del_flag = #{record.delFlag,jdbcType=INTEGER}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.hframe.domain.model.HfsecUser" >
    update hfsec_user
    <set >
      <if test="hfsecUserName != null" >
        hfsec_user_name = #{hfsecUserName,jdbcType=VARCHAR},
      </if>
      <if test="account != null" >
        account = #{account,jdbcType=VARCHAR},
      </if>
      <if test="password != null" >
        PASSWORD = #{password,jdbcType=VARCHAR},
      </if>
      <if test="gender != null" >
        gender = #{gender,jdbcType=INTEGER},
      </if>
      <if test="mobile != null" >
        mobile = #{mobile,jdbcType=VARCHAR},
      </if>
      <if test="email != null" >
        email = #{email,jdbcType=INTEGER},
      </if>
      <if test="addr != null" >
        addr = #{addr,jdbcType=INTEGER},
      </if>
      <if test="avatar != null" >
        avatar = #{avatar,jdbcType=VARCHAR},
      </if>
      <if test="lastLoginTime != null" >
        last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="hfsecOrganizeId != null" >
        hfsec_organize_id = #{hfsecOrganizeId,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        STATUS = #{status,jdbcType=INTEGER},
      </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="delFlag != null" >
        del_flag = #{delFlag,jdbcType=INTEGER},
      </if>
    </set>
    where hfsec_user_id = #{hfsecUserId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.hframe.domain.model.HfsecUser" >
    update hfsec_user
    set hfsec_user_name = #{hfsecUserName,jdbcType=VARCHAR},
      account = #{account,jdbcType=VARCHAR},
      PASSWORD = #{password,jdbcType=VARCHAR},
      gender = #{gender,jdbcType=INTEGER},
      mobile = #{mobile,jdbcType=VARCHAR},
      email = #{email,jdbcType=INTEGER},
      addr = #{addr,jdbcType=INTEGER},
      avatar = #{avatar,jdbcType=VARCHAR},
      last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
      hfsec_organize_id = #{hfsecOrganizeId,jdbcType=BIGINT},
      STATUS = #{status,jdbcType=INTEGER},
      creator_id = #{creatorId,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modifier_id = #{modifierId,jdbcType=BIGINT},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      del_flag = #{delFlag,jdbcType=INTEGER}
    where hfsec_user_id = #{hfsecUserId,jdbcType=BIGINT}
  </update>
</mapper>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy