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
fbcb4358
Commit
fbcb4358
authored
Mar 24, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修bug
parent
26abbd9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
StoreExtendService.java
...c/main/java/com/gic/store/service/StoreExtendService.java
+1
-1
StoreExtendServiceImpl.java
...va/com/gic/store/service/impl/StoreExtendServiceImpl.java
+4
-4
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+4
-1
No files found.
gic-store-service/src/main/java/com/gic/store/service/StoreExtendService.java
View file @
fbcb4358
...
...
@@ -10,7 +10,7 @@ import java.util.List;
* @date 2019/7/3
*/
public
interface
StoreExtendService
{
void
saveOrUpdate
(
Integer
enterpriseId
,
Integer
storeInfoId
,
List
<
StoreExtendDTO
>
storeExtendList
);
String
saveOrUpdate
(
Integer
enterpriseId
,
Integer
storeInfoId
,
List
<
StoreExtendDTO
>
storeExtendList
);
List
<
TabStoreExtend
>
listByStoreInfoId
(
Integer
enterpriseId
,
Integer
storeInfoId
);
...
...
gic-store-service/src/main/java/com/gic/store/service/impl/StoreExtendServiceImpl.java
View file @
fbcb4358
...
...
@@ -2,8 +2,6 @@ package com.gic.store.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.CommonException
;
import
com.gic.store.dao.mapper.TabStoreExtendMapper
;
import
com.gic.store.dto.StoreExtendDTO
;
import
com.gic.store.entity.TabStoreExtend
;
...
...
@@ -36,7 +34,7 @@ public class StoreExtendServiceImpl implements StoreExtendService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveOrUpdate
(
Integer
enterpriseId
,
Integer
storeInfoId
,
List
<
StoreExtendDTO
>
storeExtendList
)
{
public
String
saveOrUpdate
(
Integer
enterpriseId
,
Integer
storeInfoId
,
List
<
StoreExtendDTO
>
storeExtendList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
storeExtendList
))
{
this
.
tabStoreExtendMapper
.
delete
(
enterpriseId
,
storeInfoId
);
...
...
@@ -51,7 +49,7 @@ public class StoreExtendServiceImpl implements StoreExtendService {
if
(
StringUtils
.
isNotBlank
(
tabStoreExtend
.
getValue
()))
{
int
count
=
tabStoreExtendMapper
.
countExtendByValue
(
field
.
getStoreFieldId
(),
tabStoreExtend
.
getValue
(),
tabStoreExtend
.
getStoreExtendId
());
if
(
count
>
0
)
{
throw
new
CommonException
(
ErrorCode
.
OPERATION_FAILED
.
getCode
(),
field
.
getStoreFieldName
()
+
"不允许重复"
)
;
return
field
.
getStoreFieldName
()
+
"不允许重复"
;
}
}
}
...
...
@@ -61,11 +59,13 @@ public class StoreExtendServiceImpl implements StoreExtendService {
// if (tabStoreExtend.getStoreExtendId() == null) {
tabStoreExtend
.
setCreateTime
(
new
Date
());
tabStoreExtendMapper
.
insertSelective
(
tabStoreExtend
);
// } else {
// tabStoreExtendMapper.updateByPrimaryKeySelective(tabStoreExtend);
// }
}
}
return
null
;
}
@Override
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
fbcb4358
...
...
@@ -167,7 +167,10 @@ public class StoreApiServiceImpl implements StoreApiService {
}
}
// 自定义属性
storeExtendService
.
saveOrUpdate
(
storeDTO
.
getEnterpriseId
(),
storeDTO
.
getStoreInfoId
(),
storeDTO
.
getStoreExtendList
());
String
error
=
storeExtendService
.
saveOrUpdate
(
storeDTO
.
getEnterpriseId
(),
storeDTO
.
getStoreInfoId
(),
storeDTO
.
getStoreExtendList
());
if
(
StringUtils
.
isNotBlank
(
error
))
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
OPERATION_FAILED
.
getCode
(),
error
);
}
// 门店图片
List
<
Integer
>
delPhotos
=
null
;
if
(
StringUtils
.
isNotEmpty
(
storeDTO
.
getDelPhotos
()))
{
...
...
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