|
|
@@ -24,11 +24,14 @@
|
|
|
<result column="process" property="process" jdbcType="INTEGER" />
|
|
|
<result column="wrong_count" property="wrongCount" jdbcType="INTEGER" />
|
|
|
<result column="payment_date" property="paymentDate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="expert" property="expert" jdbcType="INTEGER" />
|
|
|
+ <result column="celebrity" property="celebrity" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
id, uid, username, sex, date_of_birth_year, date_of_birth_month, id_number, positive_id_url,
|
|
|
opposite_id_url, aft_username, province, city, area, contact_mobile, bank_name, bank_account,
|
|
|
- bank_card_number, amount_money, audit_status, process , wrong_count, payment_date
|
|
|
+ bank_card_number, amount_money, audit_status, process , wrong_count, payment_date,
|
|
|
+ expert, celebrity
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select
|
|
|
@@ -47,14 +50,16 @@
|
|
|
aft_username, province, city,
|
|
|
area, contact_mobile, bank_name,
|
|
|
bank_account, bank_card_number, amount_money,
|
|
|
- audit_status, process, wrong_count, payment_date)
|
|
|
+ audit_status, process, wrong_count, payment_date,
|
|
|
+ expert, celebrity)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
|
|
|
#{sex,jdbcType=VARCHAR}, #{dateOfBirthYear,jdbcType=VARCHAR}, #{dateOfBirthMonth,jdbcType=VARCHAR},
|
|
|
#{idNumber,jdbcType=VARCHAR}, #{positiveIdUrl,jdbcType=VARCHAR}, #{oppositeIdUrl,jdbcType=VARCHAR},
|
|
|
#{aftUsername,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER},
|
|
|
#{area,jdbcType=INTEGER}, #{contactMobile,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR},
|
|
|
#{bankAccount,jdbcType=VARCHAR}, #{bankCardNumber,jdbcType=VARCHAR}, #{amountMoney,jdbcType=DECIMAL},
|
|
|
- #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP})
|
|
|
+ #{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER}, #{wrongCount,jdbcType=INTEGER}, #{paymentDate,jdbcType=TIMESTAMP},
|
|
|
+ #{expert,jdbcType=INTEGER}, #{celebrity,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity" >
|
|
|
insert into user_identity
|
|
|
@@ -125,6 +130,12 @@
|
|
|
<if test="paymentDate != null" >
|
|
|
payment_date,
|
|
|
</if>
|
|
|
+ <if test="expert != null" >
|
|
|
+ expert,
|
|
|
+ </if>
|
|
|
+ <if test="celebrity != null" >
|
|
|
+ celebrity,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
<if test="id != null" >
|
|
|
@@ -193,6 +204,12 @@
|
|
|
<if test="paymentDate != null" >
|
|
|
#{paymentDate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="expert != null" >
|
|
|
+ #{expert,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="celebrity != null" >
|
|
|
+ #{celebrity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserIdentity" >
|
|
|
@@ -261,6 +278,12 @@
|
|
|
<if test="paymentDate != null" >
|
|
|
payment_date = #{paymentDate,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="expert != null" >
|
|
|
+ expert = #{expert,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="celebrity != null" >
|
|
|
+ celebrity = #{celebrity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -286,7 +309,9 @@
|
|
|
audit_status = #{auditStatus,jdbcType=INTEGER},
|
|
|
process = #{process,jdbcType=INTEGER},
|
|
|
wrong_count = #{wrongCount,jdbcType=INTEGER},
|
|
|
- payment_date = #{paymentDate,jdbcType=TIMESTAMP}
|
|
|
+ payment_date = #{paymentDate,jdbcType=TIMESTAMP},
|
|
|
+ expert = #{expert,jdbcType=INTEGER},
|
|
|
+ celebrity = #{celebrity,jdbcType=INTEGER},
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
@@ -311,7 +336,7 @@
|
|
|
ui.date_of_birth_month as dateOfBirthMonth, ui.id_number as idNumber, ui.positive_id_url as positiveIdUrl,
|
|
|
ui.opposite_id_url as oppositeIdUrl, ui.aft_username as aftUsername, ui.province, ui.city, ui.area, ui.contact_mobile as contactMobile,
|
|
|
ui.bank_name as bankName, ui.bank_account as bankAccount, ui.bank_card_number as bankCardNumber, ui.amount_money as amountMoney,
|
|
|
- ui.audit_status as auditStatus, ui.payment_date as paymentDate
|
|
|
+ ui.audit_status as auditStatus, ui.payment_date as paymentDate, ui.expert, ui.celebrity
|
|
|
from user u
|
|
|
LEFT JOIN user_identity ui on u.id = ui.uid
|
|
|
where u.id = #{uid,jdbcType=VARCHAR}
|
|
|
@@ -327,9 +352,9 @@
|
|
|
<if test="_parameter != null">
|
|
|
and u.mid = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="selectAllUserNames" resultType="com.goafanti.user.bo.UserNames"
|
|
|
+ <select id="selectAllUserNames" resultType="com.goafanti.user.bo.UserNames"
|
|
|
parameterType="java.lang.String">
|
|
|
select u.id as uid, i.username
|
|
|
from user u INNER JOIN
|
|
|
@@ -339,9 +364,9 @@
|
|
|
<if test="_parameter != null">
|
|
|
and u.aid = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
|
|
|
+ <select id="selectManagerAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
|
|
|
select u.id as uid, ui.username, u.mobile
|
|
|
from user u INNER JOIN
|
|
|
user_identity ui on u.id = ui.uid
|
|
|
@@ -352,9 +377,9 @@
|
|
|
and u.mid = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
|
|
|
+ <select id="selectAchievementUserOwner" resultType="com.goafanti.user.bo.UserNames">
|
|
|
select u.id as uid, ui.username, u.mobile
|
|
|
from user u INNER JOIN
|
|
|
user_identity ui on u.id = ui.uid
|
|
|
@@ -365,6 +390,35 @@
|
|
|
and u.aid = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
|
|
|
- </select>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findSearchSubscriberListByPage" parameterType="String" resultType="com.goafanti.portal.bo.UserSubscriberListBo">
|
|
|
+ SELECT
|
|
|
+ x.uid, x.unitName, count(a.id) as achievementNum,
|
|
|
+ count(d.id) as demandNum
|
|
|
+ FROM
|
|
|
+ (
|
|
|
+ SELECT
|
|
|
+ u.id as uid, oi.unit_name as unitName, u.number
|
|
|
+ oi.id as identityId
|
|
|
+ FROM
|
|
|
+ USER u
|
|
|
+ LEFT JOIN organization_identity oi ON oi.uid = u.id
|
|
|
+ WHERE
|
|
|
+ u.type = 1
|
|
|
+ <if test="null != level and level==1 ">
|
|
|
+ AND u.lvl <![CDATA[ >= ]]> 1
|
|
|
+ </if>
|
|
|
+ <if test="null !=level and level==0" >
|
|
|
+ AND u.lvl = 0
|
|
|
+ </if>
|
|
|
+ ) x
|
|
|
+ LEFT JOIN achievement a ON a.owner_id = x.uid AND a.release_status = 1
|
|
|
+ AND a.audit_status = 3 AND a.deleted_sign = 0
|
|
|
+ LEFT JOIN demand d ON d.employer_id = x.uid AND d.audit_status = 3
|
|
|
+ AND d.release_status = 1 AND d.deleted_sign = 0
|
|
|
+ GROUP BY
|
|
|
+ (x.uid) ORDER BY (x.number)
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|