Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -28,4 +28,95 @@
|
||||
update_time,
|
||||
audit_stage
|
||||
</sql>
|
||||
<select id="checkList" resultType="com.cool.store.response.CheckListResponse">
|
||||
SELECT
|
||||
a.id AS checkId,
|
||||
a.line_id as lineId,
|
||||
a.interview_id as interviewId,
|
||||
a.audit_status as checkStatus,
|
||||
a.audit_stage,
|
||||
a.audit_user_id,
|
||||
a.audit_user_name as checkUser,
|
||||
a.create_time,
|
||||
a.update_time AS checkTime,
|
||||
l.id AS line_id,
|
||||
l.partner_id,
|
||||
l.region_id AS line_region_id,
|
||||
l.mobile AS mobile,
|
||||
l.username as interviewName,
|
||||
l.sex,
|
||||
l.want_shop_area_id as wantRegion,
|
||||
l.live_address,
|
||||
l.workflow_stage,
|
||||
l.workflow_sub_stage,
|
||||
l.workflow_sub_stage_status,
|
||||
l.want_shop_num,
|
||||
l.select_site_num,
|
||||
l.prepare_shop_num,
|
||||
l.open_shop_num,
|
||||
l.line_source,
|
||||
l.investment_manager as investmentId,
|
||||
l.development_manager,
|
||||
l.first_interviewer,
|
||||
l.second_interviewer,
|
||||
l.user_portrait,
|
||||
l.join_status,
|
||||
l.line_status,
|
||||
l.create_time AS line_create_time,
|
||||
l.update_time AS line_update_time,
|
||||
l.create_user_id,
|
||||
l.update_user_id,
|
||||
l.deleted,
|
||||
l.partner_num,
|
||||
i.id AS interview_id,
|
||||
i.interview_date,
|
||||
i.start_time,
|
||||
i.end_time,
|
||||
i.join_interview_status,
|
||||
i.actual_start_time,
|
||||
i.actual_end_time,
|
||||
i.room_id,
|
||||
i.room_password,
|
||||
i.interviewer_user_id as intervieweeId,
|
||||
i.room_status,
|
||||
i.interview_status,
|
||||
i.interview_type,
|
||||
i.video_url,
|
||||
i.audit_id AS interview_audit_id,
|
||||
i.calendars_event_id,
|
||||
i.deleted AS interview_deleted,
|
||||
i.create_time AS interview_create_time,
|
||||
i.update_time AS interview_update_time,
|
||||
lai.create_time AS intervieweePassTime
|
||||
FROM
|
||||
xfsg_audit_status a
|
||||
LEFT JOIN
|
||||
xfsg_line_info l ON a.line_id = l.id
|
||||
LEFT JOIN
|
||||
xfsg_line_interview i ON a.interview_id = i.id
|
||||
LEFT JOIN
|
||||
xfsg_line_audit_info lai ON lai.id = i.audit_id
|
||||
<where>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
l.username = #{keyWord}
|
||||
OR l.mobile = #{keyWord}
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
AND lai.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
<if test="region != null and region != ''">
|
||||
AND l.want_shop_area_id = #{region}
|
||||
</if>
|
||||
<if test="checkStatus != null">
|
||||
AND a.audit_status = #{checkStatus}
|
||||
</if>
|
||||
<if test="checkStage != null">
|
||||
AND a.audit_stage = #{checkStage}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -314,7 +314,7 @@
|
||||
|
||||
<select id="listByInvestmentManager" resultMap="BaseResultMap">
|
||||
select * from xfsg_line_info
|
||||
where deleted = 0
|
||||
where deleted = 0 and line_status = 1
|
||||
<if test="investmentManagerUserId != null and investmentManagerUserId != ''">
|
||||
and investment_manager = #{investmentManagerUserId}
|
||||
</if>
|
||||
@@ -329,12 +329,12 @@
|
||||
|
||||
<select id="listByInterview" resultMap="BaseResultMap">
|
||||
select * from xfsg_line_info
|
||||
where deleted = 0
|
||||
where deleted = 0 and line_status = 1
|
||||
<if test="interviewType != null and interviewType == 1">
|
||||
and first_interviewer = #{interviewId}
|
||||
and investment_manager = #{interviewId}
|
||||
</if>
|
||||
<if test="interviewType != null and interviewType == 2">
|
||||
and second_interviewer = #{interviewId}
|
||||
and investment_manager = #{interviewId}
|
||||
</if>
|
||||
<if test="codes !=null and codes.size>0">
|
||||
<foreach collection="codes" item="code" open="and workflow_sub_stage_status in (" close=")" separator=",">
|
||||
@@ -346,15 +346,15 @@
|
||||
|
||||
<select id="pendingCount" resultType="com.cool.store.dto.PendingCountDTO">
|
||||
SELECT
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status = 5, 1, 0 ) ) AS intendPendingCount,
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status = 5, 1, 0 ) ) AS intendPendingCount,
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status = 20, 1, 0 ) ) AS interviewPendingCount,
|
||||
sum( IF ( first_interviewer = #{userId} AND workflow_sub_stage_status IN ( 30, 35, 40 ), 1, 0 ) ) AS firstInterviewPendingCount,
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status IN ( 30, 40 ), 1, 0 ) ) AS firstInterviewPendingCount,
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status = 50, 1, 0 ) ) AS payStagePendingCount,
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status IN ( 63, 70, 80 ), 1, 0 ) ) AS signingPendingCount,
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status IN ( 85, 90 ), 1, 0 ) ) AS storeExperiencePendingCount,
|
||||
sum( IF ( second_interviewer = #{userId} AND workflow_sub_stage_status IN ( 105, 110, 115 ), 1, 0 ) ) AS secondInterviewPendingCount
|
||||
sum( IF ( investment_manager = #{userId} AND workflow_sub_stage_status IN ( 105, 115 ), 1, 0 ) ) AS secondInterviewPendingCount
|
||||
FROM
|
||||
xfsg_line_info where deleted = 0
|
||||
xfsg_line_info where deleted = 0 and line_status = 1
|
||||
</select>
|
||||
|
||||
<select id="lineList" resultMap="BaseResultMap">
|
||||
@@ -416,10 +416,10 @@
|
||||
and b.area_path like concat('%',#{wantShopAreaName},'%')
|
||||
</if>
|
||||
<if test="request.queryUserId!=null and request.queryUserId!=''">
|
||||
<if test="request.queryType != null and request.queryType == '1' ">
|
||||
<if test="request.queryType != null and request.queryType == 1 ">
|
||||
and a.investment_manager = #{request.queryUserId}
|
||||
</if>
|
||||
<if test="request.queryType != null and request.queryType == '2' ">
|
||||
<if test="request.queryType != null and request.queryType == 2 ">
|
||||
and a.development_manager = #{request.queryUserId}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user