|  |  | <?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.tianbo.warehouse.dao.KakoUserMapper" > | 
|  |  | <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.KakoUser" > | 
|  |  | <id column="id" property="id" jdbcType="VARCHAR" /> | 
|  |  | <result column="company_id" property="companyId" jdbcType="VARCHAR" /> | 
|  |  | <result column="office_id" property="officeId" jdbcType="VARCHAR" /> | 
|  |  | <result column="login_name" property="loginName" jdbcType="VARCHAR" /> | 
|  |  | <result column="password" property="password" jdbcType="VARCHAR" /> | 
|  |  | <result column="no" property="no" jdbcType="VARCHAR" /> | 
|  |  | <result column="name" property="name" jdbcType="VARCHAR" /> | 
|  |  | <result column="email" property="email" jdbcType="VARCHAR" /> | 
|  |  | <result column="phone" property="phone" jdbcType="VARCHAR" /> | 
|  |  | <result column="mobile" property="mobile" jdbcType="VARCHAR" /> | 
|  |  | <result column="user_type" property="userType" jdbcType="CHAR" /> | 
|  |  | <result column="photo" property="photo" jdbcType="VARCHAR" /> | 
|  |  | <result column="login_ip" property="loginIp" jdbcType="VARCHAR" /> | 
|  |  | <result column="login_date" property="loginDate" jdbcType="TIMESTAMP" /> | 
|  |  | <result column="login_flag" property="loginFlag" jdbcType="VARCHAR" /> | 
|  |  | <result column="create_by" property="createBy" jdbcType="VARCHAR" /> | 
|  |  | <result column="create_date" property="createDate" jdbcType="TIMESTAMP" /> | 
|  |  | <result column="update_by" property="updateBy" jdbcType="VARCHAR" /> | 
|  |  | <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" /> | 
|  |  | <result column="remarks" property="remarks" jdbcType="VARCHAR" /> | 
|  |  | <result column="del_flag" property="delFlag" jdbcType="CHAR" /> | 
|  |  | </resultMap> | 
|  |  | <sql id="Base_Column_List" > | 
|  |  | id, company_id, office_id, login_name, password, no, name, email, phone, mobile, | 
|  |  | user_type, photo, login_ip, login_date, login_flag, create_by, create_date, update_by, | 
|  |  | update_date, remarks, del_flag | 
|  |  | </sql> | 
|  |  | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > | 
|  |  | select | 
|  |  | <include refid="Base_Column_List" /> | 
|  |  | from sys_user | 
|  |  | where id = #{id,jdbcType=VARCHAR} | 
|  |  | </select> | 
|  |  | <select id="selectByUsername" resultMap="BaseResultMap" parameterType="java.lang.String" > | 
|  |  | select | 
|  |  | <include refid="Base_Column_List" /> | 
|  |  | from sys_user | 
|  |  | where login_name = #{login_name,jdbcType=VARCHAR} | 
|  |  | </select> | 
|  |  | <delete id="deleteByPrimaryKey" parameterType="java.lang.String" > | 
|  |  | delete from sys_user | 
|  |  | where id = #{id,jdbcType=VARCHAR} | 
|  |  | </delete> | 
|  |  | <insert id="insert" parameterType="com.tianbo.warehouse.model.KakoUser" > | 
|  |  | insert into sys_user (id, company_id, office_id, | 
|  |  | login_name, password, no, | 
|  |  | name, email, phone, | 
|  |  | mobile, user_type, photo, | 
|  |  | login_ip, login_date, login_flag, | 
|  |  | create_by, create_date, update_by, | 
|  |  | update_date, remarks, del_flag | 
|  |  | ) | 
|  |  | values (#{id,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}, #{officeId,jdbcType=VARCHAR}, | 
|  |  | #{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR}, | 
|  |  | #{name,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, | 
|  |  | #{mobile,jdbcType=VARCHAR}, #{userType,jdbcType=CHAR}, #{photo,jdbcType=VARCHAR}, | 
|  |  | #{loginIp,jdbcType=VARCHAR}, #{loginDate,jdbcType=TIMESTAMP}, #{loginFlag,jdbcType=VARCHAR}, | 
|  |  | #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, | 
|  |  | #{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR} | 
|  |  | ) | 
|  |  | </insert> | 
|  |  | <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.KakoUser" > | 
|  |  | insert into sys_user | 
|  |  | <trim prefix="(" suffix=")" suffixOverrides="," > | 
|  |  | <if test="id != null" > | 
|  |  | id, | 
|  |  | </if> | 
|  |  | <if test="companyId != null" > | 
|  |  | company_id, | 
|  |  | </if> | 
|  |  | <if test="officeId != null" > | 
|  |  | office_id, | 
|  |  | </if> | 
|  |  | <if test="loginName != null" > | 
|  |  | login_name, | 
|  |  | </if> | 
|  |  | <if test="password != null" > | 
|  |  | password, | 
|  |  | </if> | 
|  |  | <if test="no != null" > | 
|  |  | no, | 
|  |  | </if> | 
|  |  | <if test="name != null" > | 
|  |  | name, | 
|  |  | </if> | 
|  |  | <if test="email != null" > | 
|  |  | email, | 
|  |  | </if> | 
|  |  | <if test="phone != null" > | 
|  |  | phone, | 
|  |  | </if> | 
|  |  | <if test="mobile != null" > | 
|  |  | mobile, | 
|  |  | </if> | 
|  |  | <if test="userType != null" > | 
|  |  | user_type, | 
|  |  | </if> | 
|  |  | <if test="photo != null" > | 
|  |  | photo, | 
|  |  | </if> | 
|  |  | <if test="loginIp != null" > | 
|  |  | login_ip, | 
|  |  | </if> | 
|  |  | <if test="loginDate != null" > | 
|  |  | login_date, | 
|  |  | </if> | 
|  |  | <if test="loginFlag != null" > | 
|  |  | login_flag, | 
|  |  | </if> | 
|  |  | <if test="createBy != null" > | 
|  |  | create_by, | 
|  |  | </if> | 
|  |  | <if test="createDate != null" > | 
|  |  | create_date, | 
|  |  | </if> | 
|  |  | <if test="updateBy != null" > | 
|  |  | update_by, | 
|  |  | </if> | 
|  |  | <if test="updateDate != null" > | 
|  |  | update_date, | 
|  |  | </if> | 
|  |  | <if test="remarks != null" > | 
|  |  | remarks, | 
|  |  | </if> | 
|  |  | <if test="delFlag != null" > | 
|  |  | del_flag, | 
|  |  | </if> | 
|  |  | </trim> | 
|  |  | <trim prefix="values (" suffix=")" suffixOverrides="," > | 
|  |  | <if test="id != null" > | 
|  |  | #{id,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="companyId != null" > | 
|  |  | #{companyId,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="officeId != null" > | 
|  |  | #{officeId,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="loginName != null" > | 
|  |  | #{loginName,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="password != null" > | 
|  |  | #{password,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="no != null" > | 
|  |  | #{no,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="name != null" > | 
|  |  | #{name,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="email != null" > | 
|  |  | #{email,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="phone != null" > | 
|  |  | #{phone,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="mobile != null" > | 
|  |  | #{mobile,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="userType != null" > | 
|  |  | #{userType,jdbcType=CHAR}, | 
|  |  | </if> | 
|  |  | <if test="photo != null" > | 
|  |  | #{photo,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="loginIp != null" > | 
|  |  | #{loginIp,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="loginDate != null" > | 
|  |  | #{loginDate,jdbcType=TIMESTAMP}, | 
|  |  | </if> | 
|  |  | <if test="loginFlag != null" > | 
|  |  | #{loginFlag,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="createBy != null" > | 
|  |  | #{createBy,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="createDate != null" > | 
|  |  | #{createDate,jdbcType=TIMESTAMP}, | 
|  |  | </if> | 
|  |  | <if test="updateBy != null" > | 
|  |  | #{updateBy,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="updateDate != null" > | 
|  |  | #{updateDate,jdbcType=TIMESTAMP}, | 
|  |  | </if> | 
|  |  | <if test="remarks != null" > | 
|  |  | #{remarks,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="delFlag != null" > | 
|  |  | #{delFlag,jdbcType=CHAR}, | 
|  |  | </if> | 
|  |  | </trim> | 
|  |  | </insert> | 
|  |  | <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.KakoUser" > | 
|  |  | update sys_user | 
|  |  | <set > | 
|  |  | <if test="companyId != null" > | 
|  |  | company_id = #{companyId,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="officeId != null" > | 
|  |  | office_id = #{officeId,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="loginName != null" > | 
|  |  | login_name = #{loginName,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="password != null" > | 
|  |  | password = #{password,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="no != null" > | 
|  |  | no = #{no,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="name != null" > | 
|  |  | name = #{name,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="email != null" > | 
|  |  | email = #{email,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="phone != null" > | 
|  |  | phone = #{phone,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="mobile != null" > | 
|  |  | mobile = #{mobile,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="userType != null" > | 
|  |  | user_type = #{userType,jdbcType=CHAR}, | 
|  |  | </if> | 
|  |  | <if test="photo != null" > | 
|  |  | photo = #{photo,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="loginIp != null" > | 
|  |  | login_ip = #{loginIp,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="loginDate != null" > | 
|  |  | login_date = #{loginDate,jdbcType=TIMESTAMP}, | 
|  |  | </if> | 
|  |  | <if test="loginFlag != null" > | 
|  |  | login_flag = #{loginFlag,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="createBy != null" > | 
|  |  | create_by = #{createBy,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="createDate != null" > | 
|  |  | create_date = #{createDate,jdbcType=TIMESTAMP}, | 
|  |  | </if> | 
|  |  | <if test="updateBy != null" > | 
|  |  | update_by = #{updateBy,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="updateDate != null" > | 
|  |  | update_date = #{updateDate,jdbcType=TIMESTAMP}, | 
|  |  | </if> | 
|  |  | <if test="remarks != null" > | 
|  |  | remarks = #{remarks,jdbcType=VARCHAR}, | 
|  |  | </if> | 
|  |  | <if test="delFlag != null" > | 
|  |  | del_flag = #{delFlag,jdbcType=CHAR}, | 
|  |  | </if> | 
|  |  | </set> | 
|  |  | where id = #{id,jdbcType=VARCHAR} | 
|  |  | </update> | 
|  |  | <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.KakoUser" > | 
|  |  | update sys_user | 
|  |  | set company_id = #{companyId,jdbcType=VARCHAR}, | 
|  |  | office_id = #{officeId,jdbcType=VARCHAR}, | 
|  |  | login_name = #{loginName,jdbcType=VARCHAR}, | 
|  |  | password = #{password,jdbcType=VARCHAR}, | 
|  |  | no = #{no,jdbcType=VARCHAR}, | 
|  |  | name = #{name,jdbcType=VARCHAR}, | 
|  |  | email = #{email,jdbcType=VARCHAR}, | 
|  |  | phone = #{phone,jdbcType=VARCHAR}, | 
|  |  | mobile = #{mobile,jdbcType=VARCHAR}, | 
|  |  | user_type = #{userType,jdbcType=CHAR}, | 
|  |  | photo = #{photo,jdbcType=VARCHAR}, | 
|  |  | login_ip = #{loginIp,jdbcType=VARCHAR}, | 
|  |  | login_date = #{loginDate,jdbcType=TIMESTAMP}, | 
|  |  | login_flag = #{loginFlag,jdbcType=VARCHAR}, | 
|  |  | create_by = #{createBy,jdbcType=VARCHAR}, | 
|  |  | create_date = #{createDate,jdbcType=TIMESTAMP}, | 
|  |  | update_by = #{updateBy,jdbcType=VARCHAR}, | 
|  |  | update_date = #{updateDate,jdbcType=TIMESTAMP}, | 
|  |  | remarks = #{remarks,jdbcType=VARCHAR}, | 
|  |  | del_flag = #{delFlag,jdbcType=CHAR} | 
|  |  | where id = #{id,jdbcType=VARCHAR} | 
|  |  | </update> | 
|  |  |  | 
|  |  | <update id="lockUser" parameterType="com.tianbo.warehouse.model.KakoUser" > | 
|  |  | update sys_user | 
|  |  | set | 
|  |  | login_flag = #{loginFlag,jdbcType=VARCHAR} | 
|  |  | where login_name = #{loginName,jdbcType=VARCHAR} | 
|  |  | </update> | 
|  |  | </mapper> | 
|  |  | \ No newline at end of file | 
... | ... |  |