|
@@ -21,6 +21,15 @@
|
|
|
<result column="del_flag" property="delFlag" jdbcType="CHAR"/>
|
|
<result column="del_flag" property="delFlag" jdbcType="CHAR"/>
|
|
|
<result column="money_coin" property="moneyCoin" jdbcType="DECIMAL"/>
|
|
<result column="money_coin" property="moneyCoin" jdbcType="DECIMAL"/>
|
|
|
<result column="money_point" property="moneyPoint" jdbcType="DECIMAL"/>
|
|
<result column="money_point" property="moneyPoint" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result column="contacter" property="contacter" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="contact_phone" property="contactPhone" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="company_name" property="companyName" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="company_type" property="companyType" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="admin_flag" property="adminFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="cash_pledge" property="cashPledge" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="approve_flag" property="approveFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="store_flag" property="storeFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="company_flag" property="companyFlag" jdbcType="CHAR"/>
|
|
|
<association property="departId" javaType="string" column="id"
|
|
<association property="departId" javaType="string" column="id"
|
|
|
select="com.izouma.awesomeadmin.dao.DepartInfoMapper.getUserDepartId"/>
|
|
select="com.izouma.awesomeadmin.dao.DepartInfoMapper.getUserDepartId"/>
|
|
|
<association property="roleId" javaType="string" column="id"
|
|
<association property="roleId" javaType="string" column="id"
|
|
@@ -28,7 +37,9 @@
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
|
id, username, nickname, icon, birthday, sex, open_id, union_id, phone, mail,
|
|
id, username, nickname, icon, birthday, sex, open_id, union_id, phone, mail,
|
|
|
- country, province, city, district, create_time, del_flag, money_coin, money_point
|
|
|
|
|
|
|
+ country, province, city, district, create_time, del_flag, money_coin, money_point,
|
|
|
|
|
+ contacter, contact_phone, company_name, company_type, admin_flag, cash_pledge,
|
|
|
|
|
+ approve_flag, store_flag, company_flag
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
select
|
|
select
|
|
@@ -105,6 +116,33 @@
|
|
|
<if test="moneyPoint != null">
|
|
<if test="moneyPoint != null">
|
|
|
money_point,
|
|
money_point,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="contacter != null">
|
|
|
|
|
+ contacter,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contactPhone != null">
|
|
|
|
|
+ contact_phone,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyName != null">
|
|
|
|
|
+ company_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyType != null">
|
|
|
|
|
+ company_type,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="adminFlag != null">
|
|
|
|
|
+ admin_flag,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cashPledge != null">
|
|
|
|
|
+ cash_pledge,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="approveFlag != null">
|
|
|
|
|
+ approve_flag,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeFlag != null">
|
|
|
|
|
+ store_flag,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyFlag != null">
|
|
|
|
|
+ company_flag,
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
<if test="id != null">
|
|
@@ -167,6 +205,33 @@
|
|
|
<if test="moneyPoint != null">
|
|
<if test="moneyPoint != null">
|
|
|
#{moneyPoint},
|
|
#{moneyPoint},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="contacter != null">
|
|
|
|
|
+ #{contacter},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contactPhone != null">
|
|
|
|
|
+ #{contactPhone},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyName != null">
|
|
|
|
|
+ #{companyName},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyType != null">
|
|
|
|
|
+ #{companyType},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="adminFlag != null">
|
|
|
|
|
+ #{adminFlag},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cashPledge != null">
|
|
|
|
|
+ #{cashPledge},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="approveFlag != null">
|
|
|
|
|
+ #{approveFlag},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeFlag != null">
|
|
|
|
|
+ #{storeFlag},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyFlag != null">
|
|
|
|
|
+ #{companyFlag},
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.UserInfo">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.UserInfo">
|
|
@@ -224,10 +289,37 @@
|
|
|
del_flag = #{delFlag,jdbcType=CHAR},
|
|
del_flag = #{delFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="moneyCoin != null">
|
|
<if test="moneyCoin != null">
|
|
|
- money_coin = #{moneyCoin,jdbcType=CHAR},
|
|
|
|
|
|
|
+ money_coin = #{moneyCoin},
|
|
|
</if>
|
|
</if>
|
|
|
<if test="moneyPoint != null">
|
|
<if test="moneyPoint != null">
|
|
|
- money_point = #{moneyPoint,jdbcType=CHAR},
|
|
|
|
|
|
|
+ money_point = #{moneyPoint},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contacter != null">
|
|
|
|
|
+ contacter = #{contacter},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contactPhone != null">
|
|
|
|
|
+ contact_phone = #{contactPhone},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyName != null">
|
|
|
|
|
+ company_name = #{companyName},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyType != null">
|
|
|
|
|
+ company_type = #{companyType},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="adminFlag != null">
|
|
|
|
|
+ admin_flag = #{adminFlag},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cashPledge != null">
|
|
|
|
|
+ cash_pledge = #{cashPledge},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="approveFlag != null">
|
|
|
|
|
+ approve_flag = #{approveFlag},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeFlag != null">
|
|
|
|
|
+ store_flag = #{storeFlag},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyFlag != null">
|
|
|
|
|
+ company_flag = #{companyFlag},
|
|
|
</if>
|
|
</if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
@@ -293,6 +385,34 @@
|
|
|
<if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
<if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
and del_flag = #{record.delFlag}
|
|
and del_flag = #{record.delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="record.contacter != null and !"".equals(record.contacter)">
|
|
|
|
|
+ and contacter = #{record.contacter}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.contactPhone != null and !"".equals(record.contactPhone)">
|
|
|
|
|
+ and contact_phone = #{record.contactPhone}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.companyName != null and !"".equals(record.companyName)">
|
|
|
|
|
+ and company_name = #{record.companyName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.companyType != null and !"".equals(record.companyType)">
|
|
|
|
|
+ and company_type = #{record.companyType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.adminFlag != null and !"".equals(record.adminFlag)">
|
|
|
|
|
+ and admin_flag = #{record.adminFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.cashPledge != null and !"".equals(record.cashPledge)">
|
|
|
|
|
+ and cash_pledge = #{record.cashPledge}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.approveFlag != null and !"".equals(record.approveFlag)">
|
|
|
|
|
+ and approve_flag = #{record.approveFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.storeFlag != null and !"".equals(record.storeFlag)">
|
|
|
|
|
+ and store_flag = #{record.storeFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.companyFlag != null and !"".equals(record.companyFlag)">
|
|
|
|
|
+ and company_flag = #{record.companyFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
</where>
|
|
</where>
|
|
|
order by id desc
|
|
order by id desc
|
|
|
</select>
|
|
</select>
|
|
@@ -356,6 +476,35 @@
|
|
|
<if test="delFlag != null and !"".equals(delFlag)">
|
|
<if test="delFlag != null and !"".equals(delFlag)">
|
|
|
and del_flag = #{delFlag}
|
|
and del_flag = #{delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="contacter != null and !"".equals(contacter)">
|
|
|
|
|
+ and contacter = #{contacter}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="contactPhone != null and !"".equals(contactPhone)">
|
|
|
|
|
+ and contact_phone = #{contactPhone}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyName != null and !"".equals(companyName)">
|
|
|
|
|
+ and company_name = #{companyName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyType != null and !"".equals(companyType)">
|
|
|
|
|
+ and company_type = #{companyType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="adminFlag != null and !"".equals(adminFlag)">
|
|
|
|
|
+ and admin_flag = #{adminFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cashPledge != null and !"".equals(cashPledge)">
|
|
|
|
|
+ and cash_pledge = #{cashPledge}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="approveFlag != null and !"".equals(approveFlag)">
|
|
|
|
|
+ and approve_flag = #{approveFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeFlag != null and !"".equals(storeFlag)">
|
|
|
|
|
+ and store_flag = #{storeFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyFlag != null and !"".equals(companyFlag)">
|
|
|
|
|
+ and company_flag = #{companyFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
</where>
|
|
</where>
|
|
|
order by id desc
|
|
order by id desc
|
|
|
</select>
|
|
</select>
|
|
@@ -426,7 +575,7 @@
|
|
|
SELECT
|
|
SELECT
|
|
|
<include refid="Base_Column_List"/>
|
|
<include refid="Base_Column_List"/>
|
|
|
from sys_user
|
|
from sys_user
|
|
|
- WHERE username = #{username} AND password = #{password} AND del_flag = 'N'
|
|
|
|
|
|
|
+ WHERE (username = #{username} or phone = #{username} ) AND password = #{password} AND del_flag = 'N'
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findDepartLeader" resultType="java.lang.String">
|
|
<select id="findDepartLeader" resultType="java.lang.String">
|
|
|
SELECT *
|
|
SELECT *
|
|
@@ -450,5 +599,31 @@
|
|
|
AND id = #{id}
|
|
AND id = #{id}
|
|
|
</where>
|
|
</where>
|
|
|
</update>
|
|
</update>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updatePassword" parameterType="com.izouma.awesomeadmin.model.UserInfo">
|
|
|
|
|
+ update sys_user
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="password != null">
|
|
|
|
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ and del_flag = 'N'
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ and id = #{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="username != null and !"".equals(username)">
|
|
|
|
|
+ and username = #{username}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="phone != null and !"".equals(phone)">
|
|
|
|
|
+ and phone = #{phone}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="mail != null and !"".equals(mail)">
|
|
|
|
|
+ and mail = #{mail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|
|
|
|
|
|