|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
|
@@ -25,12 +25,13 @@
|
|
|
<result column="district" jdbcType="VARCHAR" property="district" />
|
|
|
<result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
|
|
|
<result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
|
|
|
+ <result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
@@ -64,7 +65,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
@@ -98,16 +99,17 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
id, mobile, name, password, email, create_time, number, province, position, superior_id,
|
|
|
- city, department_id, status, user_no, duty, district, head_portrait_url, contact_mobile
|
|
|
+ city, department_id, status, user_no, duty, district, head_portrait_url, contact_mobile,
|
|
|
+ last_login_time
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.AdminExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -126,7 +128,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -137,7 +139,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
delete from admin
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -146,7 +148,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
delete from admin
|
|
|
<if test="_parameter != null">
|
|
|
@@ -157,28 +159,28 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
insert into admin (id, mobile, name,
|
|
|
password, email, create_time,
|
|
|
number, province, position,
|
|
|
superior_id, city, department_id,
|
|
|
status, user_no, duty,
|
|
|
- district, head_portrait_url,contact_mobile
|
|
|
- )
|
|
|
+ district, head_portrait_url, contact_mobile,
|
|
|
+ last_login_time)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
#{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
#{number,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
|
|
|
#{superiorId,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{departmentId,jdbcType=VARCHAR},
|
|
|
#{status,jdbcType=VARCHAR}, #{userNo,jdbcType=VARCHAR}, #{duty,jdbcType=VARCHAR},
|
|
|
- #{district,jdbcType=VARCHAR}, #{headPortraitUrl,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}
|
|
|
- )
|
|
|
+ #{district,jdbcType=VARCHAR}, #{headPortraitUrl,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR},
|
|
|
+ #{lastLoginTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
insert into admin
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -236,6 +238,9 @@
|
|
|
<if test="contactMobile != null">
|
|
|
contact_mobile,
|
|
|
</if>
|
|
|
+ <if test="lastLoginTime != null">
|
|
|
+ last_login_time,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -292,13 +297,16 @@
|
|
|
<if test="contactMobile != null">
|
|
|
#{contactMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="lastLoginTime != null">
|
|
|
+ #{lastLoginTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.AdminExample" resultType="java.lang.Long">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
select count(*) from admin
|
|
|
<if test="_parameter != null">
|
|
|
@@ -309,7 +317,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
update admin
|
|
|
<set>
|
|
|
@@ -367,6 +375,9 @@
|
|
|
<if test="record.contactMobile != null">
|
|
|
contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="record.lastLoginTime != null">
|
|
|
+ last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -376,7 +387,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
update admin
|
|
|
set id = #{record.id,jdbcType=VARCHAR},
|
|
|
@@ -396,7 +407,8 @@
|
|
|
duty = #{record.duty,jdbcType=VARCHAR},
|
|
|
district = #{record.district,jdbcType=VARCHAR},
|
|
|
head_portrait_url = #{record.headPortraitUrl,jdbcType=VARCHAR},
|
|
|
- contact_mobile = #{record.contactMobile,jdbcType=VARCHAR}
|
|
|
+ contact_mobile = #{record.contactMobile,jdbcType=VARCHAR},
|
|
|
+ last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
|
@@ -405,7 +417,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
-->
|
|
|
update admin
|
|
|
<set>
|
|
|
@@ -460,9 +472,39 @@
|
|
|
<if test="contactMobile != null">
|
|
|
contact_mobile = #{contactMobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="lastLoginTime != null">
|
|
|
+ last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Admin">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Fri Jun 22 14:12:55 CST 2018.
|
|
|
+ -->
|
|
|
+ update admin
|
|
|
+ set mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ number = #{number,jdbcType=INTEGER},
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
+ position = #{position,jdbcType=VARCHAR},
|
|
|
+ superior_id = #{superiorId,jdbcType=VARCHAR},
|
|
|
+ city = #{city,jdbcType=VARCHAR},
|
|
|
+ department_id = #{departmentId,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=VARCHAR},
|
|
|
+ user_no = #{userNo,jdbcType=VARCHAR},
|
|
|
+ duty = #{duty,jdbcType=VARCHAR},
|
|
|
+ district = #{district,jdbcType=VARCHAR},
|
|
|
+ head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
|
|
|
+ contact_mobile = #{contactMobile,jdbcType=VARCHAR},
|
|
|
+ last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -622,6 +664,7 @@
|
|
|
aa.name as superior,
|
|
|
a.superior_id as superiorId,
|
|
|
a.department_id as departmentId,
|
|
|
+ date_format(a.last_login_time,'%Y-%m-%d %H:%i:%S') as lastLoginTime,
|
|
|
dm.name as departmentName
|
|
|
from admin a
|
|
|
left join admin_location al on a.id = al.admin_id
|