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
fe932328
Commit
fe932328
authored
Feb 27, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
3701fcd6
9db6cc4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
StoreOpenApiServiceImpl.java
...gic/store/service/outer/impl/StoreOpenApiServiceImpl.java
+8
-2
FieldBase.java
...ce/src/main/java/com/gic/store/utils/field/FieldBase.java
+1
-1
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreOpenApiServiceImpl.java
View file @
fe932328
...
...
@@ -87,7 +87,7 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
return
ServiceResponse
.
success
();
}
p
rivate
Map
<
String
,
String
>
getApiFieldMap
(
Integer
enterpriseId
,
Integer
regionId
)
{
p
ublic
Map
<
String
,
String
>
getApiFieldMap
(
Integer
enterpriseId
,
Integer
regionId
)
{
ServiceResponse
<
List
<
ApiFieldDTO
>>
result
=
apiFieldApiService
.
listApiField
(
2
,
enterpriseId
,
Long
.
parseLong
(
regionId
.
toString
()));
if
(
result
.
isSuccess
())
{
List
<
ApiFieldDTO
>
list
=
result
.
getResult
();
...
...
@@ -239,6 +239,7 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
List
<
StoreBusinessTimeDTO
>
businessTimeResultList
=
new
ArrayList
<>();
for
(
BusinessTimeOpenDTO
businessTimeOpenDTO
:
businessTimeList
)
{
StoreBusinessTimeDTO
businessTimeDTO
=
new
StoreBusinessTimeDTO
();
businessTimeDTO
.
setWeekday
(
businessTimeOpenDTO
.
getWeekday
());
businessTimeDTO
.
setOpenTime
(
DateUtil
.
strToDate
(
businessTimeOpenDTO
.
getOpenTime
(),
DateUtil
.
FORMAT_MINUTE_TIME
));
businessTimeDTO
.
setCloseTime
(
DateUtil
.
strToDate
(
businessTimeOpenDTO
.
getCloseTime
(),
DateUtil
.
FORMAT_MINUTE_TIME
));
businessTimeResultList
.
add
(
businessTimeDTO
);
...
...
@@ -256,6 +257,7 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
for
(
String
imageUrl
:
photoList
)
{
StorePhotoDTO
storePhotoDTO
=
new
StorePhotoDTO
();
storePhotoDTO
.
setImageUrl
(
imageUrl
);
photoResultList
.
add
(
storePhotoDTO
);
}
storeDTO
.
setPhotoList
(
photoResultList
);
}
...
...
@@ -307,7 +309,11 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
storeDTO
.
setReason
(
StoreLogReasonEnum
.
EXTERNAL
.
getCode
());
storeDTO
.
setCreateType
(
CreateTypeEnum
.
API
.
getCode
());
if
(
storeDTO
.
getStoreExtendList
()
==
null
)
{
storeDTO
.
setStoreExtendList
(
Collections
.
emptyList
());
}
// 保存门店
// return null;
ServiceResponse
<
Integer
>
serviceResponse
=
storeApiService
.
saveOrUpdate
(
storeDTO
);
if
(!
serviceResponse
.
isSuccess
())
{
return
EnterpriseServiceResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
@@ -329,7 +335,7 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
if
(
storeOpenDTO
.
getRegionId
()
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"门店域不能为空"
);
}
TabStore
oldStore
=
this
.
storeService
.
getByStoreCodeAndRegionId
(
storeOpenDTO
.
getEnterpriseId
()
,
storeOpenDTO
.
getRegionId
(),
storeOpenDTO
.
getStoreCode
());
TabStore
oldStore
=
this
.
storeService
.
getByStoreCodeAndRegionId
(
enterpriseId
,
storeOpenDTO
.
getRegionId
(),
storeOpenDTO
.
getStoreCode
());
if
(
oldStore
!=
null
)
{
storeOpenDTO
.
setStoreId
(
oldStore
.
getStoreId
());
}
else
{
...
...
gic-store-service/src/main/java/com/gic/store/utils/field/FieldBase.java
View file @
fe932328
...
...
@@ -49,7 +49,7 @@ public class FieldBase {
}
public
String
validate
(
String
value
){
if
(
getIsMust
()
&&
(
StringUtils
.
is
Not
Blank
(
value
)))
{
if
(
getIsMust
()
&&
(
StringUtils
.
isBlank
(
value
)))
{
return
"不能为空"
;
}
else
{
return
null
;
...
...
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