|
|
@@ -164,7 +164,7 @@
|
|
|
number, province, position,
|
|
|
superior_id, city, department_id,
|
|
|
status, user_no, duty,
|
|
|
- district, head_portrait_url, contact_mobile
|
|
|
+ district, head_portrait_url,contact_mobile
|
|
|
)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
#{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
@@ -463,218 +463,8 @@
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Admin">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Jun 13 10:27:07 CST 2018.
|
|
|
- -->
|
|
|
- update admin
|
|
|
- set mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
- name = #{name,jdbcType=VARCHAR},
|
|
|
- password = #{password,jdbcType=VARCHAR},
|
|
|
- email = #{email,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- number = #{number,jdbcType=INTEGER},
|
|
|
- province = #{province,jdbcType=VARCHAR},
|
|
|
- position = #{position,jdbcType=VARCHAR},
|
|
|
- superior_id = #{superiorId,jdbcType=VARCHAR},
|
|
|
- city = #{city,jdbcType=VARCHAR},
|
|
|
- department_id = #{departmentId,jdbcType=VARCHAR},
|
|
|
- status = #{status,jdbcType=VARCHAR},
|
|
|
- user_no = #{userNo,jdbcType=VARCHAR},
|
|
|
- duty = #{duty,jdbcType=VARCHAR},
|
|
|
- district = #{district,jdbcType=VARCHAR},
|
|
|
- head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
|
|
|
- contact_mobile = #{contactMobile,jdbcType=VARCHAR}
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.Admin">
|
|
|
- <id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
- <result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
|
- <result column="name" jdbcType="VARCHAR" property="name" />
|
|
|
- <result column="password" jdbcType="VARCHAR" property="password" />
|
|
|
- <result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="number" jdbcType="INTEGER" property="number" />
|
|
|
- <result column="province" jdbcType="INTEGER" property="province" />
|
|
|
- <result column="position" jdbcType="VARCHAR" property="position" />
|
|
|
- <result column="superior_id" jdbcType="VARCHAR" property="superiorId" />
|
|
|
- <result column="city" jdbcType="INTEGER" property="city" />
|
|
|
- <result column="department_id" jdbcType="VARCHAR" property="departmentId" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Base_Column_List">
|
|
|
- id, mobile, name, password, email, create_time, number, province, position, superior_id,
|
|
|
- city,department_id
|
|
|
- </sql>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from admin
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
- 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)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
- #{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
- #{number,jdbcType=INTEGER}, #{province,jdbcType=INTEGER}, #{position,jdbcType=VARCHAR},
|
|
|
- #{superiorId,jdbcType=VARCHAR}, #{city,jdbcType=INTEGER},#{departmentId,jdbcType=VARCHAR}
|
|
|
- )
|
|
|
- </insert>
|
|
|
- <insert id="insertSelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
- insert into admin
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
- <if test="mobile != null">
|
|
|
- mobile,
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- name,
|
|
|
- </if>
|
|
|
- <if test="password != null">
|
|
|
- password,
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- email,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
- </if>
|
|
|
- <if test="number != null">
|
|
|
- number,
|
|
|
- </if>
|
|
|
- <if test="province != null">
|
|
|
- province,
|
|
|
- </if>
|
|
|
- <if test="position != null">
|
|
|
- position,
|
|
|
- </if>
|
|
|
- <if test="superiorId != null">
|
|
|
- superior_id,
|
|
|
- </if>
|
|
|
- <if test="city != null">
|
|
|
- city,
|
|
|
- </if>
|
|
|
- <if test="departmentId != null">
|
|
|
- department_id,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="mobile != null">
|
|
|
- #{mobile,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="password != null">
|
|
|
- #{password,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- #{email,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="number != null">
|
|
|
- #{number,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="province != null">
|
|
|
- #{province,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="position != null">
|
|
|
- #{position,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="superiorId != null">
|
|
|
- #{superiorId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="city != null">
|
|
|
- #{city,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="departmentId != null">
|
|
|
- #{departmentId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
- update admin
|
|
|
- <set>
|
|
|
- <if test="mobile != null">
|
|
|
- mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- name = #{name,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="password != null">
|
|
|
- password = #{password,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- email = #{email,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="number != null">
|
|
|
- number = #{number,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="province != null">
|
|
|
- province = #{province,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <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=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="departmentId != null">
|
|
|
- department_id = #{departmentId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- status = #{status,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="userNo != null">
|
|
|
- user_no = #{userNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="duty != null">
|
|
|
- duty = #{duty,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="district != null">
|
|
|
- district = #{district,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="headPortraitUrl != null">
|
|
|
- head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Admin">
|
|
|
- update admin
|
|
|
- set mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
- name = #{name,jdbcType=VARCHAR},
|
|
|
- password = #{password,jdbcType=VARCHAR},
|
|
|
- email = #{email,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- number = #{number,jdbcType=INTEGER},
|
|
|
- province = #{province,jdbcType=INTEGER},
|
|
|
- position = #{position,jdbcType=VARCHAR},
|
|
|
- superior_id = #{superiorId,jdbcType=VARCHAR},
|
|
|
- city = #{city,jdbcType=INTEGER},
|
|
|
- department_id = #{departmentId,jdbcType=VARCHAR}
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<select id="selectAllAdmin" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -962,12 +752,12 @@
|
|
|
<insert id="insertn" 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)
|
|
|
+ number, province, position, superior_id, city,department_id,status,user_no,duty,district,head_portrait_url,contact_mobile)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
|
|
#{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
#{number,jdbcType=INTEGER}, #{province,jdbcType=INTEGER}, #{position,jdbcType=VARCHAR},
|
|
|
#{superiorId,jdbcType=VARCHAR}, #{city,jdbcType=INTEGER},#{departmentId,jdbcType=VARCHAR},
|
|
|
- #{status,jdbcType=VARCHAR},#{userNo,jdbcType=VARCHAR},#{duty,jdbcType=VARCHAR},#{district,jdbcType=VARCHAR},#{headPortraitUrl,jdbcType=VARCHAR}
|
|
|
+ #{status,jdbcType=VARCHAR},#{userNo,jdbcType=VARCHAR},#{duty,jdbcType=VARCHAR},#{district,jdbcType=VARCHAR},#{headPortraitUrl,jdbcType=VARCHAR},#{contactMobile,jdbcType=VARCHAR}
|
|
|
)
|
|
|
</insert>
|
|
|
<select id="selectUserNoBySuperiorId" parameterType="java.lang.String" resultType="java.lang.String">
|
|
|
@@ -997,7 +787,8 @@
|
|
|
password, email, create_time as createTime,
|
|
|
province, position,
|
|
|
superior_id as superiorId,department_id as departmentId,
|
|
|
- status,user_no as userNo,duty,district,head_portrait_url as headPortraitUrl
|
|
|
+ status,user_no as userNo,duty,district,head_portrait_url as headPortraitUrl,
|
|
|
+ contact_mobile as contactMobile
|
|
|
from admin
|
|
|
where
|
|
|
id=#{id,jdbcType=VARCHAR}
|