B端 部分接口
This commit is contained in:
@@ -32,6 +32,14 @@
|
||||
work_exp, is_consumer, other_band, brand_strength, need_improve, strength, weakness,
|
||||
create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_intent_info
|
||||
<where>
|
||||
and id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_partner_intent_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -243,4 +251,41 @@
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<select id="selectPartnerIntentApplyInfoList" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
|
||||
select
|
||||
a.id as partnerLineId,
|
||||
a.partner_id as partnerId,
|
||||
a.workflow_stage as workflowStage,
|
||||
a.workflow_status as workflowStatus,
|
||||
b.id as id,
|
||||
b.create_time as partnerSubmitTime,
|
||||
b.live_area as liveArea,
|
||||
b.want_shop_area as wantShopArea,
|
||||
b.accept_adjust_type as acceptAdjustType,
|
||||
b.deadline as deadline
|
||||
from hy_partner_intent_info b left join hy_partner_line_info a on a.id = b.partner_line_id
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and a.investment_manager = #{userId}
|
||||
</if>
|
||||
<if test="workflowStage!=null and workflowStage!=''">
|
||||
and a.workflow_stage= #{workflowStage}
|
||||
</if>
|
||||
<if test="workflowStatus!=null and workflowStatus!=''">
|
||||
and a.workflow_status = #{workflowStatus}
|
||||
</if>
|
||||
</where>
|
||||
order by b.create_time
|
||||
</select>
|
||||
|
||||
<select id="selectByLineId" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_intent_info
|
||||
<where>
|
||||
and partner_line_id = #{lineId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -172,4 +172,69 @@
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<select id="getCurrentDateInterviewCount" resultType="java.lang.Integer">
|
||||
select count(1) from hy_partner_interview_plan
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and interviewer = #{userId}
|
||||
</if>
|
||||
<if test="currentDate!=null and currentDate!=''">
|
||||
and interview_date = #{currentDate}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
|
||||
select
|
||||
sum(if(interview_date=#{currentDate},1,0)) as currentDayInterviewCount,
|
||||
sum(if(start_time>#{startTime} and #{endTime},1,0)) as lastSevenDayInterviewCount
|
||||
FROM hy_partner_interview_plan
|
||||
where interviewer = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="getInterviewPlanList" resultMap="BaseResultMap">
|
||||
select * from hy_partner_interview_plan
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and interviewer = #{userId}
|
||||
</if>
|
||||
<if test="currentDate!=null and currentDate!=''">
|
||||
and interview_date = #{currentDate}
|
||||
</if>
|
||||
and (start_time>now() or (start_time<![CDATA[<]]>now() and room_status!=2))
|
||||
order by start_time
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getPartnerInterviewInfoList" resultType="com.cool.store.dto.partner.PartnerInterviewInfoDTO">
|
||||
select
|
||||
a.id as id,
|
||||
a.deadline as deadline,
|
||||
a.status as status,
|
||||
a.auth_code as authCode,
|
||||
a.approve_time as approveTime,
|
||||
a.process_info as processInfo,
|
||||
b.id as interviewId,
|
||||
b.partner_line_id as partnerLineId,
|
||||
b.partner_id as partnerId,
|
||||
b.start_time as startTime,
|
||||
b.end_time as endTime,
|
||||
b.interviewer as interviewer,
|
||||
b.create_time as createTime,
|
||||
b.room_id as roomId
|
||||
from hy_partner_interview a inner join hy_partner_interview_plan b on a.interview_plan_id = b.id
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and a.interviewer = #{userId}
|
||||
</if>
|
||||
<if test="workflowStage!=null and workflowStage!=''">
|
||||
and a.workflow_stage= #{workflowStage}
|
||||
</if>
|
||||
<if test="workflowStatus!=null and workflowStatus!=''">
|
||||
and a.workflow_status = #{workflowStatus}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -27,6 +27,49 @@
|
||||
reject_real_reason, certify_file, deleted, create_time, update_time, close_time,
|
||||
close_user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_line_info
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="batchInsert">
|
||||
insert into
|
||||
hy_partner_line_info
|
||||
(
|
||||
partner_id,
|
||||
workflow_stage,
|
||||
workflow_status,
|
||||
line_status,
|
||||
investment_manager
|
||||
)
|
||||
values
|
||||
<foreach collection="recordList" item="record" separator=",">
|
||||
(#{record.partnerId},
|
||||
#{record.workflowStage},
|
||||
#{record.workflowStatus},
|
||||
#{record.lineStatus},
|
||||
#{record.investmentManager})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="batchDeleted">
|
||||
update hy_partner_line_info
|
||||
set deleted = 1
|
||||
<where>
|
||||
<if test="lineIdList!=null and lineIdList.size>0">
|
||||
<foreach collection="lineIdList" open="and id in (" close=")" separator="," item="lineId">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_partner_line_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -193,4 +236,104 @@
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<select id="getAdventLineCount" resultType="java.lang.Integer">
|
||||
select count(1) from hy_partner_line_info
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and investment_manager = #{userId}
|
||||
</if>
|
||||
<if test="currentDate!=null and currentDate!=''">
|
||||
and deadline = #{currentDate}
|
||||
</if>
|
||||
and
|
||||
(
|
||||
(workflow_stage = 1 and workflow_status = 0) or
|
||||
(workflow_stage = 2 and workflow_status = 0) or
|
||||
(workflow_stage = 3 and workflow_status = 4)
|
||||
)
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStagePendingCount" resultType="com.cool.store.dto.partner.StageCountDTO">
|
||||
select
|
||||
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
|
||||
IFNULL(sum(if(workflow_stage=3 and workflow_status = 3,1,0)),0) as qualifiedInterviewCount
|
||||
from hy_partner_line_info
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and investment_manager = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectStageFollowCount" resultType="com.cool.store.dto.partner.StageCountDTO">
|
||||
select
|
||||
IFNULL(sum(if(workflow_stage=1 and workflow_status = 1,1,0)),0) as intentApplyApproveCount,
|
||||
IFNULL(sum(if(workflow_stage=2 and workflow_status = 0,1,0)),0) as reservationInterviewCount,
|
||||
IFNULL(sum(if(workflow_stage=3 and workflow_status = 4,1,0)),0) as qualifiedInterviewCount
|
||||
from hy_partner_line_info
|
||||
<where>
|
||||
<if test="userId!=null and userId!=''">
|
||||
and investment_manager = #{userId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPartnerLineInfoAndBaseInfo" resultType="com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO">
|
||||
select
|
||||
a.id as id,
|
||||
a.partner_id as partnerId,
|
||||
a.workflow_stage as workflowStage,
|
||||
a.workflow_status as workflowStatus,
|
||||
a.partner_id as partnerUserId,
|
||||
a.investment_manager as investmentManager,
|
||||
b.user_portrait as user_portrait
|
||||
from hy_partner_line_info a inner join hy_partner_base_info b
|
||||
on a.id = b.partner_line_id
|
||||
<where>
|
||||
<if test="lineId!=null">
|
||||
and a.id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="lastMonthCloseLine" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_line_info
|
||||
<where>
|
||||
<if test="userId">
|
||||
and investment_manager = #{userId}
|
||||
</if>
|
||||
<if test="lastMonthTodayDate!=null">
|
||||
and close_time > #{lastMonthTodayDate} and close_time <![CDATA[<]]> now
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateInvestmentManager">
|
||||
update hy_partner_line_info
|
||||
set investment_manager = #{userId}
|
||||
<if test="lineIdList!=null and lineIdList.size>0">
|
||||
<foreach collection="lineIdList" open="where id in (" close=")" separator="," item="lineId">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="getLineListByLineIds" resultMap="BaseResultMap" >
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_line_info
|
||||
where deleted = 0
|
||||
<if test="lineIdList!=null and lineIdList.size>0">
|
||||
<foreach collection="lineIdList" open="and id in (" close=")" separator="," item="lineId">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -18,6 +18,25 @@
|
||||
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
|
||||
invite_code, is_write_partner_know, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPartnerId" resultMap="BaseResultMap" >
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_user_info
|
||||
where partner_id = #{partnerId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectByPartnerIds" resultMap="BaseResultMap" >
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_user_info
|
||||
<if test="partnerIdList!=null and partnerIdList.size>0">
|
||||
<foreach collection="partnerIdList" open="and partner_id in (" close=")" separator="," item="partnerId">
|
||||
#{partnerId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_partner_user_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
Reference in New Issue
Block a user