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
1a0d2321
Commit
1a0d2321
authored
Sep 01, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店照片
parent
1f24a7ed
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
21 deletions
+18
-21
TabStorePhotoMapper.java
...in/java/com/gic/store/dao/mapper/TabStorePhotoMapper.java
+1
-1
StorePhotoService.java
...rc/main/java/com/gic/store/service/StorePhotoService.java
+2
-2
StoreBusinessTimeServiceImpl.java
.../gic/store/service/impl/StoreBusinessTimeServiceImpl.java
+4
-5
StorePhotoServiceImpl.java
...ava/com/gic/store/service/impl/StorePhotoServiceImpl.java
+11
-13
No files found.
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabStorePhotoMapper.java
View file @
1a0d2321
...
@@ -54,7 +54,7 @@ public interface TabStorePhotoMapper {
...
@@ -54,7 +54,7 @@ public interface TabStorePhotoMapper {
*/
*/
int
updateByPrimaryKey
(
TabStorePhoto
record
);
int
updateByPrimaryKey
(
TabStorePhoto
record
);
List
<
TabStorePhoto
>
listStorePhoto
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"storeInfoId"
)
Integer
storeId
);
List
<
TabStorePhoto
>
listStorePhoto
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"storeInfoId"
)
Integer
storeI
nfoI
d
);
int
updateAllStorePhoto
(
@Param
(
"imageCode"
)
String
imageCode
,
@Param
(
"imageUrl"
)
String
imageUrl
,
@Param
(
"sort"
)
int
sort
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
int
updateAllStorePhoto
(
@Param
(
"imageCode"
)
String
imageCode
,
@Param
(
"imageUrl"
)
String
imageUrl
,
@Param
(
"sort"
)
int
sort
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
...
...
gic-store-service/src/main/java/com/gic/store/service/StorePhotoService.java
View file @
1a0d2321
...
@@ -10,7 +10,7 @@ import java.util.List;
...
@@ -10,7 +10,7 @@ import java.util.List;
* @date 2019/6/27
* @date 2019/6/27
*/
*/
public
interface
StorePhotoService
{
public
interface
StorePhotoService
{
void
editStoreImage
(
Integer
enterpriseId
,
Integer
storeId
,
List
<
StorePhotoDTO
>
photoList
,
List
<
Integer
>
delPhotos
);
void
editStoreImage
(
Integer
enterpriseId
,
Integer
storeI
nfoI
d
,
List
<
StorePhotoDTO
>
photoList
,
List
<
Integer
>
delPhotos
);
List
<
TabStorePhoto
>
listStorePhoto
(
Integer
enterpriseId
,
Integer
storeId
);
List
<
TabStorePhoto
>
listStorePhoto
(
Integer
enterpriseId
,
Integer
storeI
nfoI
d
);
}
}
gic-store-service/src/main/java/com/gic/store/service/impl/StoreBusinessTimeServiceImpl.java
View file @
1a0d2321
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -30,12 +31,10 @@ public class StoreBusinessTimeServiceImpl implements StoreBusinessTimeService {
...
@@ -30,12 +31,10 @@ public class StoreBusinessTimeServiceImpl implements StoreBusinessTimeService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
editStoreBusinessTime
(
Integer
enterpriseId
,
Integer
storeInfoId
,
List
<
StoreBusinessTimeDTO
>
businessTimeList
,
List
<
Integer
>
delBusinessTimes
)
{
public
void
editStoreBusinessTime
(
Integer
enterpriseId
,
Integer
storeInfoId
,
List
<
StoreBusinessTimeDTO
>
businessTimeList
,
List
<
Integer
>
delBusinessTimes
)
{
if
(
CollectionUtils
.
isNotEmpty
(
delBusinessTimes
))
{
if
(
CollectionUtils
.
isNotEmpty
(
businessTimeList
)
||
CollectionUtils
.
isNotEmpty
(
delBusinessTimes
))
{
for
(
Integer
delId
:
delBusinessTimes
)
{
tabStoreBusinessTimeMapper
.
deleteBystoreInfoIds
(
enterpriseId
,
Collections
.
singletonList
(
storeInfoId
));
tabStoreBusinessTimeMapper
.
deleteByPrimaryKey
(
delId
);
}
}
}
// tabStoreBusinessTimeMapper.deleteBystoreInfoIds(enterpriseId, Collections.singletonList(storeInfoId));
if
(
CollectionUtils
.
isNotEmpty
(
businessTimeList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
businessTimeList
))
{
for
(
StoreBusinessTimeDTO
storeBusinessTimeDTO
:
businessTimeList
)
{
for
(
StoreBusinessTimeDTO
storeBusinessTimeDTO
:
businessTimeList
)
{
if
(
StringUtils
.
isNotBlank
(
storeBusinessTimeDTO
.
getWeekday
()))
{
if
(
StringUtils
.
isNotBlank
(
storeBusinessTimeDTO
.
getWeekday
()))
{
...
...
gic-store-service/src/main/java/com/gic/store/service/impl/StorePhotoServiceImpl.java
View file @
1a0d2321
...
@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -25,17 +26,13 @@ public class StorePhotoServiceImpl implements StorePhotoService {
...
@@ -25,17 +26,13 @@ public class StorePhotoServiceImpl implements StorePhotoService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
editStoreImage
(
Integer
enterpriseId
,
Integer
storeId
,
List
<
StorePhotoDTO
>
photoList
,
List
<
Integer
>
delPhotos
)
{
public
void
editStoreImage
(
Integer
enterpriseId
,
Integer
storeInfoId
,
List
<
StorePhotoDTO
>
photoList
,
List
<
Integer
>
delPhotos
)
{
if
(
CollectionUtils
.
isNotEmpty
(
delPhotos
))
{
for
(
Integer
delId
:
delPhotos
)
{
if
(
CollectionUtils
.
isNotEmpty
(
photoList
)
||
CollectionUtils
.
isNotEmpty
(
delPhotos
))
{
TabStorePhoto
storePhoto
=
new
TabStorePhoto
();
// 删除老的
storePhoto
.
setStorePhotoId
(
delId
);
tabStorePhotoMapper
.
deleteBystoreInfoIds
(
enterpriseId
,
Collections
.
singletonList
(
storeInfoId
));
storePhoto
.
setStatus
(
GlobalInfo
.
DATA_STATUS_DELETE
);
tabStorePhotoMapper
.
updateByPrimaryKeySelective
(
storePhoto
);
}
}
}
// 删除老的
// tabStorePhotoMapper.deleteBystoreInfoIds(enterpriseId, Collections.singletonList(storeId));
if
(
CollectionUtils
.
isNotEmpty
(
photoList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
photoList
))
{
for
(
int
i
=
0
;
i
<
photoList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
photoList
.
size
();
i
++)
{
...
@@ -47,7 +44,7 @@ public class StorePhotoServiceImpl implements StorePhotoService {
...
@@ -47,7 +44,7 @@ public class StorePhotoServiceImpl implements StorePhotoService {
storePhoto
.
setImageUrl
(
storePhotoDTO
.
getImageUrl
());
storePhoto
.
setImageUrl
(
storePhotoDTO
.
getImageUrl
());
storePhoto
.
setSort
(
storePhotoDTO
.
getSort
());
storePhoto
.
setSort
(
storePhotoDTO
.
getSort
());
storePhoto
.
setStatus
(
GlobalInfo
.
DATA_STATUS_NORMAL
);
storePhoto
.
setStatus
(
GlobalInfo
.
DATA_STATUS_NORMAL
);
storePhoto
.
setStoreInfoId
(
storeId
);
storePhoto
.
setStoreInfoId
(
storeI
nfoI
d
);
storePhoto
.
setSort
(
i
);
storePhoto
.
setSort
(
i
);
if
(
storePhotoDTO
.
getStorePhotoId
()
==
null
)
{
if
(
storePhotoDTO
.
getStorePhotoId
()
==
null
)
{
storePhoto
.
setCreateTime
(
new
Date
());
storePhoto
.
setCreateTime
(
new
Date
());
...
@@ -60,7 +57,7 @@ public class StorePhotoServiceImpl implements StorePhotoService {
...
@@ -60,7 +57,7 @@ public class StorePhotoServiceImpl implements StorePhotoService {
}
}
@Override
@Override
public
List
<
TabStorePhoto
>
listStorePhoto
(
Integer
enterpriseId
,
Integer
storeId
)
{
public
List
<
TabStorePhoto
>
listStorePhoto
(
Integer
enterpriseId
,
Integer
storeI
nfoI
d
)
{
return
tabStorePhotoMapper
.
listStorePhoto
(
enterpriseId
,
storeId
);
return
tabStorePhotoMapper
.
listStorePhoto
(
enterpriseId
,
storeI
nfoI
d
);
}
}
}
}
\ No newline at end of file
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