|
@@ -0,0 +1,259 @@
|
|
|
|
+<?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="cn.com.ty.lift.system.mapper.UserInfoMapper" >
|
|
|
|
+ <resultMap id="BaseResultMap" type="cn.com.ty.lift.system.entity.UserInfo" >
|
|
|
|
+ <id column="user_id" property="userId" jdbcType="BIGINT" />
|
|
|
|
+ <result column="name" property="name" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="mobile" property="mobile" jdbcType="CHAR" />
|
|
|
|
+ <result column="gender" property="gender" jdbcType="TINYINT" />
|
|
|
|
+ <result column="age" property="age" jdbcType="TINYINT" />
|
|
|
|
+ <result column="remarks" property="remarks" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="signature" property="signature" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="service_total" property="serviceTotal" jdbcType="INTEGER" />
|
|
|
|
+ <result column="satisfaction_total" property="satisfactionTotal" jdbcType="INTEGER" />
|
|
|
|
+ <result column="level" property="level" jdbcType="INTEGER" />
|
|
|
|
+ <result column="maintenance_total" property="maintenanceTotal" jdbcType="INTEGER" />
|
|
|
|
+ <result column="emergency_total" property="emergencyTotal" jdbcType="INTEGER" />
|
|
|
|
+ <result column="lift_total" property="liftTotal" jdbcType="INTEGER" />
|
|
|
|
+ <result column="balance" property="balance" jdbcType="DECIMAL" />
|
|
|
|
+ <result column="type" property="type" jdbcType="VARCHAR" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <resultMap id="ResultMapWithBLOBs" type="cn.com.ty.lift.system.entity.UserInfo" extends="BaseResultMap" >
|
|
|
|
+ <result column="avatar_url" property="avatarUrl" jdbcType="LONGVARCHAR" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
|
+ user_id, name, mobile, gender, age, remarks, signature, service_total, satisfaction_total,
|
|
|
|
+ level, maintenance_total, emergency_total, lift_total, balance, type
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <sql id="Blob_Column_List" >
|
|
|
|
+ avatar_url
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
+ ,
|
|
|
|
+ <include refid="Blob_Column_List" />
|
|
|
|
+ from user_info
|
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
|
|
|
+ delete from user_info
|
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <insert id="insert" parameterType="cn.com.ty.lift.system.entity.UserInfo" >
|
|
|
|
+ insert into user_info (user_id, name, mobile,
|
|
|
|
+ gender, age, remarks,
|
|
|
|
+ signature, service_total, satisfaction_total,
|
|
|
|
+ level, maintenance_total, emergency_total,
|
|
|
|
+ lift_total, balance, type,
|
|
|
|
+ avatar_url)
|
|
|
|
+ values (#{userId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{mobile,jdbcType=CHAR},
|
|
|
|
+ #{gender,jdbcType=TINYINT}, #{age,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR},
|
|
|
|
+ #{signature,jdbcType=VARCHAR}, #{serviceTotal,jdbcType=INTEGER}, #{satisfactionTotal,jdbcType=INTEGER},
|
|
|
|
+ #{level,jdbcType=INTEGER}, #{maintenanceTotal,jdbcType=INTEGER}, #{emergencyTotal,jdbcType=INTEGER},
|
|
|
|
+ #{liftTotal,jdbcType=INTEGER}, #{balance,jdbcType=DECIMAL}, #{type,jdbcType=VARCHAR},
|
|
|
|
+ #{avatarUrl,jdbcType=LONGVARCHAR})
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <insert id="insertSelective" parameterType="cn.com.ty.lift.system.entity.UserInfo" >
|
|
|
|
+ insert into user_info
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
+ <if test="userId != null" >
|
|
|
|
+ user_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null" >
|
|
|
|
+ name,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile != null" >
|
|
|
|
+ mobile,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="gender != null" >
|
|
|
|
+ gender,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="age != null" >
|
|
|
|
+ age,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remarks != null" >
|
|
|
|
+ remarks,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="signature != null" >
|
|
|
|
+ signature,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="serviceTotal != null" >
|
|
|
|
+ service_total,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="satisfactionTotal != null" >
|
|
|
|
+ satisfaction_total,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="level != null" >
|
|
|
|
+ level,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="maintenanceTotal != null" >
|
|
|
|
+ maintenance_total,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="emergencyTotal != null" >
|
|
|
|
+ emergency_total,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="liftTotal != null" >
|
|
|
|
+ lift_total,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="balance != null" >
|
|
|
|
+ balance,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type != null" >
|
|
|
|
+ type,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="avatarUrl != null" >
|
|
|
|
+ avatar_url,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
+ <if test="userId != null" >
|
|
|
|
+ #{userId,jdbcType=BIGINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null" >
|
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile != null" >
|
|
|
|
+ #{mobile,jdbcType=CHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="gender != null" >
|
|
|
|
+ #{gender,jdbcType=TINYINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="age != null" >
|
|
|
|
+ #{age,jdbcType=TINYINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remarks != null" >
|
|
|
|
+ #{remarks,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="signature != null" >
|
|
|
|
+ #{signature,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="serviceTotal != null" >
|
|
|
|
+ #{serviceTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="satisfactionTotal != null" >
|
|
|
|
+ #{satisfactionTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="level != null" >
|
|
|
|
+ #{level,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="maintenanceTotal != null" >
|
|
|
|
+ #{maintenanceTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="emergencyTotal != null" >
|
|
|
|
+ #{emergencyTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="liftTotal != null" >
|
|
|
|
+ #{liftTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="balance != null" >
|
|
|
|
+ #{balance,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type != null" >
|
|
|
|
+ #{type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="avatarUrl != null" >
|
|
|
|
+ #{avatarUrl,jdbcType=LONGVARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.system.entity.UserInfo" >
|
|
|
|
+ update user_info
|
|
|
|
+ <set >
|
|
|
|
+ <if test="name != null" >
|
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile != null" >
|
|
|
|
+ mobile = #{mobile,jdbcType=CHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="gender != null" >
|
|
|
|
+ gender = #{gender,jdbcType=TINYINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="age != null" >
|
|
|
|
+ age = #{age,jdbcType=TINYINT},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="remarks != null" >
|
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="signature != null" >
|
|
|
|
+ signature = #{signature,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="serviceTotal != null" >
|
|
|
|
+ service_total = #{serviceTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="satisfactionTotal != null" >
|
|
|
|
+ satisfaction_total = #{satisfactionTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="level != null" >
|
|
|
|
+ level = #{level,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="maintenanceTotal != null" >
|
|
|
|
+ maintenance_total = #{maintenanceTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="emergencyTotal != null" >
|
|
|
|
+ emergency_total = #{emergencyTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="liftTotal != null" >
|
|
|
|
+ lift_total = #{liftTotal,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="balance != null" >
|
|
|
|
+ balance = #{balance,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="type != null" >
|
|
|
|
+ type = #{type,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="avatarUrl != null" >
|
|
|
|
+ avatar_url = #{avatarUrl,jdbcType=LONGVARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.com.ty.lift.system.entity.UserInfo" >
|
|
|
|
+ update user_info
|
|
|
|
+ set name = #{name,jdbcType=VARCHAR},
|
|
|
|
+ mobile = #{mobile,jdbcType=CHAR},
|
|
|
|
+ gender = #{gender,jdbcType=TINYINT},
|
|
|
|
+ age = #{age,jdbcType=TINYINT},
|
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
|
+ signature = #{signature,jdbcType=VARCHAR},
|
|
|
|
+ service_total = #{serviceTotal,jdbcType=INTEGER},
|
|
|
|
+ satisfaction_total = #{satisfactionTotal,jdbcType=INTEGER},
|
|
|
|
+ level = #{level,jdbcType=INTEGER},
|
|
|
|
+ maintenance_total = #{maintenanceTotal,jdbcType=INTEGER},
|
|
|
|
+ emergency_total = #{emergencyTotal,jdbcType=INTEGER},
|
|
|
|
+ lift_total = #{liftTotal,jdbcType=INTEGER},
|
|
|
|
+ balance = #{balance,jdbcType=DECIMAL},
|
|
|
|
+ type = #{type,jdbcType=VARCHAR},
|
|
|
|
+ avatar_url = #{avatarUrl,jdbcType=LONGVARCHAR}
|
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.system.entity.UserInfo" >
|
|
|
|
+ update user_info
|
|
|
|
+ set name = #{name,jdbcType=VARCHAR},
|
|
|
|
+ mobile = #{mobile,jdbcType=CHAR},
|
|
|
|
+ gender = #{gender,jdbcType=TINYINT},
|
|
|
|
+ age = #{age,jdbcType=TINYINT},
|
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
|
+ signature = #{signature,jdbcType=VARCHAR},
|
|
|
|
+ service_total = #{serviceTotal,jdbcType=INTEGER},
|
|
|
|
+ satisfaction_total = #{satisfactionTotal,jdbcType=INTEGER},
|
|
|
|
+ level = #{level,jdbcType=INTEGER},
|
|
|
|
+ maintenance_total = #{maintenanceTotal,jdbcType=INTEGER},
|
|
|
|
+ emergency_total = #{emergencyTotal,jdbcType=INTEGER},
|
|
|
|
+ lift_total = #{liftTotal,jdbcType=INTEGER},
|
|
|
|
+ balance = #{balance,jdbcType=DECIMAL},
|
|
|
|
+ type = #{type,jdbcType=VARCHAR}
|
|
|
|
+ where user_id = #{userId,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+</mapper>
|