|
@@ -6,8 +6,9 @@
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<result column="username" property="username" jdbcType="VARCHAR" />
|
|
<result column="username" property="username" jdbcType="VARCHAR" />
|
|
<result column="email" property="email" jdbcType="VARCHAR" />
|
|
<result column="email" property="email" jdbcType="VARCHAR" />
|
|
|
|
+ <result column="name" property="name" jdbcType="VARCHAR" />
|
|
<result column="password" property="password" jdbcType="VARCHAR" />
|
|
<result column="password" property="password" jdbcType="VARCHAR" />
|
|
- <result column="create_time" property="create_time" jdbcType="DATE" />
|
|
|
|
|
|
+ <result column="create_time" property="create_time" jdbcType="VARCHAR" />
|
|
<result column="last_login_time" property="last_login_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="last_login_ip" property="last_login_ip" jdbcType="VARCHAR" />
|
|
<result column="role" property="role" jdbcType="INTEGER" />
|
|
<result column="role" property="role" jdbcType="INTEGER" />
|
|
@@ -28,12 +29,46 @@
|
|
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
|
|
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>
|
|
</sql>
|
|
|
|
|
|
|
|
+ <select id="checkUsername" resultType="java.lang.Integer" parameterType="java.lang.String">
|
|
|
|
+ select
|
|
|
|
+ count(1)
|
|
|
|
+ from jl_admin_user
|
|
|
|
+ where username = #{username,jdbcType=VARCHAR}
|
|
|
|
+ </select>
|
|
<!-- 得到所有的用户信息 -->
|
|
<!-- 得到所有的用户信息 -->
|
|
<select id="getAll" resultMap="BaseResultMap" >
|
|
<select id="getAll" resultMap="BaseResultMap" >
|
|
select
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
<include refid="Base_Column_List" />
|
|
from jl_admin_user
|
|
from jl_admin_user
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="queryAdminUsers" resultMap="BaseResultMap" parameterType="com.ygj.yuemum.domain.admin.JlAdminUser">
|
|
|
|
+ select
|
|
|
|
+ id,
|
|
|
|
+ username,
|
|
|
|
+ name,
|
|
|
|
+ role,
|
|
|
|
+ status,
|
|
|
|
+ city,
|
|
|
|
+ IFNULL(fgetbranches_name(city),'ALL') cityname,
|
|
|
|
+ fgetrole_name(role) rolename
|
|
|
|
+ from jl_admin_user
|
|
|
|
+ where username != 'admin'
|
|
|
|
+ <if test="username != null and username !=''">
|
|
|
|
+ and username like "%"#{username,jdbcType=VARCHAR}"%"
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name !=''">
|
|
|
|
+ and name like "%"#{name,jdbcType=VARCHAR}"%"
|
|
|
|
+ </if>
|
|
|
|
+ <if test="role != null and role !=''">
|
|
|
|
+ and role = #{role,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null ">
|
|
|
|
+ and status = #{status,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="city != null and city !=''">
|
|
|
|
+ and city = #{city,jdbcType=VARCHAR}
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
|
|
|
|
<select id="logIN" resultType="java.lang.Integer" parameterType="com.ygj.yuemum.domain.admin.JlAdminUser">
|
|
<select id="logIN" resultType="java.lang.Integer" parameterType="com.ygj.yuemum.domain.admin.JlAdminUser">
|
|
select
|
|
select
|
|
@@ -48,10 +83,34 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getPassword" resultType="java.lang.String" parameterType="java.lang.String">
|
|
|
|
+ select
|
|
|
|
+ password
|
|
|
|
+ from jl_admin_user
|
|
|
|
+ where
|
|
|
|
+ username = #{username,jdbcType=VARCHAR}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getRole" resultType="java.lang.String" parameterType="java.lang.String">
|
|
|
|
+ select
|
|
|
|
+ role
|
|
|
|
+ from jl_admin_user
|
|
|
|
+ where
|
|
|
|
+ username = #{username,jdbcType=VARCHAR}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getUserMkt" resultMap="BaseResultMap" parameterType="java.lang.String">
|
|
|
|
+ select
|
|
|
|
+ *
|
|
|
|
+ from jl_admin_user
|
|
|
|
+ where
|
|
|
|
+ username = #{username,jdbcType=VARCHAR}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<!-- 根据id查找某个用户信息 -->
|
|
<!-- 根据id查找某个用户信息 -->
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
select
|
|
select
|
|
- <include refid="Base_Column_List" />
|
|
|
|
|
|
+ *
|
|
from jl_admin_user
|
|
from jl_admin_user
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
</select>
|
|
@@ -72,6 +131,9 @@
|
|
<if test="email != null" >
|
|
<if test="email != null" >
|
|
email,
|
|
email,
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="name != null" >
|
|
|
|
+ name,
|
|
|
|
+ </if>
|
|
<if test="password != null" >
|
|
<if test="password != null" >
|
|
password,
|
|
password,
|
|
</if>
|
|
</if>
|
|
@@ -126,11 +188,14 @@
|
|
<if test="email != null" >
|
|
<if test="email != null" >
|
|
#{email,jdbcType=VARCHAR},
|
|
#{email,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="name != null" >
|
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
<if test="password != null" >
|
|
<if test="password != null" >
|
|
#{password,jdbcType=VARCHAR},
|
|
#{password,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="create_time != null" >
|
|
<if test="create_time != null" >
|
|
- #{create_time,jdbcType=DATETIME},
|
|
|
|
|
|
+ #{create_time,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="last_login_time != null" >
|
|
<if test="last_login_time != null" >
|
|
#{last_login_time,jdbcType=DATETIME},
|
|
#{last_login_time,jdbcType=DATETIME},
|
|
@@ -165,9 +230,6 @@
|
|
<if test="district != null" >
|
|
<if test="district != null" >
|
|
#{district,jdbcType=VARCHAR},
|
|
#{district,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
- <if test="password != null" >
|
|
|
|
- #{password,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
<if test="enabled != null" >
|
|
<if test="enabled != null" >
|
|
#{enabled,jdbcType=INTEGER},
|
|
#{enabled,jdbcType=INTEGER},
|
|
</if>
|
|
</if>
|
|
@@ -184,6 +246,9 @@
|
|
<if test="username != null" >
|
|
<if test="username != null" >
|
|
username = #{username,jdbcType=VARCHAR},
|
|
username = #{username,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="name != null" >
|
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
<if test="email != null" >
|
|
<if test="email != null" >
|
|
email = #{email,jdbcType=VARCHAR},
|
|
email = #{email,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
@@ -233,7 +298,7 @@
|
|
update_time = #{update_time,jdbcType=DATE}
|
|
update_time = #{update_time,jdbcType=DATE}
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
- where username = #{username,jdbcType=INTEGER}
|
|
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|