Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
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
周健威
rs-cloud-platform
Commits
68101db9
Commit
68101db9
authored
Jan 04, 2021
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加通知信息
parent
f68a9d83
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
41 additions
and
37 deletions
+41
-37
AssertUtils.java
.../com/github/wxiaoqi/security/common/util/AssertUtils.java
+1
-1
AccessGatewayFilter.java
...hub/wxiaoqi/security/gate/filter/AccessGatewayFilter.java
+2
-2
UserDTO.java
.../com/github/wxiaoqi/security/admin/feign/dto/UserDTO.java
+1
-1
AppUserLogRemarkBiz.java
...ithub/wxiaoqi/security/admin/biz/AppUserLogRemarkBiz.java
+1
-1
AppUserLoginBiz.java
...om/github/wxiaoqi/security/admin/biz/AppUserLoginBiz.java
+1
-1
BaseUserMemberExportBiz.java
...b/wxiaoqi/security/admin/biz/BaseUserMemberExportBiz.java
+2
-2
PermissionService.java
...wxiaoqi/security/admin/rpc/service/PermissionService.java
+2
-2
RscpImagePriceController.java
...platform/rs/datacenter/rest/RscpImagePriceController.java
+2
-2
DictionaryBiz.java
...a/com/upyuns/platform/rs/universal/biz/DictionaryBiz.java
+2
-2
ImageImgStorageBiz.java
...om/upyuns/platform/rs/website/biz/ImageImgStorageBiz.java
+4
-4
ImageInfoRelationBiz.java
.../upyuns/platform/rs/website/biz/ImageInfoRelationBiz.java
+2
-2
IndustryApplicationInfoBiz.java
...s/platform/rs/website/biz/IndustryApplicationInfoBiz.java
+1
-1
NoticeInfoBiz.java
...ava/com/upyuns/platform/rs/website/biz/NoticeInfoBiz.java
+1
-1
OrderInfoBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
+14
-10
ShoppingCartInfoBiz.java
...m/upyuns/platform/rs/website/biz/ShoppingCartInfoBiz.java
+3
-3
UserAddressBiz.java
...va/com/upyuns/platform/rs/website/biz/UserAddressBiz.java
+1
-1
UserInvoiceBiz.java
...va/com/upyuns/platform/rs/website/biz/UserInvoiceBiz.java
+1
-1
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/AssertUtils.java
View file @
68101db9
...
...
@@ -126,7 +126,7 @@ public class AssertUtils {
throw
new
BaseException
(
orr
.
getMessage
(),
orr
.
getStatus
());
}
orr
.
setData
(
orr
.
getData
().
parallelS
tream
().
map
(
t
->
BeanUtil
.
toBean
(
t
,
tClass
)).
collect
(
Collectors
.
toList
()));
orr
.
setData
(
orr
.
getData
().
s
tream
().
map
(
t
->
BeanUtil
.
toBean
(
t
,
tClass
)).
collect
(
Collectors
.
toList
()));
return
orr
.
getData
();
}
...
...
ace-gate/src/main/java/com/github/wxiaoqi/security/gate/filter/AccessGatewayFilter.java
View file @
68101db9
...
...
@@ -175,7 +175,7 @@ public class AccessGatewayFilter implements GlobalFilter {
* @return
*/
private
Stream
<
PermissionInfo
>
getPermissionIfs
(
final
String
requestUri
,
final
String
method
,
List
<
PermissionInfo
>
serviceInfo
)
{
return
serviceInfo
.
parallelS
tream
().
filter
(
new
Predicate
<
PermissionInfo
>()
{
return
serviceInfo
.
s
tream
().
filter
(
new
Predicate
<
PermissionInfo
>()
{
@Override
public
boolean
test
(
PermissionInfo
permissionInfo
)
{
String
uri
=
permissionInfo
.
getUri
();
...
...
@@ -230,7 +230,7 @@ public class AccessGatewayFilter implements GlobalFilter {
}
PermissionInfo
current
=
null
;
for
(
PermissionInfo
info
:
permissions
)
{
boolean
anyMatch
=
permissionInfos
.
parallelS
tream
().
anyMatch
(
new
Predicate
<
PermissionInfo
>()
{
boolean
anyMatch
=
permissionInfos
.
s
tream
().
anyMatch
(
new
Predicate
<
PermissionInfo
>()
{
@Override
public
boolean
test
(
PermissionInfo
permissionInfo
)
{
return
permissionInfo
.
getCode
().
equals
(
info
.
getCode
());
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/dto/UserDTO.java
View file @
68101db9
...
...
@@ -22,7 +22,7 @@ public class UserDTO extends User {
private
List
<
Integer
>
str2List
(
String
str
)
{
if
(
StringUtils
.
isNotBlank
(
str
))
{
return
Arrays
.
asList
(
str
.
split
(
","
)).
parallelS
tream
().
map
(
s
->
Integer
.
valueOf
(
s
)).
collect
(
Collectors
.
toList
());
return
Arrays
.
asList
(
str
.
split
(
","
)).
s
tream
().
map
(
s
->
Integer
.
valueOf
(
s
)).
collect
(
Collectors
.
toList
());
}
else
{
return
new
ArrayList
<
Integer
>();
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserLogRemarkBiz.java
View file @
68101db9
...
...
@@ -51,7 +51,7 @@ public class AppUserLogRemarkBiz extends BaseBiz<AppUserLogRemarkMapper, AppUser
example
.
orderBy
(
"time"
).
desc
().
orderBy
(
"crtTime"
).
desc
();
List
<
AppUserLogRemark
>
list
=
selectByExample
(
example
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
list
.
parallelS
tream
().
peek
(
e
->
{
list
.
s
tream
().
peek
(
e
->
{
if
(!
Objects
.
isNull
(
e
))
{
e
.
setPhotoList
(
Lists
.
newArrayList
(
e
.
getPhotos
().
split
(
","
)));
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserLoginBiz.java
View file @
68101db9
...
...
@@ -244,7 +244,7 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
List
<
AppUserLogin
>
appUserLogins
=
mapper
.
selectbyPhones
(
phones
);
Map
<
String
,
Integer
>
phoneAndUserIdMap
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
appUserLogins
))
{
phoneAndUserIdMap
=
appUserLogins
.
parallelS
tream
().
collect
(
Collectors
.
toMap
(
AppUserLogin:
:
getUsername
,
AppUserLogin:
:
getId
));
phoneAndUserIdMap
=
appUserLogins
.
s
tream
().
collect
(
Collectors
.
toMap
(
AppUserLogin:
:
getUsername
,
AppUserLogin:
:
getId
));
}
return
phoneAndUserIdMap
;
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BaseUserMemberExportBiz.java
View file @
68101db9
...
...
@@ -105,8 +105,8 @@ public class BaseUserMemberExportBiz extends BaseBiz<BaseUserMemberExportMapper,
List
<
BaseUserMemberExport
>
baseUserMemberExports
=
new
ArrayList
<>();
List
<
BaseUserMemberLevel
>
levesls
=
userMemberLevelBiz
.
getLevesls
();
Map
<
Integer
,
BaseUserMemberLevel
>
levelAndbaseUserMemberMap
=
levesls
.
parallelS
tream
().
collect
(
Collectors
.
toMap
(
BaseUserMemberLevel:
:
getLevel
,
Function
.
identity
()));
Map
<
String
,
Integer
>
leavelNameAndLeaveMap
=
levelAndbaseUserMemberMap
.
values
().
parallelS
tream
().
collect
(
Collectors
.
toMap
(
BaseUserMemberLevel:
:
getName
,
BaseUserMemberLevel:
:
getLevel
));
Map
<
Integer
,
BaseUserMemberLevel
>
levelAndbaseUserMemberMap
=
levesls
.
s
tream
().
collect
(
Collectors
.
toMap
(
BaseUserMemberLevel:
:
getLevel
,
Function
.
identity
()));
Map
<
String
,
Integer
>
leavelNameAndLeaveMap
=
levelAndbaseUserMemberMap
.
values
().
s
tream
().
collect
(
Collectors
.
toMap
(
BaseUserMemberLevel:
:
getName
,
BaseUserMemberLevel:
:
getLevel
));
List
<
String
>
phones
=
userMemberData
.
stream
().
map
(
x
->
x
[
0
]).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
String
,
Integer
>
phoneAndUserIdMap
=
appUserLoginBiz
.
findPhoneAndUserIdMapByPhones
(
phones
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/PermissionService.java
View file @
68101db9
...
...
@@ -140,11 +140,11 @@ public class PermissionService {
FrontUser
frontUser
=
new
FrontUser
();
BeanUtils
.
copyProperties
(
user
,
frontUser
);
List
<
PermissionInfo
>
permissionInfos
=
this
.
getPermissionByUsername
(
username
);
Stream
<
PermissionInfo
>
menus
=
permissionInfos
.
parallelS
tream
().
filter
((
permission
)
->
{
Stream
<
PermissionInfo
>
menus
=
permissionInfos
.
s
tream
().
filter
((
permission
)
->
{
return
permission
.
getType
().
equals
(
CommonConstants
.
RESOURCE_TYPE_MENU
);
});
frontUser
.
setMenus
(
menus
.
collect
(
Collectors
.
toList
()));
Stream
<
PermissionInfo
>
elements
=
permissionInfos
.
parallelS
tream
().
filter
((
permission
)
->
{
Stream
<
PermissionInfo
>
elements
=
permissionInfos
.
s
tream
().
filter
((
permission
)
->
{
return
!
permission
.
getType
().
equals
(
CommonConstants
.
RESOURCE_TYPE_MENU
);
});
frontUser
.
setElements
(
elements
.
collect
(
Collectors
.
toList
()));
...
...
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/RscpImagePriceController.java
View file @
68101db9
...
...
@@ -40,9 +40,9 @@ public class RscpImagePriceController extends BaseController<RscpImagePriceBiz,
List
<
ImagePriceVO
>
imagePriceVOS
=
CollUtil
.
newArrayList
();
String
key
=
""
;
List
<
String
>
satelliteTypes
=
list
.
parallelS
tream
().
map
(
RscpImagePrice:
:
getImageSatelliteType
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
satelliteTypes
=
list
.
s
tream
().
map
(
RscpImagePrice:
:
getImageSatelliteType
).
distinct
().
collect
(
Collectors
.
toList
());
for
(
String
satelliteType
:
satelliteTypes
)
{
List
<
RscpImagePrice
>
imagePriceList
=
list
.
parallelS
tream
().
filter
(
rscpImagePrice
->
satelliteType
.
equals
(
rscpImagePrice
.
getImageSatelliteType
())).
collect
(
Collectors
.
toList
());
List
<
RscpImagePrice
>
imagePriceList
=
list
.
s
tream
().
filter
(
rscpImagePrice
->
satelliteType
.
equals
(
rscpImagePrice
.
getImageSatelliteType
())).
collect
(
Collectors
.
toList
());
imagePriceVOS
.
add
(
new
ImagePriceVO
(){{
setImageSatelliteType
(
satelliteType
);
setSatelliteName
(
imagePriceList
.
get
(
0
).
getSatelliteName
());
...
...
rs-universal/rs-universal-server/src/main/java/com/upyuns/platform/rs/universal/biz/DictionaryBiz.java
View file @
68101db9
...
...
@@ -105,7 +105,7 @@ public class DictionaryBiz extends BaseBiz<DictionaryMapper, Dictionary> {
public
Map
<
String
,
Dictionary
>
getAll4Map
()
{
// List<Dictionary> dictionaries = this.getParentCommon(null);
List
<
Dictionary
>
dictionaries
=
selectListAll
();
Map
<
String
,
Dictionary
>
dictionaryMap
=
dictionaries
.
parallelS
tream
().
collect
(
Collectors
.
toMap
(
dic
->
dic
.
getType
()
+
"_"
+
dic
.
getCode
()
Map
<
String
,
Dictionary
>
dictionaryMap
=
dictionaries
.
s
tream
().
collect
(
Collectors
.
toMap
(
dic
->
dic
.
getType
()
+
"_"
+
dic
.
getCode
()
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
newValue
));
dictionaryMap
.
forEach
((
k
,
v
)
->
{
v
.
setChildrens
(
buildTree
(
v
.
getId
()));
...
...
@@ -115,7 +115,7 @@ public class DictionaryBiz extends BaseBiz<DictionaryMapper, Dictionary> {
/* public Map<String, Dictionary> getDictionaryUseType() {
List<Dictionary> dictionaries = selectListAll();
Map<String, Dictionary> dictionaryMap = dictionaries.
parallelS
tream().collect(Collectors.toMap(dic -> dic.getType() + "_" + dic.getCode()
Map<String, Dictionary> dictionaryMap = dictionaries.
s
tream().collect(Collectors.toMap(dic -> dic.getType() + "_" + dic.getCode()
, Function.identity(), (oldValue, newValue) -> newValue));
return dictionaryMap;
}*/
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ImageImgStorageBiz.java
View file @
68101db9
...
...
@@ -46,7 +46,7 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
if
(
imageImgStorage
.
getId
()
==
null
)
{
insertSelectiveRe
(
imageImgStorage
);
if
(
imageImgStorage
.
getImageInfoRelationList
()
!=
null
&&
imageImgStorage
.
getImageInfoRelationList
().
size
()
>
0
)
{
imageImgStorage
.
getImageInfoRelationList
().
parallelS
tream
().
forEach
(
imageInfoRelation
->
{
imageImgStorage
.
getImageInfoRelationList
().
s
tream
().
forEach
(
imageInfoRelation
->
{
imageInfoRelation
.
setType
(
1
);
imageInfoRelation
.
setRelationId
(
imageImgStorage
.
getId
());
imageInfoRelationBiz
.
addUpdate
(
imageInfoRelation
);
...
...
@@ -63,7 +63,7 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
updateSelectiveByIdRe
(
old
);
}
if
(
old
.
getImageInfoRelationList
()
!=
null
&&
old
.
getImageInfoRelationList
().
size
()
>
0
)
{
old
.
getImageInfoRelationList
().
parallelS
tream
().
forEach
(
imageInfoRelation
->
{
old
.
getImageInfoRelationList
().
s
tream
().
forEach
(
imageInfoRelation
->
{
imageInfoRelation
.
setType
(
1
);
imageInfoRelation
.
setRelationId
(
old
.
getId
());
imageInfoRelationBiz
.
addUpdate
(
imageInfoRelation
);
...
...
@@ -102,7 +102,7 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
Query
query
=
new
Query
(
imageInformationStorageDto
);
PageDataVO
<
ImageImgStorage
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectByExample
(
example
));
if
(
pageDataVO
!=
null
&&
pageDataVO
.
getData
()
!=
null
)
{
pageDataVO
.
getData
().
parallelS
tream
().
forEach
(
imageImgStorage
->
{
pageDataVO
.
getData
().
s
tream
().
forEach
(
imageImgStorage
->
{
List
<
ImageInfoRelation
>
imageInfoRelationList
=
imageInfoRelationBiz
.
getAllById
(
imageImgStorage
.
getId
(),
1
);
if
(
imageInfoRelationList
!=
null
)
{
imageImgStorage
.
setImageInfoRelationList
(
imageInfoRelationList
);
...
...
@@ -158,7 +158,7 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
example
.
orderBy
(
"updTime"
).
desc
();
List
<
ImageImgStorage
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
parallelS
tream
().
forEach
(
imageImgStorage
->
{
list
.
s
tream
().
forEach
(
imageImgStorage
->
{
List
<
ImageInfoRelation
>
imageInfoRelationList
=
imageInfoRelationBiz
.
getAllById
(
imageImgStorage
.
getId
(),
1
);
if
(
imageInfoRelationList
!=
null
)
{
imageImgStorage
.
setImageInfoRelationList
(
imageInfoRelationList
);
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ImageInfoRelationBiz.java
View file @
68101db9
...
...
@@ -39,7 +39,7 @@ public class ImageInfoRelationBiz extends BaseBiz<ImageInfoRelationMapper,ImageI
public
void
deleteAll
(
Integer
relationId
)
{
List
<
ImageInfoRelation
>
list
=
selectList
(
new
ImageInfoRelation
(){{
setRelationId
(
relationId
);
setType
(
1
);}});
if
(
list
!=
null
)
{
list
.
parallelS
tream
().
forEach
(
imageInfoRelation
->
{
list
.
s
tream
().
forEach
(
imageInfoRelation
->
{
delete
(
imageInfoRelation
);
});
}
...
...
@@ -69,7 +69,7 @@ public class ImageInfoRelationBiz extends BaseBiz<ImageInfoRelationMapper,ImageI
example
.
createCriteria
().
andEqualTo
(
"relationId"
,
relationId
).
andEqualTo
(
"type"
,
type
);
List
<
ImageInfoRelation
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
parallelS
tream
().
forEach
(
imageInfoRelation
->
{
list
.
s
tream
().
forEach
(
imageInfoRelation
->
{
imageInfoRelation
.
setUrl
(
null
);
});
return
list
;
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/IndustryApplicationInfoBiz.java
View file @
68101db9
...
...
@@ -98,7 +98,7 @@ public class IndustryApplicationInfoBiz extends BaseBiz<IndustryApplicationInfoM
example
.
orderBy
(
"rank"
);
List
<
IndustryApplicationInfo
>
industryApplicationInfoList
=
mapper
.
selectByExample
(
example
);
if
(
industryApplicationInfoList
!=
null
&&
industryApplicationInfoList
.
size
()
>
0
)
{
industryApplicationInfoList
.
parallelS
tream
().
forEach
(
industryApplicationInfo
->
{
industryApplicationInfoList
.
s
tream
().
forEach
(
industryApplicationInfo
->
{
if
(
map
.
get
(
industryApplicationInfo
.
getFirstTypeId
())
!=
null
&&
map
.
get
(
industryApplicationInfo
.
getFirstTypeId
()).
size
()
>
0
)
{
IndustryApplicationType
industryApplicationType
=
map
.
get
(
industryApplicationInfo
.
getFirstTypeId
()).
get
(
0
);
IndustryTypeVo
industryTypeVo
=
new
IndustryTypeVo
();
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/NoticeInfoBiz.java
View file @
68101db9
...
...
@@ -110,7 +110,7 @@ public class NoticeInfoBiz extends BaseBiz<NoticeInfoMapper,NoticeInfo> {
criteria
.
andEqualTo
(
"userId"
,
noticeInfoDto
.
getUserId
());
List
<
NoticeInfo
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
parallelStream
().
forEach
(
noticeInfo
->
{
list
.
forEach
(
noticeInfo
->
{
noticeInfo
.
setIsRead
(
2
);
updateSelectiveByIdRe
(
noticeInfo
);
});
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
View file @
68101db9
...
...
@@ -208,7 +208,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
if
(
orderEInvoiceList
!=
null
&&
orderEInvoiceList
.
size
()
>
0
)
{
Map
<
Integer
,
List
<
OrderEInvoice
>>
map
=
orderEInvoiceList
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrderEInvoice:
:
getId
));
if
(
map
!=
null
&&
map
.
size
()
>
0
)
{
orderInfoList
.
parallelS
tream
().
forEach
(
orderInfo
->
{
orderInfoList
.
s
tream
().
forEach
(
orderInfo
->
{
if
(
map
.
get
(
orderInfo
.
getInvoiceId
())
!=
null
&&
orderInfo
!=
null
)
{
orderInfo
.
setOrderEInvoice
(
map
.
get
(
orderInfo
.
getInvoiceId
()).
get
(
0
));
}
...
...
@@ -255,7 +255,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
if
(
orderItemList
!=
null
)
{
Map
<
Long
,
List
<
OrderItem
>>
map
=
orderItemList
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrderItem:
:
getOrderId
));
if
(
map
!=
null
&&
map
.
size
()
>
0
)
{
orderInfoList
.
parallelS
tream
().
forEach
(
orderInfo
->
{
orderInfoList
.
s
tream
().
forEach
(
orderInfo
->
{
orderInfo
.
setOrderItemList
(
map
.
get
(
orderInfo
.
getOrderId
()));
});
}
...
...
@@ -281,7 +281,8 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
List
<
OrderItem
>
orderItemList
=
new
ArrayList
<>();
AtomicReference
<
Integer
>
number
=
new
AtomicReference
<>(
0
);
AtomicReference
<
Double
>
amount
=
new
AtomicReference
<>((
double
)
0
);
itemInfoDtoList
.
parallelStream
().
forEach
(
itemInfoDto
->
{
StringBuilder
sb
=
new
StringBuilder
();
itemInfoDtoList
.
forEach
(
itemInfoDto
->
{
switch
(
OrderTypeEnum
.
getByCode
(
itemInfoDto
.
getType
()))
{
//标准数据
case
STANDARD_DATA:
...
...
@@ -296,6 +297,8 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderItem
.
setDetailJson
(
JSONObject
.
toJSONString
(
imageDataVO
));
orderItem
.
setDetailId
(
Long
.
valueOf
(
imageDataVO
.
getId
()));
orderItemList
.
add
(
orderItem
);
sb
.
append
(
imageDataVO
.
getImageSatelliteType
());
sb
.
append
(
","
);
//总数量
number
.
updateAndGet
(
v
->
v
+
itemInfoDto
.
getNumber
());
BigDecimal
totalAmount
=
imageDataVO
.
getPrice
().
multiply
(
new
BigDecimal
(
itemInfoDto
.
getNumber
()));
...
...
@@ -426,12 +429,13 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderInfo
.
setSendType
(
orderInfoDto
.
getSendType
());
orderInfo
.
setType
(
1
);
orderInfo
.
setSatellite
(
sb
.
toString
());
/**
* 新增订单
*/
orderInfo
.
setOrderNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
APP_MID
));
generateOrder
(
orderInfo
);
orderItemList
.
parallelS
tream
().
forEach
(
orderItem
->
{
orderItemList
.
s
tream
().
forEach
(
orderItem
->
{
if
(
orderItem
!=
null
)
{
orderItem
.
setOrderId
(
orderInfo
.
getOrderId
());
orderItemBiz
.
insertSelective
(
orderItem
);
...
...
@@ -790,7 +794,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
List
<
OrderItem
>
orderItemList
=
new
ArrayList
<>();
itemInfoDtoList
.
parallelS
tream
().
forEach
(
itemInfoDto
->
{
itemInfoDtoList
.
s
tream
().
forEach
(
itemInfoDto
->
{
switch
(
OrderTypeEnum
.
getByCode
(
itemInfoDto
.
getType
()))
{
//标准数据
case
STANDARD_DATA:
...
...
@@ -847,7 +851,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
break
;
}
});
orderItemList
.
parallelS
tream
().
forEach
(
orderItem
->
{
orderItemList
.
s
tream
().
forEach
(
orderItem
->
{
if
(
orderItem
!=
null
)
{
orderItem
.
setOrderId
(
orderInfoDto
.
getOrderId
());
orderItemBiz
.
insertSelective
(
orderItem
);
...
...
@@ -930,10 +934,10 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
case
IMAGE_STORAGE:
List
<
ImageImgStorage
>
imageImgStorageList
=
imageImgStorageBiz
.
getAll
(
null
,
name
).
getData
();
if
(
imageImgStorageList
!=
null
&&
imageImgStorageList
.
size
()
>
0
)
{
imageImgStorageList
.
parallelS
tream
().
forEach
(
imageImgStorage
->
{
imageImgStorageList
.
s
tream
().
forEach
(
imageImgStorage
->
{
List
<
ImageInfoRelation
>
imageInfoRelationList
=
imageImgStorage
.
getImageInfoRelationList
();
if
(
imageInfoRelationList
!=
null
&&
imageInfoRelationList
.
size
()
>
0
)
{
imageInfoRelationList
.
parallelS
tream
().
forEach
(
imageInfoRelation
->
{
imageInfoRelationList
.
s
tream
().
forEach
(
imageInfoRelation
->
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setName
(
imageImgStorage
.
getName
()
+
imageInfoRelation
.
getFileWidth
());
itemInfoVo
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
imageInfoRelation
.
getId
())));
...
...
@@ -953,7 +957,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
case
INDUSTRY_INFO:
List
<
IndustryApplicationInfo
>
industryApplicationInfoList
=
industryApplicationInfoBiz
.
getAllData
(
name
);
if
(
industryApplicationInfoList
!=
null
&&
industryApplicationInfoList
.
size
()
>
0
)
{
industryApplicationInfoList
.
parallelS
tream
().
forEach
(
industryApplicationInfo
->
{
industryApplicationInfoList
.
s
tream
().
forEach
(
industryApplicationInfo
->
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setName
(
industryApplicationInfo
.
getTitle
());
itemInfoVo
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
industryApplicationInfo
.
getId
())));
...
...
@@ -966,7 +970,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
setKeyword
(
name
);
}}).
getData
();
if
(
pageDataVO
!=
null
&&
pageDataVO
.
getData
()
!=
null
&&
pageDataVO
.
getData
().
size
()
>
0
)
{
pageDataVO
.
getData
().
parallelS
tream
().
forEach
(
imageDataVO
->
{
pageDataVO
.
getData
().
s
tream
().
forEach
(
imageDataVO
->
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setName
(
imageDataVO
.
getName
());
itemInfoVo
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
imageDataVO
.
getId
())));
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ShoppingCartInfoBiz.java
View file @
68101db9
...
...
@@ -267,14 +267,14 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
*/
private
void
convertToOrderInfo
(
List
<
ShoppingCartInfo
>
cartInfoList
,
CartOrderDto
cartOrderDto
,
AppUserDTO
appUserDTO
)
{
//总金额
double
amount
=
cartInfoList
.
parallelS
tream
().
mapToDouble
(
shoppingCartInfo
->
shoppingCartInfo
.
getTotalAmount
().
doubleValue
()).
sum
();
double
amount
=
cartInfoList
.
s
tream
().
mapToDouble
(
shoppingCartInfo
->
shoppingCartInfo
.
getTotalAmount
().
doubleValue
()).
sum
();
//总数量
Integer
totalNumber
=
cartInfoList
.
parallelS
tream
().
mapToInt
(
ShoppingCartInfo:
:
getNumber
).
sum
();
Integer
totalNumber
=
cartInfoList
.
s
tream
().
mapToInt
(
ShoppingCartInfo:
:
getNumber
).
sum
();
OrderInfo
orderInfo
=
new
OrderInfo
();
orderInfo
.
setAmount
(
new
BigDecimal
(
amount
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
orderInfo
.
setNumber
(
totalNumber
);
orderInfoBiz
.
generateOrder
(
orderInfo
);
cartInfoList
.
parallelS
tream
().
forEach
(
shoppingCartInfo
->
{
cartInfoList
.
s
tream
().
forEach
(
shoppingCartInfo
->
{
OrderItem
orderItem
=
ShoppingCartInfo
.
convertToOrderItem
(
shoppingCartInfo
);
orderItem
.
setOrderId
(
orderInfo
.
getOrderId
());
orderItemBiz
.
insertSelectiveRe
(
orderItem
);
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/UserAddressBiz.java
View file @
68101db9
...
...
@@ -137,7 +137,7 @@ public class UserAddressBiz extends BaseBiz<UserAddressMapper, UserAddress> {
example
.
createCriteria
().
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"isDefault"
,
1
);
List
<
UserAddress
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
parallelStream
().
forEach
(
userAddress
->
{
list
.
forEach
(
userAddress
->
{
userAddress
.
setIsDefault
(
0
);
updateSelectiveByIdRe
(
userAddress
);
});
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/UserInvoiceBiz.java
View file @
68101db9
...
...
@@ -182,7 +182,7 @@ public class UserInvoiceBiz extends BaseBiz<UserInvoiceMapper,UserInvoice> {
example
.
createCriteria
().
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"isDefault"
,
1
);
List
<
UserInvoice
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
parallelStream
().
forEach
(
userInvoice
->
{
list
.
forEach
(
userInvoice
->
{
userInvoice
.
setIsDefault
(
0
);
updateSelectiveByIdRe
(
userInvoice
);
});
...
...
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