SysOpMapper.xml 12.8 KB
<?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.zteits.sys.mapper.SysOpMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.sys.domain.SysOp" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="login_code" property="loginCode" jdbcType="VARCHAR" />
    <result column="login_password" property="loginPassword" jdbcType="VARCHAR" />
    <result column="op_code" property="opCode" jdbcType="VARCHAR" />
    <result column="op_name" property="opName" jdbcType="VARCHAR" />
    <result column="sex" property="sex" jdbcType="INTEGER" />
    <result column="age" property="age" jdbcType="INTEGER" />
    <result column="img_path" property="imgPath" jdbcType="VARCHAR" />
    <result column="contact_address" property="contactAddress" jdbcType="VARCHAR" />
    <result column="telephone" property="telephone" jdbcType="VARCHAR" />
    <result column="card_type_id" property="cardTypeId" jdbcType="INTEGER" />
    <result column="card_no" property="cardNo" jdbcType="VARCHAR" />
    <result column="email" property="email" jdbcType="VARCHAR" />
    <result column="try_times" property="tryTimes" jdbcType="INTEGER" />
    <result column="acct_start_date" property="acctStartDate" jdbcType="TIMESTAMP" />
    <result column="acct_end_date" property="acctEndDate" jdbcType="TIMESTAMP" />
    <result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP" />
    <result column="email_switch" property="emailSwitch" jdbcType="INTEGER" />
    <result column="sms_switch" property="smsSwitch" jdbcType="INTEGER" />
    <result column="sys_code" property="sysCode" jdbcType="VARCHAR" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="create_empid" property="createEmpid" jdbcType="VARCHAR" />
    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
    <result column="modfiy_empid" property="modfiyEmpid" jdbcType="VARCHAR" />
    <result column="modfiy_date" property="modfiyDate" jdbcType="TIMESTAMP" />
    <result column="remark" property="remark" jdbcType="VARCHAR" />
    <result column="org_id" property="orgId" jdbcType="BIGINT" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, login_code, login_password, op_code, op_name, sex, age, img_path, contact_address, 
    telephone, card_type_id, card_no, email, try_times, acct_start_date, acct_end_date, 
    last_login_time, email_switch, sms_switch, sys_code, data_state, create_empid, create_date, 
    modfiy_empid, modfiy_date, remark, org_id
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from sys_op
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from sys_op
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.sys.domain.SysOp" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into sys_op (login_code, login_password, op_code, 
      op_name, sex, age, img_path, 
      contact_address, telephone, card_type_id, 
      card_no, email, try_times, 
      acct_start_date, acct_end_date, last_login_time, 
      email_switch, sms_switch, sys_code, 
      data_state, create_empid, create_date, 
      modfiy_empid, modfiy_date, remark, 
      org_id)
    values (#{loginCode,jdbcType=VARCHAR}, #{loginPassword,jdbcType=VARCHAR}, #{opCode,jdbcType=VARCHAR}, 
      #{opName,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{imgPath,jdbcType=VARCHAR}, 
      #{contactAddress,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, #{cardTypeId,jdbcType=INTEGER}, 
      #{cardNo,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{tryTimes,jdbcType=INTEGER}, 
      #{acctStartDate,jdbcType=TIMESTAMP}, #{acctEndDate,jdbcType=TIMESTAMP}, #{lastLoginTime,jdbcType=TIMESTAMP}, 
      #{emailSwitch,jdbcType=INTEGER}, #{smsSwitch,jdbcType=INTEGER}, #{sysCode,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, 
      #{orgId,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.sys.domain.SysOp" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into sys_op
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="loginCode != null" >
        login_code,
      </if>
      <if test="loginPassword != null" >
        login_password,
      </if>
      <if test="opCode != null" >
        op_code,
      </if>
      <if test="opName != null" >
        op_name,
      </if>
      <if test="sex != null" >
        sex,
      </if>
      <if test="age != null" >
        age,
      </if>
      <if test="imgPath != null" >
        img_path,
      </if>
      <if test="contactAddress != null" >
        contact_address,
      </if>
      <if test="telephone != null" >
        telephone,
      </if>
      <if test="cardTypeId != null" >
        card_type_id,
      </if>
      <if test="cardNo != null" >
        card_no,
      </if>
      <if test="email != null" >
        email,
      </if>
      <if test="tryTimes != null" >
        try_times,
      </if>
      <if test="acctStartDate != null" >
        acct_start_date,
      </if>
      <if test="acctEndDate != null" >
        acct_end_date,
      </if>
      <if test="lastLoginTime != null" >
        last_login_time,
      </if>
      <if test="emailSwitch != null" >
        email_switch,
      </if>
      <if test="smsSwitch != null" >
        sms_switch,
      </if>
      <if test="sysCode != null" >
        sys_code,
      </if>
      <if test="dataState != null" >
        data_state,
      </if>
      <if test="createEmpid != null" >
        create_empid,
      </if>
      <if test="createDate != null" >
        create_date,
      </if>
      <if test="modfiyEmpid != null" >
        modfiy_empid,
      </if>
      <if test="modfiyDate != null" >
        modfiy_date,
      </if>
      <if test="remark != null" >
        remark,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="loginCode != null" >
        #{loginCode,jdbcType=VARCHAR},
      </if>
      <if test="loginPassword != null" >
        #{loginPassword,jdbcType=VARCHAR},
      </if>
      <if test="opCode != null" >
        #{opCode,jdbcType=VARCHAR},
      </if>
      <if test="opName != null" >
        #{opName,jdbcType=VARCHAR},
      </if>
      <if test="sex != null" >
        #{sex,jdbcType=INTEGER},
      </if>
      <if test="age != null" >
        #{age,jdbcType=INTEGER},
      </if>
      <if test="imgPath != null" >
        #{imgPath,jdbcType=VARCHAR},
      </if>
      <if test="contactAddress != null" >
        #{contactAddress,jdbcType=VARCHAR},
      </if>
      <if test="telephone != null" >
        #{telephone,jdbcType=VARCHAR},
      </if>
      <if test="cardTypeId != null" >
        #{cardTypeId,jdbcType=INTEGER},
      </if>
      <if test="cardNo != null" >
        #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="email != null" >
        #{email,jdbcType=VARCHAR},
      </if>
      <if test="tryTimes != null" >
        #{tryTimes,jdbcType=INTEGER},
      </if>
      <if test="acctStartDate != null" >
        #{acctStartDate,jdbcType=TIMESTAMP},
      </if>
      <if test="acctEndDate != null" >
        #{acctEndDate,jdbcType=TIMESTAMP},
      </if>
      <if test="lastLoginTime != null" >
        #{lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="emailSwitch != null" >
        #{emailSwitch,jdbcType=INTEGER},
      </if>
      <if test="smsSwitch != null" >
        #{smsSwitch,jdbcType=INTEGER},
      </if>
      <if test="sysCode != null" >
        #{sysCode,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null" >
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null" >
        #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.sys.domain.SysOp" >
    update sys_op
    <set >
      <if test="loginCode != null" >
        login_code = #{loginCode,jdbcType=VARCHAR},
      </if>
      <if test="loginPassword != null" >
        login_password = #{loginPassword,jdbcType=VARCHAR},
      </if>
      <if test="opCode != null" >
        op_code = #{opCode,jdbcType=VARCHAR},
      </if>
      <if test="opName != null" >
        op_name = #{opName,jdbcType=VARCHAR},
      </if>
      <if test="sex != null" >
        sex = #{sex,jdbcType=INTEGER},
      </if>
      <if test="age != null" >
        age = #{age,jdbcType=INTEGER},
      </if>
      <if test="imgPath != null" >
        img_path = #{imgPath,jdbcType=VARCHAR},
      </if>
      <if test="contactAddress != null" >
        contact_address = #{contactAddress,jdbcType=VARCHAR},
      </if>
      <if test="telephone != null" >
        telephone = #{telephone,jdbcType=VARCHAR},
      </if>
      <if test="cardTypeId != null" >
        card_type_id = #{cardTypeId,jdbcType=INTEGER},
      </if>
      <if test="cardNo != null" >
        card_no = #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="email != null" >
        email = #{email,jdbcType=VARCHAR},
      </if>
      <if test="tryTimes != null" >
        try_times = #{tryTimes,jdbcType=INTEGER},
      </if>
      <if test="acctStartDate != null" >
        acct_start_date = #{acctStartDate,jdbcType=TIMESTAMP},
      </if>
      <if test="acctEndDate != null" >
        acct_end_date = #{acctEndDate,jdbcType=TIMESTAMP},
      </if>
      <if test="lastLoginTime != null" >
        last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="emailSwitch != null" >
        email_switch = #{emailSwitch,jdbcType=INTEGER},
      </if>
      <if test="smsSwitch != null" >
        sms_switch = #{smsSwitch,jdbcType=INTEGER},
      </if>
      <if test="sysCode != null" >
        sys_code = #{sysCode,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null" >
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        create_empid = #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null" >
        modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.sys.domain.SysOp" >
    update sys_op
    set login_code = #{loginCode,jdbcType=VARCHAR},
      login_password = #{loginPassword,jdbcType=VARCHAR},
      op_code = #{opCode,jdbcType=VARCHAR},
      op_name = #{opName,jdbcType=VARCHAR},
      sex = #{sex,jdbcType=INTEGER},
      age = #{age,jdbcType=INTEGER},
      img_path = #{imgPath,jdbcType=VARCHAR},
      contact_address = #{contactAddress,jdbcType=VARCHAR},
      telephone = #{telephone,jdbcType=VARCHAR},
      card_type_id = #{cardTypeId,jdbcType=INTEGER},
      card_no = #{cardNo,jdbcType=VARCHAR},
      email = #{email,jdbcType=VARCHAR},
      try_times = #{tryTimes,jdbcType=INTEGER},
      acct_start_date = #{acctStartDate,jdbcType=TIMESTAMP},
      acct_end_date = #{acctEndDate,jdbcType=TIMESTAMP},
      last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
      email_switch = #{emailSwitch,jdbcType=INTEGER},
      sms_switch = #{smsSwitch,jdbcType=INTEGER},
      sys_code = #{sysCode,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>