Merge branch 'cc_20230520_partner' of http://gitlab.coolcollege.cn/hangzhou/java/coolstore-partner-manage into cc_20230520_partner

# Conflicts:
#	coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyPartnerInterviewMapper.java
#	coolstore-partner-webb/src/main/resources/application-dev.properties
This commit is contained in:
俞扬
2023-06-16 11:48:29 +08:00
106 changed files with 2030 additions and 294 deletions

View File

@@ -261,4 +261,23 @@
<update id="deleteUserByUserId">
update enterprise_user set deleted = 1 where user_id = #{userId}
</update>
<select id="searchUserByRegionIdsAndKeyword" resultMap="BaseResultMap">
select
user_id, name, mobile
from
enterprise_user
<where>
deleted = 0
<if test="regionIds != null and regionIds.size()>0">
and <foreach collection="regionIds" item="regionId" separator="or" open="(" close=")"> user_region_ids like concat("%", #{regionId}, "%") </foreach>
</if>
<if test="keyword != null">
and (name like concat("%", #{keyword}, "%") or mobile like concat("%", #{keyword}, "%"))
</if>
<if test="isLeader!= null and isLeader">
and is_leader = 1 and leader_dept_ids in <foreach collection="regionIds" item="regionId" separator="," open="(" close=")">#{regionId}</foreach>
</if>
</where>
</select>
</mapper>

View File

@@ -84,7 +84,7 @@
partner_url = #{record.partnerUrl},
tencent_video_account = #{record.tencentVideoAccount},
tencent_video_key = #{record.tencentVideoKey},
update_user_id = #{record.updateUserId},
update_user_id = #{record.updateUserId}
where id = #{record.id}
</update>
</mapper>

View File

@@ -106,10 +106,10 @@
<if test="record.contentTitle != null and record.contentTitle != ''">
content_title = #{record.contentTitle},
</if>
<if test="record.subject != null and record.subject != ''">
<if test="record.subject != null">
subject = #{record.subject},
</if>
<if test="record.contentType != null and record.contentType != ''">
<if test="record.contentType != null">
content_type = #{record.contentType},
</if>
<if test="record.cover != null and record.cover != ''">
@@ -153,10 +153,10 @@
<if test="contentTitle != null and contentTitle != ''">
and content_title like concat('%', #{contentTitle}, '%')
</if>
<if test="subject != null and subject != ''">
<if test="subject != null">
and subject = #{subject}
</if>
<if test="contentType != null and contentType != ''">
<if test="contentType != null">
and content_type = #{contentType}
</if>
<if test="startTime != null and startTime != ''">

View File

@@ -112,7 +112,7 @@
<foreach collection="recordList" item="record" separator=",">
(#{record.mappingId},
#{record.openAreaMappingId},
#{record.type}
#{record.type})
</foreach>
</insert>

View File

@@ -185,10 +185,14 @@
<select id="queryByKeyword" resultMap="BaseResultMap">
select * from
hy_open_area_info
where area_path like concat('%',#{keyword},'%')
<if test="filterData!=null and filterData==true">
and province_city_flag = 1
</if>
<where>
<if test="keyword!=null and keyword!=''">
and area_path like concat('%',#{keyword},'%')
</if>
<if test="filterData!=null and filterData==true">
and province_city_flag = 1
</if>
</where>
</select>

View File

@@ -216,4 +216,12 @@
where partner_id = #{partnerId}
</set>
</update>
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_base_info
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
</select>
</mapper>

View File

@@ -101,4 +101,44 @@
</set>
where id = #{record.id}
</update>
<select id="getHyPartnerClerkList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_clerk
where partner_line_id = #{lineId}
</select>
<insert id="batchInsert">
insert into
hy_partner_clerk
(
partner_line_id,
partner_id,
username,
relationship,
age,
choose_reason
)
values
<foreach collection="recordList" item="record" separator=",">
(#{record.partnerLineId},
#{record.partnerId},
#{record.username},
#{record.relationship},
#{record.age},
#{record.chooseReason})
</foreach>
</insert>
<delete id="deleteByPartnerIdAndLineId">
delete from hy_partner_clerk where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
</delete>
<select id="listByPartnerIdAndLineId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include> from
hy_partner_clerk
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
</select>
</mapper>

View File

@@ -279,7 +279,7 @@
order by b.create_time
</select>
<select id="selectByLineId" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
<select id="selectByLineId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_partner_intent_info
@@ -288,4 +288,11 @@
</where>
</select>
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_intent_info
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
</select>
</mapper>

View File

@@ -35,6 +35,11 @@
<association property="interviewerName" column="interviewerId" select="queryInterviewerName" javaType="string"/>
</resultMap>
<resultMap id="partnerEnterInterviewVO" type="com.cool.store.vo.EnterInterviewVO">
<association property="partnerName" column="partner_id" select="queryPartnerName"></association>
<association property="interviewerName" column="interviewer" select="queryInterviewerName"></association>
</resultMap>
<resultMap id="passLetterDetail" type="com.cool.store.vo.PartnerPassLetterDetailVO">
<association property="partnerName" column="partner_id" select="queryPartnerName"></association>
<association property="verifyCity" column="partner_id" select="getVerifyCity"></association>
@@ -315,23 +320,27 @@
</update>
<!-- 根据会议 id 获取面试官 id -->
<select id="getInterviewerByInterviewId" resultType="java.lang.String">
SELECT interviewer
<select id="getInterviewerByInterviewId" resultMap="partnerEnterInterviewVO">
SELECT interviewer, interviewer interviewer_id, partner_id
FROM hy_partner_interview
WHERE id = #{interviewId}
</select>
<!-- 获取通知函详情 -->
<select id="getPassLetterDetail" resultMap="passLetterDetail">
SELECT pass_code, pass_file_url, expiry_date, partner_id
SELECT auth_code, pass_code, pass_file_url, expiry_date, partner_id
FROM hy_partner_interview
WHERE id = #{interviewId}
</select>
<!-- 获取意向开店区域 -->
<select id="getVerifyCity" resultType="string">
SELECT want_shop_area
FROM hy_partner_intent_info
WHERE partner_id = #{partner_id}
SELECT area_path
FROM hy_open_area_info
WHERE id = (
SELECT want_shop_area
FROM hy_partner_intent_info
WHERE partner_id = #{partner_id}
)
</select>
<select id="selectByPrimaryKeySelective" resultType="com.cool.store.entity.HyPartnerInterviewDO">
select
@@ -343,4 +352,21 @@
</select>
<!-- 生成通过函 pdf 后修改 -->
<update id="updatePassLetterInfo">
UPDATE hy_partner_interview
<set>
<if test="passCode != null and passCode != ''">
pass_code = #{passCode},
</if>
<if test="passFileUrl != null and passFileUrl != ''">
pass_file_url = #{passFileUrl},
</if>
<if test="expiryDate != null and expiryDate != ''">
expiry_date = #{expiryDate}
</if>
</set>
WHERE id = #{interviewId}
</update>
</mapper>

View File

@@ -357,8 +357,11 @@
from hy_partner_line_info a inner join hy_partner_user_info b where a.partner_id = b.partner_id
where deleted = 0
and line_status = 3
<if test="keyWord!=null and keyWord !=''">
and (b.username like concat('%', #{keyWord}, '%') or b.mobile like concat('%', #{keyWord}, '%'))
<if test="userNameKeyword!=null and userNameKeyword !=''">
and b.username like concat('%', #{userNameKeyword}, '%')
</if>
<if test="phoneKeyword!=null and phoneKeyword !=''">
and b.mobile like concat('%', #{phoneKeyword}, '%')
</if>
<if test="intentArea!=null and intentArea!=''">
and b.want_shop_area = #{intentArea}
@@ -384,4 +387,67 @@
where id = #{lineId}
</update>
<select id="getByPartnerId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_line_info
where partner_id = #{partnerId}
</select>
<select id="getPublicSeaLineList" resultType="com.cool.store.dto.partner.PublicSeaLineDTO">
select
a.create_time as createTime,
b.partner_id as partner_id,
b.mobile as mobile,
b.username as userName,
b.want_shop_area as wantShopArea,
b.accept_adjust_type as acceptAdjustType
FROM hy_partner_line_info a inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
where a.line_status = 1
<if test="userNameKeyword!=null and userNameKeyword!=''">
and b.username like concat('%',#{userNameKeyword},'%')
</if>
<if test="phoneKeyword!=null and phoneKeyword!=''">
and b.mobile like concat('%',#{phoneKeyword},'%')
</if>
<if test="intentArea!=null and intentArea!=''">
and b.want_shop_area = #{intentArea}
</if>
<if test="acceptAdjustType!=null">
and b.accept_adjust_type = #{acceptAdjustType}
</if>
<if test="updateStartTime!=null and updateEndTime!=''">
and a.update_time BETWEEN #{updateStartTime} and #{updateEndTime}
</if>
<if test="userIdList!=null and userIdList.size>0">
<foreach collection="userIdList" item="userId" open="and a.investment_manager in (" close=")" separator=",">
#{userId}
</foreach>
</if>
</select>
<select id="getPartnerLastLine" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"></include>
FROM hy_partner_line_info h1
WHERE h1.create_time = (
SELECT MAX(h2.create_time)
FROM hy_partner_line_info h2
WHERE h1.partner_id = h2.partner_id
<if test="partnerIdList!=null and partnerIdList.size>0">
<foreach collection="partnerIdList" item="partnerId" open="and h1.partner_id in (" close=")" separator=",">
#{partnerId}
</foreach>
</if>
)
</select>
<select id="getFollowCountList" resultType="com.cool.store.dto.partner.LineCountDTO">
SELECT partner_id, COUNT(1) AS num_of_leads
FROM hy_partner_line_info
GROUP BY partner_id;
</select>
</mapper>

View File

@@ -147,4 +147,11 @@
</set>
where id = #{record.id}
</update>
<update id="updateJoinKnowById">
update hy_partner_user_info
set `is_write_partner_know`=#{isWritePartnerKnow,jdbcType=INTEGER}
where id=#{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -123,4 +123,12 @@
update user_region_mapping set deleted = 1 where user_id = #{userId}
</update>
<select id="getUserListByRegionId" resultType="string">
select user_id from user_region_mapping where region_id = #{regionId}
</select>
<select id="getRegionIdsByUserId" resultType="string">
select region_id from user_region_mapping where user_id = #{userId}
</select>
</mapper>