|
|
@@ -26,12 +26,11 @@
|
|
|
<result column="reviewer" jdbcType="VARCHAR" property="reviewer" />
|
|
|
<result column="amb_id" jdbcType="VARCHAR" property="ambId" />
|
|
|
<result column="amb_role" jdbcType="VARCHAR" property="ambRole" />
|
|
|
- <result column="amb_manage" jdbcType="INTEGER" property="ambManage" />
|
|
|
</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, amb_id, amb_role, amb_manage
|
|
|
+ contact_mobile, last_login_time, open_id, `type`, reviewer, amb_id, amb_role
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -44,31 +43,26 @@
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
|
|
|
- insert into admin (id,mobile, `name`, `password`,
|
|
|
+ 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,
|
|
|
- amb_id, amb_role, amb_manage
|
|
|
- )
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
+ amb_id, amb_role)
|
|
|
+ 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}, #{ambRole,jdbcType=VARCHAR}, #{ambManage,jdbcType=INTEGER}
|
|
|
- )
|
|
|
+ #{ambId,jdbcType=VARCHAR}, #{ambRole,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<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>
|
|
|
@@ -138,14 +132,8 @@
|
|
|
<if test="ambRole != null">
|
|
|
amb_role,
|
|
|
</if>
|
|
|
- <if test="ambManage != null">
|
|
|
- amb_manage,
|
|
|
- </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
<if test="mobile != null">
|
|
|
#{mobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -215,9 +203,6 @@
|
|
|
<if test="ambRole != null">
|
|
|
#{ambRole,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="ambManage != null">
|
|
|
- #{ambManage,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
@@ -292,9 +277,6 @@
|
|
|
<if test="ambRole != null">
|
|
|
amb_role = #{ambRole,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="ambManage != null">
|
|
|
- amb_manage = #{ambManage,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -322,10 +304,11 @@
|
|
|
`type` = #{type,jdbcType=INTEGER},
|
|
|
reviewer = #{reviewer,jdbcType=VARCHAR},
|
|
|
amb_id = #{ambId,jdbcType=VARCHAR},
|
|
|
- amb_role = #{ambRole,jdbcType=VARCHAR},
|
|
|
- amb_manage = #{ambManage,jdbcType=INTEGER}
|
|
|
+ amb_role = #{ambRole,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
+
|
|
|
+
|
|
|
<select id="selectAllAdmin" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -596,7 +579,7 @@
|
|
|
and (ambs.id=#{ancestors} or find_in_set( #{ancestors} ,ambs.ancestors))
|
|
|
</if>
|
|
|
<if test="ambManage !=null">
|
|
|
- and a.amb_manage= #{ambManage}
|
|
|
+ and a.ts= #{ambManage}
|
|
|
</if>
|
|
|
order by a.last_login_time desc
|
|
|
<if test="page_sql!=null">
|
|
|
@@ -646,7 +629,7 @@
|
|
|
and (ambs.id=#{ancestors} or find_in_set( #{ancestors} ,ambs.ancestors))
|
|
|
</if>
|
|
|
<if test="ambManage !=null">
|
|
|
- and a.amb_manage= #{ambManage}
|
|
|
+ and a.ts= #{ambManage}
|
|
|
</if>
|
|
|
</select>
|
|
|
<insert id="insertn" parameterType="com.goafanti.common.model.Admin">
|
|
|
@@ -1072,7 +1055,7 @@
|
|
|
|
|
|
<select id="listAdminBydepIdAndRoleType" resultType="com.goafanti.common.model.Admin">
|
|
|
select a.id,a.name,a.email 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 department_id= #{depId}
|
|
|
and c.role_type= #{roleType}
|
|
|
</select>
|