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
791c534f
Commit
791c534f
authored
Aug 24, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/base_platform_enterprise/gic-store
into developer
parents
f6f346d1
2f7cf03a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
14 deletions
+14
-14
StoreBusinessTimeServiceImpl.java
.../gic/store/service/impl/StoreBusinessTimeServiceImpl.java
+1
-1
StoreServiceImpl.java
...ain/java/com/gic/store/service/impl/StoreServiceImpl.java
+1
-1
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+2
-3
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+2
-3
StoreBrandApiServiceImpl.java
...ic/store/service/outer/impl/StoreBrandApiServiceImpl.java
+1
-1
StoreTaskServiceImpl.java
...om/gic/store/service/outer/impl/StoreTaskServiceImpl.java
+2
-1
dubbo-gic-store-service.xml
...re-service/src/main/resources/dubbo-gic-store-service.xml
+1
-0
StoreBrandController.java
...va/com/gic/store/web/controller/StoreBrandController.java
+1
-2
StoreController.java
...in/java/com/gic/store/web/controller/StoreController.java
+1
-1
StoreImportController.java
...a/com/gic/store/web/controller/StoreImportController.java
+2
-1
No files found.
gic-store-service/src/main/java/com/gic/store/service/impl/StoreBusinessTimeServiceImpl.java
View file @
791c534f
...
...
@@ -43,7 +43,7 @@ public class StoreBusinessTimeServiceImpl implements StoreBusinessTimeService {
TabStoreBusinessTime
businessTime
=
new
TabStoreBusinessTime
();
businessTime
.
setStoreBusinessTimeId
(
storeBusinessTimeDTO
.
getStoreBusinessTimeId
());
if
(
StringUtils
.
isNotBlank
(
storeBusinessTimeDTO
.
getWeekday
()))
{
String
weekday
=
Stream
.
of
(
storeBusinessTimeDTO
.
getWeekday
().
split
(
GlobalInfo
.
FLAG_COMMA
)).
sorted
().
reduce
((
x
,
y
)
->
x
+
GlobalInfo
.
FLAG_COMMA
+
y
).
get
(
);
String
weekday
=
Stream
.
of
(
storeBusinessTimeDTO
.
getWeekday
().
split
(
GlobalInfo
.
FLAG_COMMA
)).
sorted
().
collect
(
Collectors
.
joining
(
","
)
);
businessTime
.
setWeekday
(
weekday
);
}
businessTime
.
setOpenTime
(
storeBusinessTimeDTO
.
getOpenTime
());
...
...
gic-store-service/src/main/java/com/gic/store/service/impl/StoreServiceImpl.java
View file @
791c534f
...
...
@@ -495,7 +495,7 @@ public class StoreServiceImpl implements StoreService {
public
String
listStoreInfoIdByStoreIds
(
String
storeIds
,
Integer
enterpriseId
)
{
List
<
Integer
>
list
=
Stream
.
of
(
storeIds
.
split
(
GlobalInfo
.
FLAG_COMMA
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
ids
=
tabStoreMapper
.
listStoreInfoIdByStoreIds
(
list
,
enterpriseId
);
return
Optional
.
ofNullable
(
ids
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
String:
:
valueOf
).
reduce
((
x
,
y
)->
x
+
GlobalInfo
.
FLAG_COMMA
+
y
).
orElse
(
""
);
return
Optional
.
ofNullable
(
ids
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
)
);
}
@Override
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
791c534f
...
...
@@ -425,8 +425,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
storeSearchDBDTO
.
setStoreInfoIdList
(
storeInfoIdsBySearch
);
storeSearchDBDTO
.
setSearch
(
search
);
List
<
StoreDTO
>
dtos
=
storeService
.
listStore
(
storeSearchDBDTO
,
1
,
Integer
.
MAX_VALUE
);
return
Optional
.
ofNullable
(
dtos
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
e
->
e
.
getStoreId
().
toString
())
.
reduce
((
x
,
y
)
->
x
+
" "
+
y
).
orElse
(
""
);
return
Optional
.
ofNullable
(
dtos
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
e
->
e
.
getStoreId
().
toString
()).
collect
(
Collectors
.
joining
(
" "
));
}
...
...
@@ -693,7 +692,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
// list 如果太大, 让 mybatis 解析 会打满内存
String
storeInfoIds
=
list
.
stream
().
map
(
e
->
e
.
getStoreInfoId
().
toString
()).
reduce
((
x
,
y
)
->
x
+
","
+
y
).
get
(
);
String
storeInfoIds
=
list
.
stream
().
map
(
e
->
e
.
getStoreInfoId
().
toString
()).
collect
(
Collectors
.
joining
(
","
)
);
storeInfoIds
=
"("
+
storeInfoIds
+
")"
;
List
<
TabClerk
>
clerkList
=
this
.
clerkService
.
listClerkByStoreInfoId
(
enterpriseId
,
storeInfoIds
,
clerkName
);
List
<
ClerkDTO
>
dtoList
=
EntityUtil
.
changeEntityListByJSON
(
ClerkDTO
.
class
,
clerkList
);
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
791c534f
...
...
@@ -426,15 +426,14 @@ public class StoreApiServiceImpl implements StoreApiService {
this
.
storeBusinessTimeService
.
convertBusinessTime
(
newStore
.
getBusinessTimeList
());
String
newBusinessTimeShow
=
newStore
.
getBusinessTimeList
().
stream
()
.
map
(
e
->
e
.
getWeekdayShow
()
+
":"
+
DateUtil
.
dateToStr
(
e
.
getOpenTime
(),
DateUtil
.
FORMAT_MINUTE_TIME
)
+
"~"
+
DateUtil
.
dateToStr
(
e
.
getCloseTime
(),
DateUtil
.
FORMAT_MINUTE_TIME
))
.
reduce
((
x
,
y
)
->
x
+
","
+
y
)
.
orElse
(
""
);
.
collect
(
Collectors
.
joining
(
","
));
sb
.
append
(
"营业时间"
).
append
(
"变更为【"
).
append
(
newBusinessTimeShow
).
append
(
"】"
);
}
}
}
if
(
StringUtils
.
isNotBlank
(
newStore
.
getBrandIds
())
&&
!
StringUtils
.
equals
(
newStore
.
getBrandIds
(),
oldStore
.
getBrandIds
()))
{
List
<
TabStoreBrand
>
tabStoreBrands
=
this
.
storeBrandService
.
listStoreBrandByIds
(
newStore
.
getBrandIds
());
String
storeBrandShow
=
tabStoreBrands
.
stream
().
map
(
TabStoreBrand:
:
getStoreBrandName
).
reduce
((
x
,
y
)
->
x
+
","
+
y
).
orElse
(
""
)
;
String
storeBrandShow
=
tabStoreBrands
.
stream
().
map
(
TabStoreBrand:
:
getStoreBrandName
).
collect
(
Collectors
.
joining
(
","
));
;
sb
.
append
(
"门店品牌"
).
append
(
"变更为【"
).
append
(
storeBrandShow
).
append
(
"】"
);
}
if
(
StringUtils
.
isNotBlank
(
newStore
.
getAddress
())
&&
!
StringUtils
.
equals
(
newStore
.
getAddress
(),
oldStore
.
getAddress
()))
{
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreBrandApiServiceImpl.java
View file @
791c534f
...
...
@@ -106,7 +106,7 @@ public class StoreBrandApiServiceImpl implements StoreBrandApiService {
if
(
CollectionUtils
.
isEmpty
(
storeBrandList
))
{
return
ServiceResponse
.
success
();
}
String
ids
=
storeBrandList
.
stream
().
map
(
e
->
e
.
getStoreBrandId
().
toString
()).
reduce
((
x
,
y
)
->
x
+
GlobalInfo
.
FLAG_COMMA
+
y
).
get
(
);
String
ids
=
storeBrandList
.
stream
().
map
(
e
->
e
.
getStoreBrandId
().
toString
()).
collect
(
Collectors
.
joining
(
","
)
);
return
this
.
deleteByIds
(
enterpriseId
,
ids
);
}
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreTaskServiceImpl.java
View file @
791c534f
...
...
@@ -27,6 +27,7 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* @author zhiwj
...
...
@@ -283,7 +284,7 @@ public class StoreTaskServiceImpl extends AbstractTaskAllocationOperation implem
return
false
;
})
.
map
(
e
->
e
.
getStoreFieldSelectId
()
+
""
)
.
reduce
((
x
,
y
)
->
x
+
GlobalInfo
.
FLAG_COMMA
+
y
).
get
(
);
.
collect
(
Collectors
.
joining
(
","
)
);
storeExtendDTO
.
setValue
(
newValue
);
}
}
...
...
gic-store-service/src/main/resources/dubbo-gic-store-service.xml
View file @
791c534f
...
...
@@ -69,4 +69,5 @@
<dubbo:reference
interface=
"com.gic.weimob.api.service.WeimobStoreSiteService"
id=
"weimobStoreSiteService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.WmStoreSyncLogApiService"
id=
"wmStoreSyncLogApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.spark.api.service.SparkJobApiService"
id=
"sparkJobApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.member.config.api.service.CardAscriptionConfigService"
id=
"cardAscriptionConfigService"
timeout=
"6000"
/>
</beans>
gic-store-web/src/main/java/com/gic/store/web/controller/StoreBrandController.java
View file @
791c534f
...
...
@@ -95,8 +95,7 @@ public class StoreBrandController {
.
orElse
(
Collections
.
emptyList
())
.
stream
()
.
map
(
StoreBrandDTO:
:
getStoreBrandName
)
.
reduce
((
x
,
y
)
->
x
+
","
+
y
)
.
orElse
(
""
);
.
collect
(
Collectors
.
joining
(
","
));
LogUtils
.
createLog
(
"删除门店品牌"
,
logName
);
}
return
RestResponse
.
success
(
serviceResponse
.
getResult
());
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreController.java
View file @
791c534f
...
...
@@ -393,7 +393,7 @@ public class StoreController extends DownloadUtils {
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
()))
{
List
<
StoreDTO
>
storeList
=
page
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
String
storeName
=
storeList
.
stream
().
map
(
StoreDTO:
:
getStoreName
).
reduce
((
x
,
y
)
->
x
+
","
+
y
).
get
(
);
String
storeName
=
storeList
.
stream
().
map
(
StoreDTO:
:
getStoreName
).
collect
(
Collectors
.
joining
(
","
)
);
if
(
storeArr
.
length
>
3
)
{
storeName
+=
"等"
+
storeArr
.
length
+
"家门店"
;
}
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreImportController.java
View file @
791c534f
...
...
@@ -32,6 +32,7 @@ import java.io.IOException;
import
java.io.OutputStream
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author zhiwj
...
...
@@ -539,7 +540,7 @@ public class StoreImportController {
if
(
response
.
isSuccess
())
{
List
<
String
>
brandList
=
response
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
brandList
))
{
String
error
=
brandList
.
stream
().
reduce
((
x
,
y
)
->
x
+
" "
+
y
).
get
(
);
String
error
=
brandList
.
stream
().
collect
(
Collectors
.
joining
(
","
)
);
return
"品牌 "
+
error
+
" 不存在"
;
}
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