Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
6e4c0b54
Commit
6e4c0b54
authored
May 22, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量重新同步导购
parent
1580a9fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
ClerkApiService.java
.../src/main/java/com/gic/store/service/ClerkApiService.java
+12
-0
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+36
-0
No files found.
gic-store-api/src/main/java/com/gic/store/service/ClerkApiService.java
View file @
6e4c0b54
...
...
@@ -185,4 +185,16 @@ public interface ClerkApiService {
ServiceResponse
<
Void
>
syncClerkToWeimob
(
Integer
wmMallStoreId
,
List
<
Integer
>
storeIdList
,
Integer
enterpriseId
);
ServiceResponse
<
Void
>
syncClerkToWeimobTask
(
String
param
);
/**
* 同步失败的重新同步导购
* @Title: syncClerkToWeimobOfAdd
* @Description:
* @author guojuxing
* @param wmMallStoreId
* @param clerkIds
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
*/
ServiceResponse
<
Void
>
syncClerkToWeimob
(
Integer
wmMallStoreId
,
String
clerkIds
,
Integer
enterpriseId
);
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
6e4c0b54
...
...
@@ -680,6 +680,42 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Void
>
syncClerkToWeimob
(
Integer
wmMallStoreId
,
String
clerkIds
,
Integer
enterpriseId
)
{
if
(
StringUtils
.
isBlank
(
clerkIds
))
{
return
ServiceResponse
.
success
();
}
List
<
TabClerk
>
clerkList
=
clerkService
.
listClerkByIds
(
enterpriseId
,
clerkIds
);
if
(
CollectionUtils
.
isNotEmpty
(
clerkList
))
{
List
<
Integer
>
storeInfoIdList
=
clerkList
.
stream
().
map
(
e
->
e
.
getStoreInfoId
()).
collect
(
Collectors
.
toList
());
Map
<
String
,
String
>
storeInfoIdMapStoreCode
=
new
HashMap
<>(
16
);
//查询门店,为了获取门店code
if
(
CollectionUtils
.
isNotEmpty
(
storeInfoIdList
))
{
StoreSearchDBDTO
storeSearchDBDTO
=
new
StoreSearchDBDTO
();
storeSearchDBDTO
.
setStoreInfoIdList
(
storeInfoIdList
);
com
.
github
.
pagehelper
.
Page
<
StoreDTO
>
storePage
=
storeService
.
listStore
(
storeSearchDBDTO
,
0
,
storeInfoIdList
.
size
());
if
(
storePage
!=
null
)
{
List
<
StoreDTO
>
storeList
=
storePage
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
storeList
.
forEach
(
store
->
storeInfoIdMapStoreCode
.
put
(
store
.
getStoreInfoId
().
toString
(),
store
.
getStoreName
()));
}
}
}
clerkList
.
forEach
(
clerkTemp
->
{
WeimobGuiderSynDTO
weimobGuiderSynDTO
=
new
WeimobGuiderSynDTO
();
weimobGuiderSynDTO
.
setStoreNumber
(
storeInfoIdMapStoreCode
.
get
(
clerkTemp
.
getStoreInfoId
().
toString
()));
weimobGuiderSynDTO
.
setClerkId
(
clerkTemp
.
getClerkId
());
weimobGuiderSynDTO
.
setGuiderName
(
clerkTemp
.
getClerkName
());
weimobGuiderSynDTO
.
setGuiderPhone
(
clerkTemp
.
getPhoneNumber
());
weimobGuiderSynDTO
.
setJobNumber
(
clerkTemp
.
getClerkCode
());
weimobGuiderSynDTO
.
setStoreInfoId
(
clerkTemp
.
getStoreInfoId
());
asynClerkInfoToWeimobMQ
(
wmMallStoreId
,
enterpriseId
,
weimobGuiderSynDTO
);
});
}
return
ServiceResponse
.
success
();
}
private
void
asynClerkInfoToWeimobMQ
(
Integer
wmMallStoreId
,
Integer
enterpriseId
,
WeimobGuiderSynDTO
wmGuiderDTO
)
{
GicMQClient
client
=
GICMQClientUtil
.
getClientInstance
();
Map
<
String
,
Object
>
params
=
new
HashMap
<>(
4
);
...
...
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