|
|
@@ -40,6 +40,7 @@
|
|
|
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
<result column="professional_title" jdbcType="VARCHAR" property="professionalTitle" />
|
|
|
<result column="work_unit" jdbcType="VARCHAR" property="workUnit" />
|
|
|
+ <result column="work_unit1" jdbcType="VARCHAR" property="workUnit1" />
|
|
|
<result column="education" jdbcType="VARCHAR" property="education" />
|
|
|
<result column="major_category" jdbcType="VARCHAR" property="majorCategory" />
|
|
|
<result column="qualification" jdbcType="VARCHAR" property="qualification" />
|
|
|
@@ -53,6 +54,8 @@
|
|
|
<result column="society_tag" jdbcType="VARCHAR" property="societyTag" />
|
|
|
<result column="introduction" jdbcType="VARCHAR" property="introduction" />
|
|
|
<result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
|
|
|
+ <result column="typical_case" jdbcType="VARCHAR" property="typicalCase" />
|
|
|
+ <result column="consultant_certificate_url" jdbcType="VARCHAR" property="consultantCertificateUrl" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
|
@@ -133,7 +136,7 @@
|
|
|
amount_money, audit_status, process, wrong_count, payment_date, expert,
|
|
|
international, fixed_tel, qq, postal_address, postcode, review_instructions, industry,
|
|
|
contacts, email, professional_title, work_unit, education, major_category, qualification,
|
|
|
- graduate_school, consultation_price , consultant_type
|
|
|
+ graduate_school, consultation_price , consultant_type, typical_case, consultant_certificate_url
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
@@ -204,7 +207,8 @@
|
|
|
contacts, email, professional_title,
|
|
|
work_unit, education, major_category,
|
|
|
qualification, graduate_school,
|
|
|
- consultation_price,consultant_type)
|
|
|
+ consultation_price,consultant_type,
|
|
|
+ typical_case, consultant_certificate_url)
|
|
|
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},
|
|
|
@@ -218,7 +222,9 @@
|
|
|
#{contacts,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{professionalTitle,jdbcType=VARCHAR},
|
|
|
#{workUnit,jdbcType=VARCHAR}, #{education,jdbcType=VARCHAR}, #{majorCategory,jdbcType=VARCHAR},
|
|
|
#{qualification,jdbcType=VARCHAR}, #{graduateSchool,jdbcType=VARCHAR},
|
|
|
- #{consultationPrice,jdbcType=DECIMAL},#{consultantType,jdbcType=VARCHAR})
|
|
|
+ #{consultationPrice,jdbcType=DECIMAL},#{consultantType,jdbcType=VARCHAR},
|
|
|
+ #{typicalCase,jdbcType=VARCHAR}, #{consultantCertificateUrl,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.UserIdentity">
|
|
|
<!--
|
|
|
@@ -342,6 +348,12 @@
|
|
|
<if test="consultationPrice != null">
|
|
|
consultation_price,
|
|
|
</if>
|
|
|
+ <if test="typicalCase != null">
|
|
|
+ typical_case
|
|
|
+ </if>
|
|
|
+ <if test="consultantCertificateUrl != null">
|
|
|
+ consultant_certificate_url,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -458,6 +470,12 @@
|
|
|
<if test="consultationPrice != null">
|
|
|
#{consultationPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="typicalCase != null">
|
|
|
+ #{typicalCase,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="consultantCertificateUrl != null">
|
|
|
+ #{consultantCertificateUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.UserIdentityExample" resultType="java.lang.Long">
|
|
|
@@ -593,6 +611,12 @@
|
|
|
<if test="record.consultationPrice != null">
|
|
|
consultation_price = #{record.consultationPrice,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="record.typicalCase != null">
|
|
|
+ typical_case = #{record.typicalCase,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.consultantCertificateUrl != null">
|
|
|
+ consultant_certificate_url = #{record.consultantCertificateUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -642,6 +666,8 @@
|
|
|
major_category = #{record.majorCategory,jdbcType=VARCHAR},
|
|
|
qualification = #{record.qualification,jdbcType=VARCHAR},
|
|
|
graduate_school = #{record.graduateSchool,jdbcType=VARCHAR},
|
|
|
+ typical_case = #{record.typicalCase,jdbcType=VARCHAR},
|
|
|
+ consultant_certificate_url = #{record.consultantCertificateUrl,jdbcType=VARCHAR},
|
|
|
consultation_price = #{record.consultationPrice,jdbcType=DECIMAL}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -772,6 +798,12 @@
|
|
|
<if test="releaseStatus != null">
|
|
|
release_status = #{releaseStatus,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="typicalCase != null">
|
|
|
+ typical_case = #{typicalCase,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="consultantCertificateUrl != null">
|
|
|
+ consultant_certificate_url = #{consultantCertificateUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -818,6 +850,8 @@
|
|
|
major_category = #{majorCategory,jdbcType=VARCHAR},
|
|
|
qualification = #{qualification,jdbcType=VARCHAR},
|
|
|
graduate_school = #{graduateSchool,jdbcType=VARCHAR},
|
|
|
+ typical_case = #{typical_case,jdbcType=VARCHAR},
|
|
|
+ consultant_certificate_url = #{consultant_certificate_url,jdbcType=VARCHAR},
|
|
|
consultation_price = #{consultationPrice,jdbcType=DECIMAL}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -861,8 +895,11 @@
|
|
|
b.audit_status as auditStatus,
|
|
|
b.expert as expert,
|
|
|
b.work_unit as workUnit,
|
|
|
+ b.work_unit as workUnit1,
|
|
|
b.consultant_type as consultantType,
|
|
|
- b.audit_info as auditInfo
|
|
|
+ b.audit_info as auditInfo,
|
|
|
+ b.typical_case as typicalCase,
|
|
|
+ b.consultant_certificate_url as consultantCertificateUrl
|
|
|
from
|
|
|
user a left join user_identity b on
|
|
|
a.id = b.uid
|
|
|
@@ -1289,7 +1326,7 @@ select a.id as uid,a.nickname as username,a.head_portrait_url as personPortraitU
|
|
|
b.industry,b.work_unit as workUnit,b.professional_title as professionalTitle,a.introduction,
|
|
|
ifnull(c.count,0) as countInterest,b.expert,ifnull(x.a,0) as favorable,ifnull(x.b,0) as general,
|
|
|
ifnull(x.c,0) as inferior,ifnull(x.d,0) as commentCount,ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate,
|
|
|
- if(isnull(d.to_uid),0,1) as interested
|
|
|
+ if(isnull(d.to_uid),0,1) as interested, b.typical_case as typicalCase
|
|
|
from `user` a left join user_identity b on a.id=b.uid left join (select a.commodity_id as uid,
|
|
|
sum(case when a.star > 3 then 1 else 0 end) as a,
|
|
|
sum(case when a.star=3 then 1 else 0 end) as b,
|
|
|
@@ -1307,6 +1344,7 @@ where a.id=#{id,jdbcType=VARCHAR}
|
|
|
ifnull( a.count, 0 ) as countInterest, if( isnull(b.to_uid), 0, 1 ) as interested,ui.expert,
|
|
|
ifnull( x.a, 0 ) as favorable, ifnull( x.b, 0 ) as general, ifnull( x.c, 0 ) as inferior,
|
|
|
ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
|
|
|
+ ,ui.typical_case as typicalCase
|
|
|
from
|
|
|
`user` u left join user_identity ui on ui.uid = u.id
|
|
|
left join(select a.commodity_id as uid,
|
|
|
@@ -1321,6 +1359,9 @@ from
|
|
|
on u.id = b.to_uid
|
|
|
where u.status = 0 and u.source = 0
|
|
|
and ui.expert = 2 and ui.audit_status=2
|
|
|
+ <if test='consultantType == null or consultantType ==""'>
|
|
|
+ and ui.consultant_type < 4
|
|
|
+ </if>
|
|
|
<if test="consultantType != null">
|
|
|
and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -1352,6 +1393,9 @@ from
|
|
|
`user` u left join user_identity ui on ui.uid = u.id
|
|
|
where u.status = 0 and u.source = 0
|
|
|
and ui.expert = 2 and ui.audit_status=2
|
|
|
+ <if test='consultantType == null or consultantType ==""'>
|
|
|
+ and ui.consultant_type < 4
|
|
|
+ </if>
|
|
|
<if test="consultantType != null">
|
|
|
and ui.consultant_type=#{consultantType,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -1373,7 +1417,7 @@ from
|
|
|
<select id="getExpertAuditList" resultMap="BaseResultMap">
|
|
|
select
|
|
|
i.id, i.uid, i.username, id_number, positive_id_url, i.audit_status, expert, i.audit_status, fixed_tel, industry,
|
|
|
- u.mobile as contact_mobile, c.name as contacts, identify_name
|
|
|
+ u.mobile as contact_mobile, c.name as contacts, identify_name, consultant_type
|
|
|
from user_identity i
|
|
|
inner join user u on i.uid = u.id
|
|
|
left join industry_category c on c.id = i.industry
|
|
|
@@ -1390,6 +1434,9 @@ from
|
|
|
<if test="expert == null ">
|
|
|
and expert > 0
|
|
|
</if>
|
|
|
+ <if test="consultantType != null ">
|
|
|
+ and consultant_type = #{consultantType,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
<if test='username != null and username != ""'>
|
|
|
<bind name="un" value="'%' + username + '%'"/>
|
|
|
and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
|
|
|
@@ -1416,6 +1463,9 @@ from
|
|
|
<if test="expert == null ">
|
|
|
and expert > 0
|
|
|
</if>
|
|
|
+ <if test="consultantType != null ">
|
|
|
+ and consultant_type = #{consultantType,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
<if test="username != null">
|
|
|
<bind name="un" value="'%' + username + '%'"/>
|
|
|
and (i.username like #{un,jdbcType=VARCHAR} or u.identify_name like #{un,jdbcType=VARCHAR} or u.nickname like #{un,jdbcType=VARCHAR} or u.username like #{un,jdbcType=VARCHAR})
|
|
|
@@ -1433,7 +1483,8 @@ from
|
|
|
u.introduction, u.audit_opinion,
|
|
|
i.expert, i.audit_status, i.positive_id_url, i.opposite_id_url, u.head_portrait_url,
|
|
|
i.education, i.major_category, i.consultant_type, i.graduate_school, i.work_unit,
|
|
|
- i.qualification, i.professional_title, i.process, i.id, i.uid, i.audit_info
|
|
|
+ i.qualification, i.professional_title, i.process, i.id, i.uid, i.audit_info,
|
|
|
+ i.typical_case, i.consultant_certificate_url, i.work_unit as work_unit1
|
|
|
from `user` u
|
|
|
inner join user_identity i on u.id = i.uid
|
|
|
where u.id = #{uid,jdbcType=VARCHAR}
|