|
|
@@ -24,14 +24,15 @@
|
|
|
<result column="open_id" jdbcType="VARCHAR" property="openId" />
|
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
|
<result column="reviewer" jdbcType="VARCHAR" property="reviewer" />
|
|
|
+ <result column="token" jdbcType="VARCHAR" property="token" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- 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, last_login_time, open_id, `type`, reviewer
|
|
|
+ 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, last_login_time, open_id, `type`, reviewer, token
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from admin
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -41,22 +42,22 @@
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.goafanti.common.model.Admin">
|
|
|
- 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,
|
|
|
- last_login_time, open_id, `type`,
|
|
|
- reviewer)
|
|
|
- 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},
|
|
|
- #{lastLoginTime,jdbcType=TIMESTAMP}, #{openId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
|
|
|
- #{reviewer,jdbcType=VARCHAR})
|
|
|
+ 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,
|
|
|
+ last_login_time, open_id, `type`,
|
|
|
+ reviewer, token)
|
|
|
+ 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},
|
|
|
+ #{lastLoginTime,jdbcType=TIMESTAMP}, #{openId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
|
|
|
+ #{reviewer,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
insert into admin
|
|
|
@@ -127,6 +128,9 @@
|
|
|
<if test="reviewer != null">
|
|
|
reviewer,
|
|
|
</if>
|
|
|
+ <if test="token != null">
|
|
|
+ token,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -195,6 +199,9 @@
|
|
|
<if test="reviewer != null">
|
|
|
#{reviewer,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="token != null">
|
|
|
+ #{token,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
@@ -263,6 +270,9 @@
|
|
|
<if test="reviewer != null">
|
|
|
reviewer = #{reviewer,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="token != null">
|
|
|
+ token = #{token,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -288,7 +298,8 @@
|
|
|
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
|
|
|
open_id = #{openId,jdbcType=VARCHAR},
|
|
|
`type` = #{type,jdbcType=INTEGER},
|
|
|
- reviewer = #{reviewer,jdbcType=VARCHAR}
|
|
|
+ reviewer = #{reviewer,jdbcType=VARCHAR},
|
|
|
+ token = #{token,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -696,6 +707,8 @@
|
|
|
where
|
|
|
id=#{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
+
|
|
|
+
|
|
|
<select id="selectIdBySuperiorId" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
select id
|
|
|
from admin
|
|
|
@@ -1031,4 +1044,4 @@
|
|
|
select b.id from admin a left join department b on a.id=b.finance_id
|
|
|
where a.superior_id = #{aid}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|