|
|
@@ -11,9 +11,12 @@
|
|
|
<result column="number" property="number" jdbcType="INTEGER" />
|
|
|
<result column="province" property="province" jdbcType="VARCHAR" />
|
|
|
<result column="position" property="position" jdbcType="VARCHAR" />
|
|
|
+ <result column="superior_id" property="superiorId" jdbcType="VARCHAR" />
|
|
|
+ <result column="city" property="city" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
- id, mobile, name, password, email, create_time, number, province, position
|
|
|
+ id, mobile, name, password, email, create_time, number, province, position, superior_id,
|
|
|
+ city
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select
|
|
|
@@ -28,10 +31,11 @@
|
|
|
<insert id="insert" parameterType="com.goafanti.common.model.Admin" >
|
|
|
insert into admin (id, mobile, name,
|
|
|
password, email, create_time,
|
|
|
- number, province, position)
|
|
|
+ number, province, position, superior_id)
|
|
|
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}
|
|
|
+ #{number,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR},
|
|
|
+ #{superiorId,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.Admin" >
|
|
|
@@ -64,6 +68,12 @@
|
|
|
<if test="position != null" >
|
|
|
position,
|
|
|
</if>
|
|
|
+ <if test="superiorId != null" >
|
|
|
+ superior_id,
|
|
|
+ </if>
|
|
|
+ <if test="city != null" >
|
|
|
+ city,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
@@ -93,6 +103,12 @@
|
|
|
<if test="position != null" >
|
|
|
#{position,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="superiorId != null" >
|
|
|
+ #{superiorId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="city != null" >
|
|
|
+ #{city,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin" >
|
|
|
@@ -122,6 +138,12 @@
|
|
|
<if test="position != null" >
|
|
|
position = #{position,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="superiorId != null" >
|
|
|
+ superior_id = #{superiorId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="city != null" >
|
|
|
+ city = #{city,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -134,7 +156,9 @@
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
number = #{number,jdbcType=INTEGER},
|
|
|
province = #{province,jdbcType=VARCHAR},
|
|
|
- position = #{position,jdbcType=VARCHAR}
|
|
|
+ position = #{position,jdbcType=VARCHAR},
|
|
|
+ superior_id = #{superiorId,jdbcType=VARCHAR},
|
|
|
+ city = #{city,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|