Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
4224ccb5
Commit
4224ccb5
authored
Mar 18, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通过消息队列批量保存跟进记录
parent
342c6371
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
0 deletions
+108
-0
ContactFollowBatchQDTO.java
...aoban/manage/api/qdto/contact/ContactFollowBatchQDTO.java
+58
-0
ContactFollowApiService.java
...n/manage/api/service/contact/ContactFollowApiService.java
+6
-0
ContactFollowApiServiceImpl.java
...service/out/impl/contact/ContactFollowApiServiceImpl.java
+44
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/qdto/contact/ContactFollowBatchQDTO.java
0 → 100644
View file @
4224ccb5
package
com
.
gic
.
haoban
.
manage
.
api
.
qdto
.
contact
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
public
class
ContactFollowBatchQDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
973688857967269974L
;
/**
* 会员id
*/
private
List
<
String
>
memberIdList
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 跟进记录
*/
private
String
followRemark
;
/**
* 跟进时间
*/
private
Date
followTime
;
public
List
<
String
>
getMemberIdList
()
{
return
memberIdList
;
}
public
void
setMemberIdList
(
List
<
String
>
memberIdList
)
{
this
.
memberIdList
=
memberIdList
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
String
getFollowRemark
()
{
return
followRemark
;
}
public
void
setFollowRemark
(
String
followRemark
)
{
this
.
followRemark
=
followRemark
;
}
public
Date
getFollowTime
()
{
return
followTime
;
}
public
void
setFollowTime
(
Date
followTime
)
{
this
.
followTime
=
followTime
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/contact/ContactFollowApiService.java
View file @
4224ccb5
...
...
@@ -25,6 +25,12 @@ public interface ContactFollowApiService {
ServiceResponse
<
Void
>
saveBatchFollow
(
List
<
ContactFollowQDTO
>
list
);
/**
* 通过消息队列批量保存跟进记录
* @param message
* @return
*/
ServiceResponse
<
Void
>
saveBatchFollowForMQ
(
String
message
);
/**
* 跟进记录列表查询
* @param enterpriseId
* @param searchQDTO
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/contact/ContactFollowApiServiceImpl.java
View file @
4224ccb5
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
contact
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.manage.api.dto.contact.ContactFollowDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactFollowBatchQDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactFollowQDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactFollowSearchQDTO
;
import
com.gic.haoban.manage.api.service.contact.ContactFollowApiService
;
import
com.gic.haoban.manage.service.service.contact.ContactFollowService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* Created by wangzubo on 2022/11/1.
...
...
@@ -22,6 +32,8 @@ public class ContactFollowApiServiceImpl implements ContactFollowApiService {
@Autowired
private
ContactFollowService
contactFollowService
;
@Autowired
private
ClerkService
clerkService
;
@Override
public
ServiceResponse
<
Void
>
saveFollow
(
ContactFollowQDTO
qdto
)
{
...
...
@@ -36,6 +48,38 @@ public class ContactFollowApiServiceImpl implements ContactFollowApiService {
}
@Override
public
ServiceResponse
<
Void
>
saveBatchFollowForMQ
(
String
message
)
{
if
(
StringUtils
.
isBlank
(
message
))
{
return
ServiceResponse
.
success
();
}
ContactFollowBatchQDTO
qdto
=
JSONObject
.
parseObject
(
message
,
ContactFollowBatchQDTO
.
class
);
List
<
String
>
memberIdList
=
qdto
.
getMemberIdList
();
if
(
CollectionUtils
.
isEmpty
(
memberIdList
))
{
return
ServiceResponse
.
success
();
}
String
clerkId
=
qdto
.
getClerkId
();
if
(
StringUtils
.
isBlank
(
clerkId
))
{
return
ServiceResponse
.
success
();
}
ClerkDTO
clerkDTO
=
clerkService
.
getclerkById
(
clerkId
);
if
(
clerkDTO
==
null
)
{
return
ServiceResponse
.
success
();
}
List
<
ContactFollowQDTO
>
list
=
memberIdList
.
stream
().
map
(
x
->
{
ContactFollowQDTO
followQDTO
=
new
ContactFollowQDTO
();
followQDTO
.
setMemberId
(
x
);
followQDTO
.
setClerkId
(
clerkId
);
followQDTO
.
setClerkCode
(
clerkDTO
.
getClerkCode
());
followQDTO
.
setFollowRemark
(
clerkDTO
.
getClerkName
()
+
qdto
.
getFollowRemark
());
followQDTO
.
setFollowTime
(
qdto
.
getFollowTime
());
followQDTO
.
setEnterpriseId
(
clerkDTO
.
getEnterpriseId
());
return
followQDTO
;
}).
collect
(
Collectors
.
toList
());
saveBatchFollow
(
list
);
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Page
<
ContactFollowDTO
>>
pageFollow
(
String
enterpriseId
,
ContactFollowSearchQDTO
searchQDTO
,
BasePageInfo
pageInfo
)
{
Page
<
ContactFollowDTO
>
page
=
contactFollowService
.
pageFollow
(
enterpriseId
,
searchQDTO
,
pageInfo
);
return
ServiceResponse
.
success
(
page
);
...
...
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