|
|
@@ -24,11 +24,12 @@
|
|
|
<result column="open_id" jdbcType="VARCHAR" property="openId" />
|
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
|
<result column="reviewer" jdbcType="VARCHAR" property="reviewer" />
|
|
|
+ <result column="ambId" jdbcType="VARCHAR" property="ambid" />
|
|
|
</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
|
|
|
+ contact_mobile, last_login_time, open_id, `type`, reviewer, ambId
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -40,30 +41,27 @@
|
|
|
delete from admin
|
|
|
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 id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
|
|
|
+ insert into admin (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,
|
|
|
+ ambId)
|
|
|
+ values (#{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},
|
|
|
+ #{ambid,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
|
|
|
insert into admin
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
<if test="mobile != null">
|
|
|
mobile,
|
|
|
</if>
|
|
|
@@ -127,11 +125,11 @@
|
|
|
<if test="reviewer != null">
|
|
|
reviewer,
|
|
|
</if>
|
|
|
+ <if test="ambid != null">
|
|
|
+ ambId,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
<if test="mobile != null">
|
|
|
#{mobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -195,6 +193,9 @@
|
|
|
<if test="reviewer != null">
|
|
|
#{reviewer,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="ambid != null">
|
|
|
+ #{ambid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
@@ -263,6 +264,9 @@
|
|
|
<if test="reviewer != null">
|
|
|
reviewer = #{reviewer,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="ambid != null">
|
|
|
+ ambId = #{ambid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -288,10 +292,12 @@
|
|
|
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
|
|
|
open_id = #{openId,jdbcType=VARCHAR},
|
|
|
`type` = #{type,jdbcType=INTEGER},
|
|
|
- reviewer = #{reviewer,jdbcType=VARCHAR}
|
|
|
+ reviewer = #{reviewer,jdbcType=VARCHAR},
|
|
|
+ ambId = #{ambid,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
+
|
|
|
<select id="selectAllAdmin" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -775,9 +781,9 @@
|
|
|
|
|
|
<select id="getAdminRoleNamesList" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select a.id, a.name from admin a left join user_role b on a.id=b.uid
|
|
|
- left join `role` c on b.rid=c.id
|
|
|
+ left join `role` c on b.rid=c.id
|
|
|
where a.status='正常'
|
|
|
- and c.role_name in
|
|
|
+ and c.role_name in
|
|
|
<foreach close=")" collection="list" item="name" open="(" separator=",">
|
|
|
#{name}
|
|
|
</foreach>
|
|
|
@@ -791,7 +797,7 @@
|
|
|
|
|
|
<select id="getAdminRoleTypesList" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select a.id, a.name from admin a left join user_role b on a.id=b.uid
|
|
|
- left join `role` c on b.rid=c.id
|
|
|
+ left join `role` c on b.rid=c.id
|
|
|
where a.status='正常'
|
|
|
and c.role_type in
|
|
|
<foreach close=")" collection="list" item="type" open="(" separator=",">
|