|
|
@@ -24,12 +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" />
|
|
|
+ <result column="amb_id" 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, ambId
|
|
|
+ contact_mobile, last_login_time, open_id, `type`, reviewer, amb_id
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -49,7 +49,7 @@
|
|
|
user_no, duty, district,
|
|
|
head_portrait_url, contact_mobile, last_login_time,
|
|
|
open_id, `type`, reviewer,
|
|
|
- ambId)
|
|
|
+ amb_id)
|
|
|
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},
|
|
|
@@ -57,7 +57,7 @@
|
|
|
#{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})
|
|
|
+ #{ambId,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
|
|
|
insert into admin
|
|
|
@@ -125,8 +125,8 @@
|
|
|
<if test="reviewer != null">
|
|
|
reviewer,
|
|
|
</if>
|
|
|
- <if test="ambid != null">
|
|
|
- ambId,
|
|
|
+ <if test="ambId != null">
|
|
|
+ amb_id,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -193,8 +193,8 @@
|
|
|
<if test="reviewer != null">
|
|
|
#{reviewer,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="ambid != null">
|
|
|
- #{ambid,jdbcType=VARCHAR},
|
|
|
+ <if test="ambId != null">
|
|
|
+ #{ambId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
@@ -264,8 +264,8 @@
|
|
|
<if test="reviewer != null">
|
|
|
reviewer = #{reviewer,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="ambid != null">
|
|
|
- ambId = #{ambid,jdbcType=VARCHAR},
|
|
|
+ <if test="ambId != null">
|
|
|
+ amb_id = #{ambId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
@@ -293,11 +293,10 @@
|
|
|
open_id = #{openId,jdbcType=VARCHAR},
|
|
|
`type` = #{type,jdbcType=INTEGER},
|
|
|
reviewer = #{reviewer,jdbcType=VARCHAR},
|
|
|
- ambId = #{ambid,jdbcType=VARCHAR}
|
|
|
+ amb_id = #{ambId,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
-
|
|
|
<select id="selectAllAdmin" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -649,7 +648,7 @@
|
|
|
a.province, a.`position`,a.reviewer , a.superior_id as superiorId,
|
|
|
a.department_id as departmentId, a.status,a.user_no as userNo,a.duty,a.district,
|
|
|
a.head_portrait_url as headPortraitUrl, a.contact_mobile as contactMobile,
|
|
|
- b.name superior,c.name reviewerName,a.type
|
|
|
+ b.name superior,c.name reviewerName,a.type,a.amb_id ambId
|
|
|
from admin a left join admin b on a.superior_id =b.id left join admin c on a.reviewer =c.id
|
|
|
where a.id= #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
@@ -1078,4 +1077,7 @@
|
|
|
select b.id from admin a left join department b on a.id=b.finance_id
|
|
|
where a.superior_id = #{aid}
|
|
|
</select>
|
|
|
+ <select id="selectByAmbIdCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(*) from admin where amb_id= #{ambId}
|
|
|
+ </select>
|
|
|
</mapper>
|