Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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-platform-enterprise
Commits
c3d1df13
Commit
c3d1df13
authored
May 22, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量重新同步门店
parent
70c684e0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
9 deletions
+77
-9
WmStoreSyncLogDTO.java
...ain/java/com/gic/enterprise/dto/wm/WmStoreSyncLogDTO.java
+8
-8
WmStoreSyncLogApiService.java
.../com/gic/enterprise/service/WmStoreSyncLogApiService.java
+2
-0
TabWmStoreSyncLogMapper.java
...om/gic/enterprise/dao/mapper/TabWmStoreSyncLogMapper.java
+3
-0
WmStoreSyncLogService.java
...ava/com/gic/enterprise/service/WmStoreSyncLogService.java
+2
-0
WmStoreSyncLogServiceImpl.java
...ic/enterprise/service/impl/WmStoreSyncLogServiceImpl.java
+5
-0
WmStoreSyncLogApiServiceImpl.java
...rise/service/outer/impl/WmStoreSyncLogApiServiceImpl.java
+9
-0
TabWmStoreSyncLogMapper.xml
...ice/src/main/resources/mapper/TabWmStoreSyncLogMapper.xml
+12
-0
WmStoreSyncController.java
...c/enterprise/web/controller/wm/WmStoreSyncController.java
+36
-1
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/wm/WmStoreSyncLogDTO.java
View file @
c3d1df13
...
...
@@ -30,12 +30,12 @@ public class WmStoreSyncLogDTO implements Serializable{
/**
*
*/
private
String
storeId
;
private
Integer
storeId
;
/**
* 1:总店 2:门店同步(实体)
*/
private
Integer
t
ype
;
private
Integer
storeT
ype
;
/**
* 门店名称
...
...
@@ -89,21 +89,21 @@ public class WmStoreSyncLogDTO implements Serializable{
return
this
;
}
public
String
getStoreId
()
{
public
Integer
getStoreId
()
{
return
storeId
;
}
public
WmStoreSyncLogDTO
setStoreId
(
String
storeId
)
{
public
WmStoreSyncLogDTO
setStoreId
(
Integer
storeId
)
{
this
.
storeId
=
storeId
;
return
this
;
}
public
Integer
getType
()
{
return
t
ype
;
public
Integer
get
Store
Type
()
{
return
storeT
ype
;
}
public
WmStoreSyncLogDTO
set
Type
(
Integer
t
ype
)
{
this
.
type
=
t
ype
;
public
WmStoreSyncLogDTO
set
StoreType
(
Integer
storeT
ype
)
{
this
.
storeType
=
storeT
ype
;
return
this
;
}
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/WmStoreSyncLogApiService.java
View file @
c3d1df13
...
...
@@ -69,4 +69,6 @@ public interface WmStoreSyncLogApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.enterprise.dto.wm.WmStoreSyncLogDTO>>
*/
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
listByStoreId
(
Integer
storeId
,
Integer
enterpriseId
);
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabWmStoreSyncLogMapper.java
View file @
c3d1df13
...
...
@@ -62,4 +62,6 @@ public interface TabWmStoreSyncLogMapper {
int
deleteLogic
(
@Param
(
"storeId"
)
Integer
storeId
,
@Param
(
"wmMallStoreId"
)
Integer
wmMallStoreId
);
List
<
TabWmStoreSyncLog
>
listByStoreId
(
@Param
(
"storeId"
)
Integer
storeId
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
List
<
TabWmStoreSyncLog
>
listByStoreIdList
(
@Param
(
"storeIdList"
)
List
<
Integer
>
storeIdList
,
@Param
(
"wmMallStoreId"
)
Integer
wmMallStoreId
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/WmStoreSyncLogService.java
View file @
c3d1df13
...
...
@@ -19,4 +19,6 @@ public interface WmStoreSyncLogService {
int
deleteLogic
(
Integer
storeId
,
Integer
wmMallStoreId
);
List
<
TabWmStoreSyncLog
>
listByStoreId
(
Integer
storeId
,
Integer
enterpriseId
);
List
<
TabWmStoreSyncLog
>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/WmStoreSyncLogServiceImpl.java
View file @
c3d1df13
...
...
@@ -56,4 +56,9 @@ public class WmStoreSyncLogServiceImpl implements WmStoreSyncLogService {
public
List
<
TabWmStoreSyncLog
>
listByStoreId
(
Integer
storeId
,
Integer
enterpriseId
)
{
return
tabWmStoreSyncLogMapper
.
listByStoreId
(
storeId
,
enterpriseId
);
}
@Override
public
List
<
TabWmStoreSyncLog
>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
)
{
return
tabWmStoreSyncLogMapper
.
listByStoreIdList
(
storeIdList
,
wmMallStoreId
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/WmStoreSyncLogApiServiceImpl.java
View file @
c3d1df13
...
...
@@ -80,4 +80,13 @@ public class WmStoreSyncLogApiServiceImpl implements WmStoreSyncLogApiService {
}
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
WmStoreSyncLogDTO
.
class
,
list
));
}
@Override
public
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
listByStoreId
(
List
<
Integer
>
storeIdList
,
Integer
wmMallStoreId
)
{
List
<
TabWmStoreSyncLog
>
list
=
wmStoreSyncLogService
.
listByStoreId
(
storeIdList
,
wmMallStoreId
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
ServiceResponse
.
success
(
Collections
.
emptyList
());
}
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
WmStoreSyncLogDTO
.
class
,
list
));
}
}
gic-platform-enterprise-service/src/main/resources/mapper/TabWmStoreSyncLogMapper.xml
View file @
c3d1df13
...
...
@@ -193,4 +193,15 @@
and enterprise_id = #{enterpriseId}
group by wm_mall_store_id
</select>
<select
id=
"listByStoreIdList"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_wm_store_sync_log
where status = 1
and store_id in
<foreach
collection=
"storeIdList"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
and wm_mall_store_id = #{wmMallStoreId}
</select>
</mapper>
\ No newline at end of file
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/wm/WmStoreSyncController.java
View file @
c3d1df13
...
...
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.dto.wm.WmStoreSyncLogDTO
;
import
com.gic.enterprise.web.vo.wm.WmBranchVO
;
import
com.gic.weimob.api.dto.WeimobGuiderSynDTO
;
import
com.gic.weimob.api.dto.WeimobStoreGicInfoDTO
;
...
...
@@ -205,7 +206,7 @@ public class WmStoreSyncController {
wmStoreSyncLogApiService
.
saveWmStoreSyncLog
(
Arrays
.
asList
(
headStoreId
),
wmMallStoreId
,
1
,
enterpriseId
);
//同步导购
List
<
Integer
>
storeIdList
=
new
ArrayList
<>();
if
(
isBranch
)
{
if
(
!
isBranch
)
{
storeIdList
.
add
(
headStoreId
);
}
storeIdList
.
addAll
(
getListByStr
(
storeIds
));
...
...
@@ -289,6 +290,40 @@ public class WmStoreSyncController {
}
/**
* 批量重新同步门店
* @param storeInfoIds
* @param wmMallStoreId
* @return
*/
@RequestMapping
(
"/sync-store-to-wm-again"
)
public
RestResponse
syncStoreToWmAgain
(
String
storeInfoIds
,
Integer
wmMallStoreId
)
{
//区分是一对一还是总店
List
<
StoreDTO
>
storeList
=
getStoreList
(
storeInfoIds
,
true
);
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
List
<
Integer
>
storeIdList
=
storeList
.
stream
().
map
(
e
->
e
.
getStoreId
()).
collect
(
Collectors
.
toList
());
ServiceResponse
<
List
<
WmStoreSyncLogDTO
>>
wmStoreLogResult
=
wmStoreSyncLogApiService
.
listByStoreId
(
storeIdList
,
wmMallStoreId
);
if
(
wmStoreLogResult
.
isSuccess
())
{
List
<
WmStoreSyncLogDTO
>
wmStoreLogList
=
wmStoreLogResult
.
getResult
();
List
<
Integer
>
headStoreIdList
=
wmStoreLogList
.
stream
()
.
filter
(
e
->
e
.
getStoreType
().
intValue
()
==
1
)
.
map
(
e
->
e
.
getStoreId
())
.
collect
(
Collectors
.
toList
());
//同步总店
headStoreIdList
.
forEach
(
head
->
{
LOGGER
.
info
(
"批量重新同步门店(总店):{}"
,
JSON
.
toJSONString
(
syncHeadStore
(
wmMallStoreId
,
head
,
null
,
false
)));
});
StringBuilder
storeIds
=
new
StringBuilder
();
wmStoreLogList
.
stream
().
filter
(
e
->
e
.
getStoreType
().
intValue
()
==
2
)
.
map
(
e
->
e
.
getStoreId
())
.
forEach
(
storeId
->
storeIds
.
append
(
storeId
).
append
(
","
));
LOGGER
.
info
(
"批量重新同步门店(一对一):{}"
,
JSON
.
toJSONString
(
weimobInitStore
(
wmMallStoreId
,
storeIds
.
toString
())));
}
}
return
RestResponse
.
success
();
}
/**
* 门店错误日志-不处理
* @Title: deleteStoreClerkErrorLog
* @Description:
...
...
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