|
@@ -0,0 +1,226 @@
|
|
|
+<?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.ygj.yuemum.dao.admin.JlAdminUserDao" >
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.admin.JlAdminUser" >
|
|
|
+ <id column="id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="username" property="username" jdbcType="VARCHAR" />
|
|
|
+ <result column="email" property="email" jdbcType="VARCHAR" />
|
|
|
+ <result column="password" property="password" jdbcType="VARCHAR" />
|
|
|
+ <result column="create_time" property="create_time" jdbcType="DATE" />
|
|
|
+ <result column="last_login_time" property="last_login_time" jdbcType="DATE" />
|
|
|
+ <result column="last_login_ip" property="last_login_ip" jdbcType="VARCHAR" />
|
|
|
+ <result column="role" property="role" jdbcType="INTEGER" />
|
|
|
+ <result column="status" property="status" jdbcType="INTEGER" />
|
|
|
+ <result column="org" property="org" jdbcType="INTEGER" />
|
|
|
+ <result column="last_login_location" property="last_login_location" jdbcType="VARCHAR" />
|
|
|
+ <result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
|
+ <result column="phone" property="phone" jdbcType="VARCHAR" />
|
|
|
+ <result column="province" property="province" jdbcType="VARCHAR" />
|
|
|
+ <result column="city" property="city" jdbcType="VARCHAR" />
|
|
|
+ <result column="district" property="district" jdbcType="VARCHAR" />
|
|
|
+ <result column="province" property="province" jdbcType="VARCHAR" />
|
|
|
+ <result column="enabled" property="enabled" jdbcType="INTEGER" />
|
|
|
+ <result column="update_time" property="update_time" jdbcType="DATE" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ id,username,email,password,create_time,last_login_time,last_login_ip,role,status,org,last_login_location,remark,phone,province,city,district,enabled,update_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!-- 得到所有的用户信息 -->
|
|
|
+ <select id="getAll" resultMap="BaseResultMap" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from jl_admin_user
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 根据id查找某个用户信息 -->
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from jl_admin_user
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 根据id删除某个用户信息 -->
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
+ delete from jl_admin_user
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 插入一条用户信息 -->
|
|
|
+ <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.admin.JlAdminUser" >
|
|
|
+ insert into jl_admin_user
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="username != null" >
|
|
|
+ username,
|
|
|
+ </if>
|
|
|
+ <if test="email != null" >
|
|
|
+ email,
|
|
|
+ </if>
|
|
|
+ <if test="password != null" >
|
|
|
+ password,
|
|
|
+ </if>
|
|
|
+ <if test="create_time != null" >
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="last_login_time != null" >
|
|
|
+ last_login_time,
|
|
|
+ </if>
|
|
|
+ <if test="last_login_ip != null" >
|
|
|
+ last_login_ip,
|
|
|
+ </if>
|
|
|
+ <if test="role != null" >
|
|
|
+ role,
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
+ <if test="org != null" >
|
|
|
+ org,
|
|
|
+ </if>
|
|
|
+ <if test="last_login_location != null" >
|
|
|
+ last_login_location,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null" >
|
|
|
+ remark,
|
|
|
+ </if>
|
|
|
+ <if test="phone != null" >
|
|
|
+ phone,
|
|
|
+ </if>
|
|
|
+ <if test="province != null" >
|
|
|
+ province,
|
|
|
+ </if>
|
|
|
+ <if test="city != null" >
|
|
|
+ city,
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="district != null" >
|
|
|
+ district,
|
|
|
+ </if>
|
|
|
+ <if test="enabled != null" >
|
|
|
+ enabled,
|
|
|
+ </if>
|
|
|
+ <if test="update_time != null" >
|
|
|
+ update_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="username != null" >
|
|
|
+ #{username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="email != null" >
|
|
|
+ #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null" >
|
|
|
+ #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="create_time != null" >
|
|
|
+ #{create_time,jdbcType=DATETIME},
|
|
|
+ </if>
|
|
|
+ <if test="last_login_time != null" >
|
|
|
+ #{last_login_time,jdbcType=DATETIME},
|
|
|
+ </if>
|
|
|
+ <if test="last_login_ip != null" >
|
|
|
+ #{last_login_ip,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="role != null" >
|
|
|
+ #{role,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="org != null" >
|
|
|
+ #{org,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="last_login_location != null" >
|
|
|
+ #{last_login_location,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null" >
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phone != null" >
|
|
|
+ #{phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="province != null" >
|
|
|
+ #{province,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="city != null" >
|
|
|
+ #{city,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="district != null" >
|
|
|
+ #{district,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null" >
|
|
|
+ #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="enabled != null" >
|
|
|
+ #{enabled,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="update_time != null" >
|
|
|
+ #{update_time,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 根据id更新一条用户信息 -->
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.admin.JlAdminUser" >
|
|
|
+ update jl_admin_user
|
|
|
+ <set >
|
|
|
+ <if test="username != null" >
|
|
|
+ username = #{username,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="email != null" >
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="password != null" >
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="create_time != null" >
|
|
|
+ create_time = #{create_time,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="last_login_time != null" >
|
|
|
+ password = #{last_login_time,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ <if test="last_login_ip != null" >
|
|
|
+ last_login_ip = #{last_login_ip,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="role != null" >
|
|
|
+ role = #{role,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="status != null" >
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="org != null" >
|
|
|
+ org = #{org,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="last_login_location != null" >
|
|
|
+ last_login_location = #{last_login_location,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null" >
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phone != null" >
|
|
|
+ phone = #{phone,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="province != null" >
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="city != null" >
|
|
|
+ city = #{city,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="district != null" >
|
|
|
+ district = #{district,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="enabled != null" >
|
|
|
+ enabled = #{enabled,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="update_time != null" >
|
|
|
+ update_time = #{update_time,jdbcType=DATE},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|