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
fdcff98f
Commit
fdcff98f
authored
Dec 03, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!42
parents
2a569516
a1d05f46
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+12
-4
StoreWidgetApiServiceImpl.java
...c/store/service/outer/impl/StoreWidgetApiServiceImpl.java
+4
-2
StoreStatusStrategyImpl.java
.../com/gic/store/strategy/impl/StoreStatusStrategyImpl.java
+7
-2
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
fdcff98f
...
@@ -1593,14 +1593,22 @@ public class StoreApiServiceImpl implements StoreApiService {
...
@@ -1593,14 +1593,22 @@ public class StoreApiServiceImpl implements StoreApiService {
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreTags
())){
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreTags
())){
String
[]
arr
=
storeSearchDTO
.
getStoreTags
().
split
(
","
);
String
[]
arr
=
storeSearchDTO
.
getStoreTags
().
split
(
","
);
List
<
TabStoreTag
>
storeTags
=
this
.
storeTagService
.
listByEnterprise
(
storeSearchDTO
.
getEnterpriseId
());
List
<
TabStoreTag
>
storeTags
=
this
.
storeTagService
.
listByEnterprise
(
storeSearchDTO
.
getEnterpriseId
());
storeTags
.
stream
().
filter
(
tag
->
{
List
<
Integer
>
storeWidgetList
=
storeTags
.
stream
().
filter
(
tag
->
{
for
(
String
s
:
arr
)
{
for
(
String
s
:
arr
)
{
if
(
tag
.
getStoreTagId
()
.
intValue
()
==
Integer
.
valueOf
(
s
))
{
if
(
tag
.
getStoreTagId
()
==
Integer
.
parseInt
(
s
))
{
return
true
;
return
true
;
}
}
}
}
return
false
;
return
false
;
}).
map
(
tag
->
storeSearchDTO
.
getStoreResourceList
().
add
(
tag
.
getStoreTagId
()));
}).
map
(
TabStoreTag:
:
getStoreWidgetId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
storeWidgetList
)){
List
<
JSONObject
>
jsonObjectOrList
=
new
ArrayList
<>();
for
(
Integer
storeResource
:
storeWidgetList
)
{
String
s
=
this
.
buildStoreWidgetJson
(
storeResource
,
json
,
jsonObjectOrList
);
}
JSONObject
object
=
QueryConditionAssemblyUtil
.
createListQueryNode
(
jsonObjectOrList
,
OperateEnum
.
OPERATE_OR
);
jsonObjectList
.
add
(
object
);
}
}
}
String
storeWidgetJson
=
this
.
buildStoreWidgetJson
(
storeSearchDTO
.
getStoreResource
()
==
null
?
null
:
storeSearchDTO
.
getStoreResource
().
intValue
(),
json
,
jsonObjectList
);
String
storeWidgetJson
=
this
.
buildStoreWidgetJson
(
storeSearchDTO
.
getStoreResource
()
==
null
?
null
:
storeSearchDTO
.
getStoreResource
().
intValue
(),
json
,
jsonObjectList
);
/*****如果存在没有门店权限的门店控件id,直接返回*****/
/*****如果存在没有门店权限的门店控件id,直接返回*****/
...
@@ -1758,7 +1766,7 @@ public class StoreApiServiceImpl implements StoreApiService {
...
@@ -1758,7 +1766,7 @@ public class StoreApiServiceImpl implements StoreApiService {
return
json
;
return
json
;
}
}
private
String
buildStoreWidgetJson
(
Integer
storeWidgetId
,
JSONObject
json
,
List
<
JSONObject
>
jsonObjectList
){
private
String
buildStoreWidgetJson
(
Integer
storeWidgetId
,
JSONObject
json
,
List
<
JSONObject
>
jsonObjectList
){
if
(
storeWidgetId
!=
null
){
if
(
storeWidgetId
!=
null
){
StoreWidgetDTO
storeWidget
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
.
intValue
());
StoreWidgetDTO
storeWidget
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
.
intValue
());
if
(
storeWidget
!=
null
){
if
(
storeWidget
!=
null
){
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreWidgetApiServiceImpl.java
View file @
fdcff98f
...
@@ -17,7 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -17,7 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
/**
/**
*
*
...
@@ -160,7 +162,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
...
@@ -160,7 +162,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
return
EnterpriseServiceResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
return
EnterpriseServiceResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
}
List
<
StoreDTO
>
list
=
serviceResponse
.
getResult
().
getResult
();
List
<
StoreDTO
>
list
=
serviceResponse
.
getResult
().
getResult
();
List
<
Integer
>
brandIdList
=
new
ArrayLis
t
<>();
Set
<
Integer
>
brandIdList
=
new
HashSe
t
<>();
List
<
StoreBrandDTO
>
brandList
=
new
ArrayList
<>();
List
<
StoreBrandDTO
>
brandList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
StoreDTO
storeDTO
:
list
)
{
for
(
StoreDTO
storeDTO
:
list
)
{
...
@@ -168,7 +170,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
...
@@ -168,7 +170,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
brandIdList
.
addAll
(
storeDTO
.
getStoreBrandIdList
());
brandIdList
.
addAll
(
storeDTO
.
getStoreBrandIdList
());
}
}
}
}
List
<
TabStoreBrand
>
tabStoreBrands
=
storeBrandService
.
listStoreBrandByIds
(
brandIdList
);
List
<
TabStoreBrand
>
tabStoreBrands
=
storeBrandService
.
listStoreBrandByIds
(
new
ArrayList
<>(
brandIdList
)
);
brandList
=
EntityUtil
.
changeEntityListByJSON
(
StoreBrandDTO
.
class
,
tabStoreBrands
);
brandList
=
EntityUtil
.
changeEntityListByJSON
(
StoreBrandDTO
.
class
,
tabStoreBrands
);
}
}
return
EnterpriseServiceResponse
.
success
(
brandList
);
return
EnterpriseServiceResponse
.
success
(
brandList
);
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StoreStatusStrategyImpl.java
View file @
fdcff98f
package
com
.
gic
.
store
.
strategy
.
impl
;
package
com
.
gic
.
store
.
strategy
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.member.config.api.dto.UserOwnerDefaultDTO
;
import
com.gic.member.config.api.dto.UserOwnerDefaultDTO
;
import
com.gic.member.config.api.service.CardAscriptionConfigService
;
import
com.gic.member.config.api.service.CardAscriptionConfigService
;
import
com.gic.spark.api.service.SparkJobApiService
;
import
com.gic.spark.api.service.SparkJobApiService
;
...
@@ -112,10 +113,14 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
...
@@ -112,10 +113,14 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
storeSearchDbDTO
.
setStoreInfoIdList
(
storeInfoIdHasNotClerkMsgList
);
storeSearchDbDTO
.
setStoreInfoIdList
(
storeInfoIdHasNotClerkMsgList
);
String
msg
=
storeService
.
listStore
(
storeSearchDbDTO
,
1
,
Integer
.
MAX_VALUE
).
stream
().
map
(
StoreDTO:
:
getStoreName
).
collect
(
Collectors
.
joining
(
","
));
String
msg
=
storeService
.
listStore
(
storeSearchDbDTO
,
1
,
Integer
.
MAX_VALUE
).
stream
().
map
(
StoreDTO:
:
getStoreName
).
collect
(
Collectors
.
joining
(
","
));
return
String
.
format
(
"共选中%d家门店,%d家成功启用,%s下无可用导购,无法启用门店,请在门店下至少新建或启用一个导购"
,
String
format
=
String
.
format
(
"共选中%d家门店,%d家成功启用,%s下无可用导购,无法启用门店,请在门店下至少新建或启用一个导购"
,
storeInfoIdList
.
size
(),
storeInfoIdList
.
size
(),
CollectionUtils
.
isNotEmpty
(
storeInfoIdListNew
)
?
storeInfoIdListNew
.
size
()
:
0
,
CollectionUtils
.
isNotEmpty
(
storeInfoIdListNew
)
?
storeInfoIdListNew
.
size
()
:
0
,
msg
msg
);
);
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"msg"
,
format
);
object
.
put
(
"json"
,
this
.
storeService
.
listStoredByStoreInfoList
(
storeInfoIdHasNotClerkMsgList
,
enterpriseId
));
return
object
.
toJSONString
();
}
}
}
}
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