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
90896028
Commit
90896028
authored
May 18, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
6cb718f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
+17
-1
StoreController.java
...in/java/com/gic/store/web/controller/StoreController.java
+17
-1
No files found.
gic-store-web/src/main/java/com/gic/store/web/controller/StoreController.java
View file @
90896028
...
...
@@ -296,13 +296,29 @@ public class StoreController extends DownloadUtils {
}
@RequestMapping
(
"bulk-update-store"
)
public
RestResponse
bulkUpdateStatus
(
String
storeIds
,
String
value
,
int
type
,
String
toStoreId
)
{
public
RestResponse
bulkUpdateStatus
(
String
storeIds
,
String
value
,
int
type
,
Integer
toStoreId
)
{
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
if
(
StringUtils
.
isBlank
(
storeIds
)
||
StringUtils
.
isBlank
(
value
))
{
return
EnterpriseRestResponse
.
failure
(
ErrorCode
.
MISS_PARAMETER
);
}
ServiceResponse
response
=
this
.
storeApiService
.
bulkUpdateStore
(
storeIds
,
value
,
enterpriseId
,
type
,
UserDetailUtils
.
getUserDetail
().
getUserId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getUserName
());
if
(
response
.
isSuccess
())
{
if
(
type
==
1
&&
toStoreId
!=
null
)
{
// 如果是批量修改状态 要转移门店
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setStoreIds
(
storeIds
.
replace
(
','
,
' '
));
List
<
String
>
list
=
this
.
storeApiService
.
listStore
(
storeSearchDTO
,
1
,
1000
,
"storeInfoId"
).
getResult
().
getResult
()
.
stream
().
map
(
e
->
e
.
getStoreInfoId
().
toString
()).
collect
(
Collectors
.
toList
());
Integer
storeInfoId
=
storeApiService
.
getStoreById
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
toStoreId
).
getResult
().
getStoreInfoId
();
StoreBatchUpdateDTO
storeBatchUpdateDTO
=
new
StoreBatchUpdateDTO
();
storeBatchUpdateDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
storeBatchUpdateDTO
.
setSourceStoreInfoIdList
(
list
);
storeBatchUpdateDTO
.
setTargetStoreInfoId
(
storeInfoId
+
""
);
storeBatchUpdateDTO
.
setUserId
(
UserDetailUtils
.
getUserDetail
().
getUserId
());
logger
.
info
(
"transfer-store-member:{}"
,
JSON
.
toJSONString
(
storeBatchUpdateDTO
));
this
.
storeUpdateApiService
.
storeBatchUpdate
(
storeBatchUpdateDTO
);
}
// 写日志
String
[]
storeArr
=
storeIds
.
split
(
","
);
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
...
...
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