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
200136ac
Commit
200136ac
authored
May 20, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店自定义字段
parent
aecb7d8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+7
-3
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
200136ac
...
...
@@ -39,6 +39,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -1344,16 +1345,19 @@ public class StoreApiServiceImpl implements StoreApiService {
for
(
StoreExtendDTO
extendDTO
:
storeExtendDTOList
)
{
String
key
=
"enterprise:store:storeField:"
+
enterpriseId
+
":"
+
extendDTO
.
getStoreFieldId
();
Object
existObj
=
RedisUtil
.
getCache
(
key
);
if
(
existObj
!=
null
&&
extendDTO
.
getStoreFieldType
()
.
intValue
()
!=
StoreFieldTypeEnum
.
TEXT
.
getCode
())
{
if
(
extendDTO
.
getStoreFieldType
()
.
intValue
()
==
StoreFieldTypeEnum
.
DATE
.
getCode
())
{
if
(
existObj
!=
null
&&
extendDTO
.
getStoreFieldType
()
!=
StoreFieldTypeEnum
.
TEXT
.
getCode
())
{
if
(
extendDTO
.
getStoreFieldType
()
==
StoreFieldTypeEnum
.
DATE
.
getCode
())
{
String
value
=
null
;
if
(
StringUtils
.
isNotBlank
(
extendDTO
.
getValue
())){
value
=
extendDTO
.
getValue
().
replaceAll
(
"-"
,
""
).
replaceAll
(
":"
,
""
).
replaceAll
(
" "
,
""
);
}
jsonObject
.
put
(
existObj
.
toString
(),
value
==
null
?
0
l
:
Long
.
valueOf
(
value
));
}
else
if
(
extendDTO
.
getStoreFieldType
()
.
intValue
()
==
StoreFieldTypeEnum
.
CHECK
.
getCode
())
{
}
else
if
(
extendDTO
.
getStoreFieldType
()
==
StoreFieldTypeEnum
.
CHECK
.
getCode
())
{
jsonObject
.
put
(
existObj
.
toString
(),
StringUtils
.
isBlank
(
extendDTO
.
getValue
())
?
0
:
Stream
.
of
(
extendDTO
.
getValue
().
split
(
","
)).
map
(
Long:
:
valueOf
).
collect
(
Collectors
.
toList
()));
}
else
if
(
extendDTO
.
getStoreFieldType
()
==
StoreFieldTypeEnum
.
REAL_NUMBER
.
getCode
())
{
jsonObject
.
put
(
existObj
.
toString
(),
StringUtils
.
isBlank
(
extendDTO
.
getValue
())
?
0
:
new
BigDecimal
(
extendDTO
.
getValue
()).
multiply
(
new
BigDecimal
(
100000
)).
longValue
());
}
else
{
jsonObject
.
put
(
existObj
.
toString
(),
StringUtils
.
isBlank
(
extendDTO
.
getValue
())
?
0
:
Long
.
valueOf
(
extendDTO
.
getValue
()));
}
...
...
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