|
|
@@ -30,12 +30,13 @@
|
|
|
<result column="manager_id" jdbcType="VARCHAR" property="managerId" />
|
|
|
<result column="senior_staff" jdbcType="INTEGER" property="seniorStaff" />
|
|
|
<result column="public_purview" jdbcType="INTEGER" property="publicPurview" />
|
|
|
+ <result column="expense_open_id" jdbcType="VARCHAR" property="expenseOpenId" />
|
|
|
</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,
|
|
|
- manager_id, senior_staff, public_purview
|
|
|
+ manager_id, senior_staff, public_purview, expense_open_id
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -47,34 +48,31 @@
|
|
|
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, amb_id, amb_role,
|
|
|
- amb_manage, manager_id, senior_staff,
|
|
|
- public_purview)
|
|
|
- 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}, #{ambId,jdbcType=VARCHAR}, #{ambRole,jdbcType=VARCHAR},
|
|
|
- #{ambManage,jdbcType=INTEGER}, #{managerId,jdbcType=VARCHAR}, #{seniorStaff,jdbcType=INTEGER},
|
|
|
- #{publicPurview,jdbcType=INTEGER})
|
|
|
+ <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,
|
|
|
+ amb_id, amb_role, amb_manage,
|
|
|
+ manager_id, senior_staff, public_purview,
|
|
|
+ expense_open_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},
|
|
|
+ #{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},
|
|
|
+ #{managerId,jdbcType=VARCHAR}, #{seniorStaff,jdbcType=INTEGER}, #{publicPurview,jdbcType=INTEGER},
|
|
|
+ #{expenseOpenId,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>
|
|
|
@@ -156,11 +154,11 @@
|
|
|
<if test="publicPurview != null">
|
|
|
public_purview,
|
|
|
</if>
|
|
|
+ <if test="expenseOpenId != null">
|
|
|
+ expense_open_id,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
<if test="mobile != null">
|
|
|
#{mobile,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -242,6 +240,9 @@
|
|
|
<if test="publicPurview != null">
|
|
|
#{publicPurview,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="expenseOpenId != null">
|
|
|
+ #{expenseOpenId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin">
|
|
|
@@ -328,6 +329,9 @@
|
|
|
<if test="publicPurview != null">
|
|
|
public_purview = #{publicPurview,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="expenseOpenId != null">
|
|
|
+ expense_open_id = #{expenseOpenId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -359,13 +363,15 @@
|
|
|
amb_manage = #{ambManage,jdbcType=INTEGER},
|
|
|
manager_id = #{managerId,jdbcType=VARCHAR},
|
|
|
senior_staff = #{seniorStaff,jdbcType=INTEGER},
|
|
|
- public_purview = #{publicPurview,jdbcType=INTEGER}
|
|
|
+ public_purview = #{publicPurview,jdbcType=INTEGER},
|
|
|
+ expense_open_id = #{expenseOpenId,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
<select id="selectAllAdmin" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -641,7 +647,7 @@
|
|
|
<if test="seniorStaff != null">
|
|
|
and a.senior_staff = #{seniorStaff}
|
|
|
</if>
|
|
|
- <if test="publicPurview != null">
|
|
|
+ <if test="publicPurview != null">
|
|
|
and a.public_purview = #{publicPurview}
|
|
|
</if>
|
|
|
|