Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
59b4efa4
Commit
59b4efa4
authored
Jul 04, 2023
by
Mahjong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
专家处理商机,更新预约状态,给客户发送预约成功短信,小程序发送预约成功通知7
parent
3a766eb0
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
57 additions
and
14 deletions
+57
-14
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+17
-2
yd-api/src/main/java/com/yd/api/practitioner/vo/opportunity/OwnOpportunityDetailQueryRequestVO.java
+2
-0
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssignedTrack.java
+4
-2
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssigneds.java
+2
-3
yd-api/src/main/java/com/yd/dal/entity/practitioner/opportunity/OwnOpportunityInfo.java
+3
-2
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsPoolMapper.java
+1
-0
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsPoolDALServiceImpl.java
+5
-0
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsPoolDALService.java
+1
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
+5
-2
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedTrackMapper.xml
+5
-0
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedsMapper.xml
+4
-3
yd-api/src/main/resources/mapper/marketing/MktLeadsPoolMapper.xml
+8
-0
No files found.
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
59b4efa4
...
...
@@ -1017,7 +1017,12 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
info
.
setBloodType
(
mdDropOption
.
getDropOptionName
());
}
String
mktCampaign
=
customer
.
getMktCampaign
();
MktLeadsPool
pool
=
mktLeadsPoolDALService
.
findByCustomerId
(
customerId
);
MktLeadsPool
pool
=
null
;
if
(
null
!=
requestVO
.
getSfpMainId
()){
pool
=
mktLeadsPoolDALService
.
findBySfpMainId
(
requestVO
.
getSfpMainId
());
}
else
{
pool
=
mktLeadsPoolDALService
.
findByCustomerId
(
customerId
);
}
if
(
pool
!=
null
)
{
Integer
sourceFrom
=
pool
.
getSourceFrom
();
String
campaign
=
pool
.
getMktCampaign
();
...
...
@@ -1173,10 +1178,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
private
List
<
OpportunityRecordInfo
>
getOpportunityRecords
(
OwnOpportunityDetailQueryRequestVO
requestVO
)
{
Long
practitionerId
=
requestVO
.
getPractitionerId
();
Long
customerId
=
requestVO
.
getOpportunityId
();
Long
sfpMainId
=
requestVO
.
getSfpMainId
();
List
<
OpportunityRecordInfo
>
infos
=
new
ArrayList
<>();
MktLeadsAssignedTrack
mktLeadsAssignedTrack
=
new
MktLeadsAssignedTrack
();
mktLeadsAssignedTrack
.
setPractitionerId
(
practitionerId
);
mktLeadsAssignedTrack
.
setCustomerId
(
customerId
);
if
(
sfpMainId
!=
null
){
mktLeadsAssignedTrack
.
setSfpMainId
(
sfpMainId
);
}
PageHelper
.
orderBy
(
"track_time DESC , created_at DESC , updated_at DESC"
);
List
<
MktLeadsAssignedTrack
>
mktLeadsAssignedTracks
=
mktLeadsAssignedTrackDALService
.
findByMktLeadsAssignedTrack
(
mktLeadsAssignedTrack
);
List
<
MdDropOptions
>
dropOptionsList
=
mdDropOptionsDALService
.
findByDropMasterCode
(
"bizchance_promotion_action"
);
...
...
@@ -5100,7 +5110,12 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
mktLeadsAssigneds
.
setUpdatedBy
(
requestVO
.
getPractitionerId
());
mktLeadsAssignedsDALService
.
updateMktLeadsAssigneds
(
mktLeadsAssigneds
);
MktLeadsPool
pool
=
mktLeadsPoolDALService
.
findByCustomerId
(
mktLeadsAssigneds
.
getCustomerId
());
MktLeadsPool
pool
=
null
;
if
(
mktLeadsAssigneds
.
getSfpMainId
()
!=
null
){
pool
=
mktLeadsPoolDALService
.
findBySfpMainId
(
mktLeadsAssigneds
.
getSfpMainId
());
}
else
{
pool
=
mktLeadsPoolDALService
.
findByCustomerId
(
mktLeadsAssigneds
.
getCustomerId
());
}
if
(
pool
!=
null
)
{
pool
.
setIsActive
(
0
);
mktLeadsPoolDALService
.
updateMktLeadsAssigneds
(
pool
);
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/opportunity/OwnOpportunityDetailQueryRequestVO.java
View file @
59b4efa4
...
...
@@ -7,4 +7,6 @@ public class OwnOpportunityDetailQueryRequestVO {
private
Long
practitionerId
;
private
Long
opportunityId
;
//商机Id,客户的customerId
private
Long
orderId
;
private
Long
sfpMainId
;
//sfp商家专用
}
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssignedTrack.java
View file @
59b4efa4
...
...
@@ -110,5 +110,8 @@ public class MktLeadsAssignedTrack implements Serializable {
*/
private
String
informedStatus
;
private
Long
sfpMainId
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
}
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsAssigneds.java
View file @
59b4efa4
...
...
@@ -15,7 +15,7 @@ public class MktLeadsAssigneds {
* serial id
*/
private
Long
id
;
private
Long
sfpMainId
;
/**
* 经纪人id
*/
...
...
@@ -83,4 +83,4 @@ public class MktLeadsAssigneds {
* 更新者 FK ag_acl_user.id
*/
private
Long
updatedBy
;
}
\ No newline at end of file
}
yd-api/src/main/java/com/yd/dal/entity/practitioner/opportunity/OwnOpportunityInfo.java
View file @
59b4efa4
...
...
@@ -15,4 +15,6 @@ public class OwnOpportunityInfo {
private
Double
scoreDay
;
private
Double
scoreTotal
;
private
Long
expertType
;
//0.经纪人指派 1.专家指派
}
\ No newline at end of file
private
Long
sfpMainId
;
}
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsPoolMapper.java
View file @
59b4efa4
...
...
@@ -30,5 +30,6 @@ public interface MktLeadsPoolMapper {
List
<
LeadsStatusInfo
>
findLeadsStatusMap
();
MktLeadsPool
findByCustomerIdForSfp
(
Long
customerId
);
MktLeadsPool
findBySfpMainId
(
Long
sfpMainId
);
}
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsPoolDALServiceImpl.java
View file @
59b4efa4
...
...
@@ -67,4 +67,9 @@ public class MktLeadsPoolDALServiceImpl implements MktLeadsPoolDALService {
public
MktLeadsPool
findByCustomerIdForSfp
(
Long
customerId
)
{
return
mktLeadsPoolMapper
.
findByCustomerIdForSfp
(
customerId
);
}
@Override
public
MktLeadsPool
findBySfpMainId
(
Long
sfpMainId
)
{
return
mktLeadsPoolMapper
.
findBySfpMainId
(
sfpMainId
);
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsPoolDALService.java
View file @
59b4efa4
...
...
@@ -23,5 +23,6 @@ public interface MktLeadsPoolDALService {
void
updateMktLeadsAssigneds
(
MktLeadsPool
pool
);
MktLeadsPool
findByCustomerIdForSfp
(
Long
customerId
);
MktLeadsPool
findBySfpMainId
(
Long
sfpMainId
);
}
yd-api/src/main/resources/mapper/customer/AclPractitionerMapper.xml
View file @
59b4efa4
...
...
@@ -1516,6 +1516,8 @@
<result
column=
"scoreDay"
property=
"scoreDay"
/>
<result
column=
"scoreTotal"
property=
"scoreTotal"
/>
<result
column=
"expertType"
property=
"expertType"
/>
<result
column=
"sfpMainId"
property=
"sfpMainId"
/>
</resultMap>
<select
id=
"ownOpportunityQuery"
resultMap=
"opportunityQuery"
>
SELECT
...
...
@@ -1530,12 +1532,13 @@
(SELECT sum(t.track_score) from ag_mkt_leads_assigned_track t where t.leads_assigned_id = a.id and to_days(track_time) = to_days(now())) scoreDay,
if(ass.id is null ,0,1) expertType ,
p.remark remark,
p.appointment_record_id appointmentRecordId
p.appointment_record_id appointmentRecordId,
p.sfp_main_id sfpMainId
FROM
ag_mkt_leads_assigneds a
left join ag_mkt_leads_expert_request r on r.customer_id = a.customer_id and r.is_active =1
left join ag_mkt_leads_expert_assign ass on ass.leads_expert_request_id = r.id and ass.is_active =1
left join ag_mkt_leads_pool p ON p.customer_id = a.customer_id and p.is_active =1
left join ag_mkt_leads_pool p ON p.customer_id = a.customer_id and p.is_active =1
and p.sfp_main_id = a.sfp_main_id
left join ag_acl_customer c ON c.id = a.customer_id
where a.is_active=1
<if
test=
"practitionerId != null"
>
...
...
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedTrackMapper.xml
View file @
59b4efa4
...
...
@@ -22,6 +22,8 @@
<result
column=
"informed_oss_path"
jdbcType=
"VARCHAR"
property=
"informedOssPath"
/>
<result
column=
"informed_id"
jdbcType=
"BIGINT"
property=
"informedId"
/>
<result
column=
"informed_status"
jdbcType=
"VARCHAR"
property=
"informedStatus"
/>
<result
column=
"sfp_main_id"
jdbcType=
"BIGINT"
property=
"sfpMainId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, order_id, order_no, sales_notice, is_active, created_at, created_by, creator_type,
...
...
@@ -319,6 +321,9 @@
<if
test=
"trackTime != null"
>
and track_time = #{trackTime,jdbcType=TIMESTAMP}
</if>
<if
test=
"sfpMainId != null"
>
and sfp_main_id = #{sfpMainId,jdbcType=BIGINT}
</if>
</where>
</select>
<select
id=
"findByTrackTimeForNew"
resultMap=
"BaseResultMap"
>
...
...
yd-api/src/main/resources/mapper/marketing/MktLeadsAssignedsMapper.xml
View file @
59b4efa4
...
...
@@ -19,11 +19,13 @@
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
<result
column=
"updated_at"
jdbcType=
"TIMESTAMP"
property=
"updatedAt"
/>
<result
column=
"updated_by"
jdbcType=
"BIGINT"
property=
"updatedBy"
/>
<result
column=
"sfp_main_id"
jdbcType=
"BIGINT"
property=
"sfpMainId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, assigned_practitioner_id, customer_id, FYP, FYC, time_to_close, pieces, remark,
is_active, created_at, created_by, updated_at, updated_by
is_active, created_at, created_by, updated_at, updated_by
,sfp_main_id
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
...
...
@@ -309,4 +311,4 @@
where t.md_drop_option_id = #{dropOptionsId,jdbcType=BIGINT}
and a.id = t.leads_assigned_id)
</select>
</mapper>
\ No newline at end of file
</mapper>
yd-api/src/main/resources/mapper/marketing/MktLeadsPoolMapper.xml
View file @
59b4efa4
...
...
@@ -279,4 +279,12 @@
and a.appointment_record_id is not null
and a.is_active=1
</select>
<select
id=
"findBySfpMainId"
resultType=
"com.yd.dal.entity.marketing.MktLeadsPool"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_mkt_leads_pool
where sfp_main_id = #{customerId,jdbcType=BIGINT}
and is_active=1
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment