|
|
@@ -652,12 +652,17 @@
|
|
|
<result column="uid" jdbcType="VARCHAR" property="uid" />
|
|
|
<result column="lvl" jdbcType="INTEGER" property="lvl" />
|
|
|
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
|
|
|
+ <result column="username" jdbcType="VARCHAR" property="username"/>
|
|
|
+ <result column="identify_name" jdbcType="VARCHAR" property="identifyName"/>
|
|
|
<result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
+ <result column="mobile" jdbcType="VARCHAR" property="mobile"/>
|
|
|
<result column="number" jdbcType="INTEGER" property="number" />
|
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
|
- <result column="person_portrait_url" jdbcType="VARCHAR" property="personPortraitUrl" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status"/>
|
|
|
+ <result column="authentication" jdbcType="INTEGER" property="authentication"/>
|
|
|
+ <result column="head_portrait_url" jdbcType="VARCHAR" property="headPortraitUrl" />
|
|
|
<result column="logo_url" jdbcType="VARCHAR" property="logoUrl" />
|
|
|
- <result column="grade_name" jdbcType="VARCHAR" property="gradeName" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="UserDownLoadBo" type="com.goafanti.user.bo.UserDownLoadBo">
|
|
|
@@ -691,15 +696,19 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUserPageHomeBoByUserId" parameterType="java.lang.String" resultMap="UserPageHomeBo">
|
|
|
- select
|
|
|
- u.lvl,mg.grade_name , u.nickname, u.email,
|
|
|
- u.number, u.type, u.head_portrait_url as person_portrait_url,
|
|
|
- u.company_logo_url as logo_url, u.id as uid, adc.achievement_count as achievementNum,
|
|
|
- adc.demand_count as demandNum
|
|
|
- from user u
|
|
|
- LEFT JOIN achievement_demand_count adc on adc.uid = u.id
|
|
|
- LEFT JOIN member_grade mg ON mg.member_rank=u.lvl
|
|
|
- where u.id = #{uid,jdbcType = VARCHAR}
|
|
|
+ select
|
|
|
+ id,
|
|
|
+ number,
|
|
|
+ username,
|
|
|
+ identify_name,
|
|
|
+ nickname,
|
|
|
+ create_time,
|
|
|
+ authentication,
|
|
|
+ status,email,
|
|
|
+ head_portrait_url,
|
|
|
+ mobile from user
|
|
|
+ where
|
|
|
+ id = #{uid,jdbcType = VARCHAR}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUserDownLoadBoByUserId" parameterType="java.lang.String" resultMap="UserDownLoadBo">
|
|
|
@@ -1015,9 +1024,7 @@
|
|
|
and u.create_time <![CDATA[ < ]]> #{endCreateTime,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
<select id="findUserByNameAndMobile" resultType="java.lang.String">
|
|
|
select
|
|
|
ui.username
|
|
|
@@ -1045,398 +1052,8 @@
|
|
|
and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
- <select id="findAreaManagerUserListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserListBo">
|
|
|
- select
|
|
|
- u.id ,
|
|
|
- u.mobile,
|
|
|
- u.email,
|
|
|
- u.create_time as createTime,
|
|
|
- u.number ,
|
|
|
- i.audit_status as auditStatus,
|
|
|
- i.username,
|
|
|
- a.name as adminName,
|
|
|
- ad.name as managerName
|
|
|
- from user u
|
|
|
- LEFT JOIN admin a on a.id = u.aid
|
|
|
- LEFT JOIN admin ad on ad.id = u.mid
|
|
|
- LEFT JOIN user_identity i on u.id = i.uid
|
|
|
- where u.type = 0
|
|
|
- <if test="mobile != null">
|
|
|
- and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- and u.email = #{email,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="pStart != null">
|
|
|
- and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test="pEnd != null">
|
|
|
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test=" number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and i.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="auditStatus != null">
|
|
|
- and i.audit_status= #{auditStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="provinceList != null">
|
|
|
- and i.province in
|
|
|
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
|
|
|
- #{plist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="cityList != null">
|
|
|
- and i.city in
|
|
|
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
|
|
|
- #{clist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
-
|
|
|
- order by u.number desc
|
|
|
- <if test="page_sql!=null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findAreaManagerUserCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select count(1)
|
|
|
- from user u LEFT JOIN user_identity i
|
|
|
- ON u.id = i.uid
|
|
|
- WHERE u.type = 0
|
|
|
- <if test="mobile != null">
|
|
|
- and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- and u.email = #{email,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="pStart != null">
|
|
|
- and u.create_time <![CDATA[ > ]]> #{pStart,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test="pEnd != null">
|
|
|
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test="number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and i.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="auditStatus != null">
|
|
|
- and i.audit_status= #{auditStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="provinceList != null">
|
|
|
- and i.province in
|
|
|
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
|
|
|
- #{plist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="cityList != null">
|
|
|
- and i.city in
|
|
|
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
|
|
|
- #{clist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findAreaManagerOrgListByPage" parameterType="String" resultType="com.goafanti.user.bo.OrgListBo">
|
|
|
- select
|
|
|
- u.id ,
|
|
|
- u.mobile,
|
|
|
- u.email,
|
|
|
- u.create_time as createTime,
|
|
|
- u.number ,
|
|
|
- o.audit_status as orgAuditStatus,
|
|
|
- a.name as adminName,
|
|
|
- o.unit_name as unitName,
|
|
|
- ad.name as managerName
|
|
|
- from user u
|
|
|
- LEFT JOIN admin a on a.id = u.aid
|
|
|
- LEFT JOIN admin ad on ad.id = u.mid
|
|
|
- LEFT JOIN organization_identity o on u.id = o.uid
|
|
|
- WHERE u.type = 1
|
|
|
- <if test="mobile != null">
|
|
|
- and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="uid != null">
|
|
|
- and u.id = #{uid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- and u.email = #{email,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="pStart != null">
|
|
|
- and u.create_time <![CDATA[ >= ]]> #{pStart,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test="pEnd != null">
|
|
|
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test=" number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="unitName != null">
|
|
|
- and o.unit_name like '%'#{unitName,jdbcType=VARCHAR}'%'
|
|
|
- </if>
|
|
|
- <if test="auditStatus != null">
|
|
|
- and o.audit_status= #{auditStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="provinceList != null">
|
|
|
- and o.licence_province in
|
|
|
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
|
|
|
- #{plist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="cityList != null">
|
|
|
- and o.licence_city in
|
|
|
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
|
|
|
- #{clist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- order by u.number desc
|
|
|
- <if test="page_sql!=null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findAreaManagerOrgCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select count(1)
|
|
|
- from user u LEFT JOIN organization_identity o
|
|
|
- ON u.id = o.uid
|
|
|
- WHERE u.type = 1
|
|
|
- <if test="uid != null">
|
|
|
- and u.id = #{uid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="mobile != null">
|
|
|
- and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- and u.email = #{email,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="pStart != null">
|
|
|
- and u.create_time <![CDATA[ >= ]]> #{pStart,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test="pEnd != null">
|
|
|
- and u.create_time <![CDATA[ < ]]> #{pEnd,jdbcType=TIMESTAMP}
|
|
|
- </if>
|
|
|
- <if test=" number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="unitName != null">
|
|
|
- and o.unit_name like '%'#{unitName,jdbcType=VARCHAR}'%'
|
|
|
- </if>
|
|
|
- <if test="auditStatus != null">
|
|
|
- and o.audit_status= #{auditStatus,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="provinceList != null">
|
|
|
- and i.province in
|
|
|
- <foreach close=")" collection="provinceList" item="plist" open="(" separator=",">
|
|
|
- #{plist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="cityList != null">
|
|
|
- and i.city in
|
|
|
- <foreach close=")" collection="cityList" item="clist" open="(" separator=",">
|
|
|
- #{clist}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findUserPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
|
|
|
- select
|
|
|
- u.id,i.username,i.work_unit as workUnit,i.professional_title as position,u.introduction as achievement,
|
|
|
- u.head_portrait_url as personPortraitUrl,
|
|
|
- i.province,
|
|
|
- u.introduction as personalProfile,
|
|
|
- ua.ability_label as abilityLabel,i.qualification,
|
|
|
- i.graduate_school,i.major_category,i.work_unit as workUnit,
|
|
|
- ic.name as engagedField
|
|
|
- from `user` u
|
|
|
- left join user_identity i on u.id=i.uid
|
|
|
- left join
|
|
|
- user_career c on u.id=c.uid
|
|
|
- <!-- left join user_info info on u.id=info.uid -->
|
|
|
- left join user_ability ua on u.id=ua.uid
|
|
|
- left join user_edu e on u.id=e.uid
|
|
|
- left join industry_category ic on i.industry=ic.id
|
|
|
- WHERE
|
|
|
- u.type = 0
|
|
|
- <if test="_parameter!= null">
|
|
|
- and u.id= #{_parameter,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findOrgPartnerDetail" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgPartnerDetailBo">
|
|
|
- select
|
|
|
- u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
|
|
|
- u.head_portrait_url as personPortraitUrl,
|
|
|
- i.province,u.introduction as personalProfile,
|
|
|
- ua.ability_label as abilityLabel
|
|
|
- from `user` u
|
|
|
- left join user_identity i on u.id=i.uid
|
|
|
- left join
|
|
|
- user_career c on u.id=c.uid
|
|
|
- <!-- left join user_info info on u.id=info.uid -->
|
|
|
- left join user_ability ua on u.id=ua.uid
|
|
|
- WHERE
|
|
|
- u.type = 1
|
|
|
- <if test="_parameter!= null">
|
|
|
- and u.id= #{_parameter,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findStarListByPage" parameterType="String" resultType="com.goafanti.user.bo.StarListBo">
|
|
|
- select
|
|
|
- u.id as uid,
|
|
|
- u.number,
|
|
|
- ui.username,
|
|
|
- uc.engaged_field as engagedField,
|
|
|
- uc.professional_title as professionalTitle,
|
|
|
- uc.work_unit as workUnit,
|
|
|
- adc.achievement_count as achievementNum
|
|
|
- from user u
|
|
|
- left join user_identity ui on ui.uid = u.id
|
|
|
- left join user_career uc on uc.uid = u.id
|
|
|
- left join achievement_demand_count adc on adc.uid = u.id
|
|
|
- where
|
|
|
- ui.celebrity = 1
|
|
|
- <if test="number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="engagedField != null">
|
|
|
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="professionalTitle != null">
|
|
|
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="workUnit != null">
|
|
|
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- ORDER BY adc.achievement_count DESC
|
|
|
- <if test="page_sql!=null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
-
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findStarCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(1)
|
|
|
- from user u
|
|
|
- left join user_identity ui on ui.uid = u.id
|
|
|
- left join user_career uc on uc.uid = u.id
|
|
|
- where
|
|
|
- ui.celebrity = 1
|
|
|
- <if test="number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="engagedField != null">
|
|
|
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="professionalTitle != null">
|
|
|
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="workUnit != null">
|
|
|
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findStarAndExpertListByPage" parameterType="String" resultType="com.goafanti.user.bo.StarAndExpertListBo">
|
|
|
- select
|
|
|
- u.id as uid,
|
|
|
- u.number,
|
|
|
- ui.username,
|
|
|
- uc.engaged_field as engagedField,
|
|
|
- uc.professional_title as professionalTitle,
|
|
|
- uc.work_unit as workUnit,
|
|
|
- adc.achievement_count as achievementNum
|
|
|
- from user u
|
|
|
- left join user_identity ui on ui.uid = u.id
|
|
|
- left join user_career uc on uc.uid = u.id
|
|
|
- left join achievement_demand_count adc on adc.uid = u.id
|
|
|
- where
|
|
|
- (ui.celebrity = 1 or ui.expert = 1)
|
|
|
- <if test="number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="engagedField != null">
|
|
|
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="professionalTitle != null">
|
|
|
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="workUnit != null">
|
|
|
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- ORDER BY adc.achievement_count DESC
|
|
|
- <if test="page_sql!=null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
-
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findStarAndExpertCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(1)
|
|
|
- from user u
|
|
|
- left join user_identity ui on ui.uid = u.id
|
|
|
- left join user_career uc on uc.uid = u.id
|
|
|
- where
|
|
|
- (ui.celebrity = 1 or ui.expert = 1)
|
|
|
- <if test="number != null">
|
|
|
- and u.number = #{number,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="engagedField != null">
|
|
|
- and uc.engaged_field like CONCAT(#{engagedField,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="username != null">
|
|
|
- and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="professionalTitle != null">
|
|
|
- and uc.professional_title like CONCAT('%',#{professionalTitle,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- <if test="workUnit != null">
|
|
|
- and uc.work_unit like CONCAT('%',#{workUnit,jdbcType=VARCHAR},'%')
|
|
|
- </if>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectNumberByPrimaryKey" parameterType="String" resultType="java.lang.Long">
|
|
|
- select number
|
|
|
- from user
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findUserPartner" parameterType="String" resultType="com.goafanti.user.bo.UserPartnerDetailBo">
|
|
|
- select
|
|
|
- u.id,i.username,c.work_unit as work_unit,c.position,c.achievement,
|
|
|
- u.head_portrait_url as personPortraitUrl,
|
|
|
- i.province,
|
|
|
- u.introduction as personalProfile,
|
|
|
- ua.ability_label as abilityLabel,i.uid,u.type
|
|
|
- from `user` u
|
|
|
- left join user_identity i on u.id=i.uid
|
|
|
- left join
|
|
|
- user_career c on u.id=c.uid
|
|
|
- <!-- left join user_info info on u.id=info.uid -->
|
|
|
- left join user_ability ua on u.id=ua.uid
|
|
|
- WHERE
|
|
|
- u.type = 0
|
|
|
- limit 0,50
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="checkUser" resultMap="BaseResultMap">
|
|
|
+
|
|
|
+ <select id="checkUser" resultMap="BaseResultMap">
|
|
|
select
|
|
|
id
|
|
|
from
|