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
27fe082e
Commit
27fe082e
authored
Jan 04, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/base_platform_enterprise/gic-store
into developer
parents
90a8c4f9
ff159578
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
10 deletions
+28
-10
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
TabClerkMapper.xml
...tore-service/src/main/resources/mapper/TabClerkMapper.xml
+5
-2
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
27fe082e
...
...
@@ -1593,14 +1593,22 @@ public class StoreApiServiceImpl implements StoreApiService {
if
(
StringUtils
.
isNotBlank
(
storeSearchDTO
.
getStoreTags
())){
String
[]
arr
=
storeSearchDTO
.
getStoreTags
().
split
(
","
);
List
<
TabStoreTag
>
storeTags
=
this
.
storeTagService
.
listByEnterprise
(
storeSearchDTO
.
getEnterpriseId
());
storeTags
.
stream
().
filter
(
tag
->
{
List
<
Integer
>
storeWidgetList
=
storeTags
.
stream
().
filter
(
tag
->
{
for
(
String
s
:
arr
)
{
if
(
tag
.
getStoreTagId
()
.
intValue
()
==
Integer
.
valueOf
(
s
))
{
if
(
tag
.
getStoreTagId
()
==
Integer
.
parseInt
(
s
))
{
return
true
;
}
}
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
);
/*****如果存在没有门店权限的门店控件id,直接返回*****/
...
...
@@ -1758,7 +1766,7 @@ public class StoreApiServiceImpl implements StoreApiService {
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
){
StoreWidgetDTO
storeWidget
=
this
.
storeWidgetService
.
getStoreWidget
(
storeWidgetId
.
intValue
());
if
(
storeWidget
!=
null
){
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreWidgetApiServiceImpl.java
View file @
27fe082e
...
...
@@ -17,7 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
/**
*
...
...
@@ -160,7 +162,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
return
EnterpriseServiceResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
List
<
StoreDTO
>
list
=
serviceResponse
.
getResult
().
getResult
();
List
<
Integer
>
brandIdList
=
new
ArrayLis
t
<>();
Set
<
Integer
>
brandIdList
=
new
HashSe
t
<>();
List
<
StoreBrandDTO
>
brandList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
for
(
StoreDTO
storeDTO
:
list
)
{
...
...
@@ -168,7 +170,7 @@ public class StoreWidgetApiServiceImpl implements StoreWidgetApiService {
brandIdList
.
addAll
(
storeDTO
.
getStoreBrandIdList
());
}
}
List
<
TabStoreBrand
>
tabStoreBrands
=
storeBrandService
.
listStoreBrandByIds
(
brandIdList
);
List
<
TabStoreBrand
>
tabStoreBrands
=
storeBrandService
.
listStoreBrandByIds
(
new
ArrayList
<>(
brandIdList
)
);
brandList
=
EntityUtil
.
changeEntityListByJSON
(
StoreBrandDTO
.
class
,
tabStoreBrands
);
}
return
EnterpriseServiceResponse
.
success
(
brandList
);
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StoreStatusStrategyImpl.java
View file @
27fe082e
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.service.CardAscriptionConfigService
;
import
com.gic.spark.api.service.SparkJobApiService
;
...
...
@@ -112,10 +113,14 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
storeSearchDbDTO
.
setStoreInfoIdList
(
storeInfoIdHasNotClerkMsgList
);
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
(),
CollectionUtils
.
isNotEmpty
(
storeInfoIdListNew
)
?
storeInfoIdListNew
.
size
()
:
0
,
msg
);
);
JSONObject
object
=
new
JSONObject
();
object
.
put
(
"msg"
,
format
);
object
.
put
(
"json"
,
this
.
storeService
.
listStoredByStoreInfoList
(
storeInfoIdHasNotClerkMsgList
,
enterpriseId
));
return
object
.
toJSONString
();
}
}
gic-store-service/src/main/resources/mapper/TabClerkMapper.xml
View file @
27fe082e
...
...
@@ -351,8 +351,11 @@
select
<include
refid=
"Base_Column_List"
/>
from tab_clerk
where enterprise_id = #{enterpriseId}
and store_info_id = #{storeInfoId}
where
store_info_id = #{storeInfoId}
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
and position_id = 1
limit 1
</select>
...
...
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