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

This commit is contained in:
俞扬
2023-06-20 11:49:29 +08:00
86 changed files with 1237 additions and 1751 deletions

View File

@@ -280,4 +280,12 @@
</if>
</where>
</select>
<select id="getUserCountByRegionId" resultType="integer">
select count(1) from enterprise_user where deleted = 0 and user_region_ids like concat("%", #{regionId}, "%")
</select>
<select id="getUserListByDeptLeader" resultMap="BaseResultMap">
select user_id, leader_dept_ids from enterprise_user where leader_dept_ids like concat("%", #{regionId}, "%") and deleted = 0
</select>
</mapper>

View File

@@ -128,4 +128,13 @@
where type = #{type}
and deleted = 0
</select>
<select id="getZoneInfoByRegionIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
hy_intend_dev_zone_info
where
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId">associated_region_id like concat("%", #{regionId}, "%")</foreach>
</select>
</mapper>

View File

@@ -18,6 +18,11 @@
id, parent_id, area_name, area_path, background_banner, detail_banner, area_status,
deleted, create_time, update_time, update_user_id
</sql>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from id = #{id}
</select>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyOpenAreaInfoDO" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_open_area_info
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -242,6 +247,22 @@
</where>
</select>
<select id="getChildrenCount" resultType="java.lang.Integer">
select count(1) from
hy_open_area_info
<where>
<if test="parentId!=null">
and parent_id = #{parentId}
</if>
<if test="type!=null and type == 'apply'">
and (area_status = 'open' or area_status = 'keyOpen')
</if>
<if test="type!=null and type == 'reservation'">
and (area_status='notOpen' or area_status = 'saturated')
</if>
</where>
</select>
<select id="selectByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>

View File

@@ -213,8 +213,8 @@
<if test="mobile != null and mobile!=''">
mobile = #{mobile},
</if>
where partner_id = #{partnerId}
</set>
where partner_id = #{partnerId}
</update>
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
@@ -224,6 +224,13 @@
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
</select>
<select id="getByPartnerLineId" resultMap="BaseResultMap" >
select
<include refid="Base_Column_List"></include>
from hy_partner_base_info
where partner_line_id = #{partnerLineId}
</select>
<select id="getLineIdByIdCard" resultType="java.lang.Long">
select
partner_line_id

View File

@@ -169,6 +169,12 @@
<if test="record.partnership != null">
partnership = #{record.partnership},
</if>
<if test="record.qualifyVerifyId != null">
qualify_verify_id = #{record.qualifyVerifyId},
</if>
<if test="record.intentionContractNo != null">
intention_contract_no = #{record.intentionContractNo},
</if>
<if test="record.wantSignTime != null">
want_sign_time = #{record.wantSignTime},
</if>
@@ -215,6 +221,21 @@
update_time = #{record.updateTime},
</if>
</set>
where id = #{record.id}
<where>
1 = 0
<if test="record.id != null">
or id = #{record.id}
</if>
<if test="record.partnerLineId != null">
or partner_id_line_id = #{record.partnerLineId}
</if>
</where>
</update>
<!-- 根据资质审核流程 id 获取面试会议 id -->
<select id="getInterviewIdByQualifyVerifyId" resultType="java.lang.String">
select partner_interview_id
from hy_partner_certification_info
where qualify_verify_id = #{qualifyVerifyId}
</select>
</mapper>

View File

@@ -220,8 +220,17 @@
<if test="authCode != null">
auth_code = #{authCode},
</if>
<if test="passFileUrl != null">
pass_file_url = #{passFileUrl},
<if test="passCode != null">
pass_code = #{passCode},
</if>
<if test="passPdfUrl != null">
pass_pdf_url = #{passPdfUrl},
</if>
<if test="passImageUrl != null">
pass_image_url = #{passImageUrl},
</if>
<if test="passTime != null">
pass_time = #{passTime},
</if>
<if test="expiryDate != null">
expiry_date = #{expiryDate},
@@ -250,11 +259,16 @@
<if test="interviewerEnterTime != null">
interviewer_enter_time = #{interviewerEnterTime},
</if>
<if test="qualifyVerifyId != null">
qualify_verify_id = #{qualifyVerifyId},
</if>
</set>
where id = #{id}
<where>
1 = 0
<if test="id != null">
or id = #{id}
</if>
<if test="interviewPlanId != null">
or interview_plan_id = #{interviewPlanId}
</if>
</where>
</update>
<!-- 根据加盟商id查询面试信息 -->
@@ -338,7 +352,7 @@
select
<include refid="Base_Column_List"/>
from
hy_partner_intent_info
hy_partner_interview
where
id = #{interviewId}
@@ -364,4 +378,19 @@
WHERE id = #{interviewId}
</update>
<!-- 根据 interviewId 获取意向区域 -->
<select id="getVerifyCityByInterviewId" resultType="java.lang.String">
SELECT area_path
FROM hy_open_area_info
WHERE id = (
SELECT want_shop_area
FROM hy_partner_intent_info
WHERE partner_line_id = (
SELECT partner_line_id
FROM hy_partner_interview
WHERE id = #{interviewId}
)
)
</select>
</mapper>

View File

@@ -247,41 +247,44 @@
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">
select hpip.id as interviewPlanId,
hpip.partner_id as partnerId,
hpui.username as partnerName,
hpui.mobile as partnerMobile,
hpip.room_id as roomId,
hpip.start_time as startTime,
hpui.username as interviewerName,
hpui.mobile as interviewerMobile,
hpip.interviewer as interviewerId,
eu.name as interviewerName,
eu.mobile as interviewerMobile,
hpip.room_status as roomStatus,
hpip.end_time as endTime
from hy_partner_interview_plan hpip
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
left join enterprise_user eu on hpip.interviewer = eu.user_id
<where>
<if test="record.partnerName !=null and record.partnerName!=''">
hpui.username like concat('%',#{record.partnerName},'%')
</if>
<if test="record.partnerMobile !=null and record.partnerMobile!=''">
hpui.mobile like concat('%',#{record.partnerMobile},'%')
and hpui.mobile like concat('%',#{record.partnerMobile},'%')
</if>
<if test="record.roomId !=null and record.roomId!=''">
hpip.room_id = #{record.roomId}
and hpip.room_id = #{record.roomId}
</if>
<if test="record.interviewerName !=null and record.interviewerName!=''">
hpui.username like concat('%',#{record.interviewerName},'%')
and hpui.username like concat('%',#{record.interviewerName},'%')
</if>
<if test="record.interviewerMobile !=null and record.interviewerMobile!=''">
hpui.mobile like concat('%',#{record.interviewerMobile},'%')
and hpui.mobile like concat('%',#{record.interviewerMobile},'%')
</if>
<if test="record.roomStatus !=null and record.roomStatus!=''">
hpip.room_status = #{record.roomStatus}
and hpip.room_status = #{record.roomStatus}
</if>
<if test="record.startTime !=null and record.startTime!=''">
hpip.start_time &lt;= #{record.startTime}
and hpip.start_time &gt;= #{record.startTime}
</if>
<if test="record.endTime !=null and record.endTime!=''">
hpip.end_time &gt;= #{record.endTime}
and hpip.end_time &lt;= #{record.endTime}
</if>
</where>
@@ -289,7 +292,8 @@
<select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO">
select hpip.id as interviewPlanId,
hpi.id as interviewId,
hpi.qualify_verify_id as qualifyVerifyId,
hpci.qualify_verify_id as qualifyVerifyId,
hpci.intention_contract_no as intentionContractNo,
hpi.pass_time as passTime,
hpi.pass_reason as passReason,
hpi.recorder as recorderId,
@@ -317,6 +321,7 @@
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
left join hy_partner_interview hpi on hpip.id = hpi.interview_plan_id
left join hy_partner_certification_info hpci on hpci.partner_interview_id = hpi.id
where hpip.id = #{interviewPlanId}
</select>
<select id="selectBySelective" resultType="com.cool.store.entity.HyPartnerInterviewPlanDO">

View File

@@ -359,9 +359,9 @@
a.close_user_id as closeUserId,
a.close_time as closeTime,
a.join_black_reason as joinBlackReason
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
from hy_partner_line_info a inner join hy_partner_user_info b on a.partner_id = b.partner_id
where a.deleted = 0
and a.line_status = 3
<if test="userNameKeyword!=null and userNameKeyword !=''">
and b.username like concat('%', #{userNameKeyword}, '%')
</if>
@@ -494,6 +494,11 @@
#{userId}
</foreach>
</if>
<if test="developmentManagerList!=null and developmentManagerList.size>0">
<foreach collection="developmentManagerList" item="developmentManager" open="and a.development_manager in (" close=")" separator=",">
#{developmentManager}
</foreach>
</if>
</select>

View File

@@ -204,4 +204,8 @@
<update id="deleteRegionByRegionId">
update region set deleted = 1 where region_id = #{regionId}
</update>
<select id="getSubRegionIds" resultType="string">
select region_id from region where deleted = 0 and <foreach collection="regionPathList" item="regionPath" open="(" close=")" separator="or"> region_path like (#{regionPath, '%'})</foreach>
</select>
</mapper>

View File

@@ -131,4 +131,8 @@
select region_id from user_region_mapping where user_id = #{userId}
</select>
<select id="getUserListByRegionIds" resultType="string">
select user_id from user_region_mapping where region_id in <foreach collection="regionIds" item="regionId" open="(" close=")" separator=",">#{regionId}</foreach>
</select>
</mapper>