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
731ecde7
Commit
731ecde7
authored
Apr 07, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店标签兼容
parent
278b5289
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+41
-4
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
731ecde7
...
...
@@ -98,6 +98,8 @@ public class StoreApiServiceImpl implements StoreApiService {
private
StoreIndexLogService
storeIndexLogService
;
@Autowired
private
ClerkApiService
clerkApiService
;
@Autowired
private
StoreTagService
storeTagService
;
private
Map
<
String
,
BulkUpdateStoreStrtegy
>
storeStrtegyMap
=
new
ConcurrentHashMap
<>();
...
...
@@ -533,10 +535,45 @@ public class StoreApiServiceImpl implements StoreApiService {
List
<
JSONObject
>
jsonObjectList
=
new
ArrayList
<>();
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++){
JSONObject
data
=
list
.
getJSONObject
(
j
);
data
.
put
(
"type"
,
"data"
);
String
compute
=
data
.
getJSONObject
(
"data"
).
getString
(
"compute"
);
if
(
OperateEnum
.
OPERATE_BETWEEN
.
getValue
().
equals
(
compute
)){
data
.
getJSONObject
(
"data"
).
put
(
"value"
,
data
.
getJSONObject
(
"data"
).
getString
(
"value"
).
replaceAll
(
" "
,
","
));
String
key
=
data
.
getString
(
"key"
);
if
(
StoreESFieldsEnum
.
STORETAG
.
getField
().
equals
(
key
)){
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"type"
,
OperateEnum
.
OPERATE_OR
.
getValue
());
List
<
JSONObject
>
listTag
=
new
ArrayList
<>();
String
[]
valueArr
=
data
.
getString
(
"value"
).
split
(
" "
);
for
(
String
s
:
valueArr
){
JSONObject
_json
=
new
JSONObject
();
_json
.
put
(
"type"
,
OperateEnum
.
OPERATE_AND
.
getValue
());
List
<
JSONObject
>
_list
=
new
ArrayList
<>();
TabStoreTag
storeTag
=
this
.
storeTagService
.
getById
(
Integer
.
valueOf
(
s
));
if
(
storeTag
==
null
)
continue
;
StoreWidgetDTO
storeWidget
=
this
.
storeWidgetService
.
getStoreWidget
(
storeTag
.
getStoreWidgetId
());
if
(
storeWidget
==
null
)
continue
;
if
(
StringUtils
.
isNotBlank
(
storeWidget
.
getAuthSearchParam
())
&&
!
"{}"
.
equals
(
storeWidget
.
getAuthSearchParam
())){
ServiceResponse
<
JSONObject
>
response
=
this
.
parseStoreSelectJson
(
storeWidget
.
getAuthSearchParam
());
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
_list
.
add
(
response
.
getResult
());
}
}
if
(
StringUtils
.
isNotBlank
(
storeWidget
.
getSearchParam
())
&&
!
"{}"
.
equals
(
storeWidget
.
getSearchParam
())){
ServiceResponse
<
JSONObject
>
response
=
this
.
parseStoreSelectJson
(
storeWidget
.
getSearchParam
());
if
(
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
){
_list
.
add
(
response
.
getResult
());
}
}
_json
.
put
(
"list"
,
_list
);
listTag
.
add
(
_json
);
}
json
.
put
(
"list"
,
listTag
);
list
.
getJSONObject
(
j
).
clear
();
list
.
getJSONObject
(
j
).
put
(
"type"
,
OperateEnum
.
OPERATE_OR
.
getValue
());
list
.
getJSONObject
(
j
).
put
(
"list"
,
listTag
);
}
else
{
data
.
put
(
"type"
,
"data"
);
String
compute
=
data
.
getJSONObject
(
"data"
).
getString
(
"compute"
);
if
(
OperateEnum
.
OPERATE_BETWEEN
.
getValue
().
equals
(
compute
)){
data
.
getJSONObject
(
"data"
).
put
(
"value"
,
data
.
getJSONObject
(
"data"
).
getString
(
"value"
).
replaceAll
(
" "
,
","
));
}
}
jsonObjectList
.
add
(
data
);
}
...
...
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