记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
78e47e97
Commit
78e47e97
authored
Jul 15, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常拦截
parent
596c4a85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
90 additions
and
74 deletions
+90
-74
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+90
-74
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
78e47e97
...
...
@@ -396,24 +396,35 @@ public class DataUtils {
}).collect(Collectors.toList());*/
//数字藏品
List
<
NoticeGoblinGoodsSkuInfoVo
>
toDayNftVoList
=
null
;
List
<
NoticeGoblinGoodsSkuInfoVo
>
threeDayNftVoList
=
null
;
try
{
//当天
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
=
getGoblinGoodsSkuInfoVos
(
toDayNftIds
);
String
anticipateKey
=
GoblinRedisConst
.
ANTICIPATE_VALUE_SKUID
;
List
<
NoticeGoblinGoodsSkuInfoVo
>
toDayNftVoList
=
aboutDayNftVoList
(
toDaysNftList
,
anticipateKey
);
toDayNftVoList
=
aboutDayNftVoList
(
toDaysNftList
);
//三天的
List
<
GoblinGoodsSkuInfoVo
>
threeNftList
=
getGoblinGoodsSkuInfoVos
(
threeNftIds
);
List
<
NoticeGoblinGoodsSkuInfoVo
>
threeDayNftVoList
=
aboutDayNftVoList
(
threeNftList
,
anticipateKey
);
threeDayNftVoList
=
aboutDayNftVoList
(
threeNftList
);
}
catch
(
Exception
e
)
{
log
.
error
(
"return NftVoList error!"
);
}
//组合购
List
<
NoticeGoblinMixDetailsVo
>
toDayCombinationVoList
=
null
;
List
<
NoticeGoblinMixDetailsVo
>
threeDayCombinationVoList
=
null
;
try
{
//当天
List
<
GoblinMixDetailsVo
>
toDayCombinationList
=
getGoblinMixDetailsVos
(
toDayCombinationIds
);
List
<
NoticeGoblinMixDetailsVo
>
toDayCombinationVoList
=
toDayCombinationList
.
stream
().
map
(
goblinMixDetailsVo
->
NoticeGoblinMixDetailsVo
.
getNew
().
copy
(
goblinMixDetailsVo
)).
collect
(
Collectors
.
toList
());
toDayCombinationVoList
=
toDayCombinationList
.
stream
().
map
(
goblinMixDetailsVo
->
NoticeGoblinMixDetailsVo
.
getNew
().
copy
(
goblinMixDetailsVo
)).
collect
(
Collectors
.
toList
());
//三天
List
<
GoblinMixDetailsVo
>
threeDayCombinationList
=
getGoblinMixDetailsVos
(
threeDayCombinationIds
);
List
<
NoticeGoblinMixDetailsVo
>
threeDayCombinationVoList
=
threeDayCombinationList
.
stream
().
map
(
goblinMixDetailsVo
->
NoticeGoblinMixDetailsVo
.
getNew
().
copy
(
goblinMixDetailsVo
)).
collect
(
Collectors
.
toList
());
threeDayCombinationVoList
=
threeDayCombinationList
.
stream
().
map
(
goblinMixDetailsVo
->
NoticeGoblinMixDetailsVo
.
getNew
().
copy
(
goblinMixDetailsVo
)).
collect
(
Collectors
.
toList
());
}
catch
(
Exception
e
)
{
log
.
error
(
"return CombinationVoList error!"
);
}
HashMap
<
String
,
Object
>
info
=
CollectionUtil
.
mapStringObject
();
info
.
put
(
"toDayList"
,
toDayList
);
...
...
@@ -434,8 +445,9 @@ public class DataUtils {
return
(
HashMap
<
String
,
Object
>)
obj
;
}
private
List
<
NoticeGoblinGoodsSkuInfoVo
>
aboutDayNftVoList
(
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
,
String
anticipateKey
)
{
private
List
<
NoticeGoblinGoodsSkuInfoVo
>
aboutDayNftVoList
(
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
String
anticipateKey
=
GoblinRedisConst
.
ANTICIPATE_VALUE_SKUID
;
List
<
NoticeGoblinGoodsSkuInfoVo
>
toDayNftVoList
=
toDaysNftList
.
stream
().
map
(
goblinGoodsSkuInfoVo
->
{
NoticeGoblinGoodsSkuInfoVo
noticeGoblinGoodsSkuInfoVo
=
NoticeGoblinGoodsSkuInfoVo
.
getNew
().
copy
(
goblinGoodsSkuInfoVo
);
...
...
@@ -571,14 +583,6 @@ public class DataUtils {
}
}
});
//查询mongodb
/*Query query = new Query();
query.fields().exclude("details");
query.fields().exclude("noticeImage");
query.fields().exclude("ticketTimeList");
query.fields().exclude("describeElectronic");
query.addCriteria(Criteria.where("mid").in(toDayIds));
toDayList = mongoTemplate.find(query, KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());*/
}
return
toDayList
;
}
...
...
@@ -622,7 +626,11 @@ public class DataUtils {
List
<
String
>
threeDayIds
=
threeDaysList
.
stream
().
map
(
KylinPerformanceVo:
:
getPerformancesId
).
collect
(
Collectors
.
toList
());
//数字藏品
LocalDateTime
nowTimeTime
=
DateUtil
.
asLocalDateTime
((
Date
)
toDayTime
.
get
(
"start"
));
LocalDateTime
nowTimeTime
=
null
;
List
<
String
>
toDayNftIds
=
null
;
List
<
String
>
threeNftIds
=
null
;
try
{
nowTimeTime
=
DateUtil
.
asLocalDateTime
((
Date
)
toDayTime
.
get
(
"start"
));
LocalDateTime
toDayEndTime
=
DateUtil
.
asLocalDateTime
((
Date
)
toDayTime
.
get
(
"end"
));
LocalDateTime
threeEndTime
=
DateUtil
.
asLocalDateTime
(
beforeDayEnd
);
//查询预约(当天)
...
...
@@ -650,7 +658,7 @@ public class DataUtils {
queryToDayNft
.
with
(
sortNameToDayNft
);
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
=
mongoTemplate
.
find
(
queryToDayNft
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
// toDaysNftList.addAll(toDayAboutNft);
List
<
String
>
toDayNftIds
=
toDaysNftList
.
stream
().
map
(
GoblinGoodsSkuInfoVo:
:
getSkuId
).
collect
(
Collectors
.
toList
());
toDayNftIds
=
toDaysNftList
.
stream
().
map
(
GoblinGoodsSkuInfoVo:
:
getSkuId
).
collect
(
Collectors
.
toList
());
/*toDayNftIds.addAll(toDayAboutNft);*/
//三天的
...
...
@@ -664,11 +672,16 @@ public class DataUtils {
queryThreeNft
.
with
(
sortThreeNft
);
List
<
GoblinGoodsSkuInfoVo
>
threeNftList
=
mongoTemplate
.
find
(
queryThreeNft
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
// threeNftList.addAll(threeDayAboutNft);
List
<
String
>
threeNftIds
=
threeNftList
.
stream
().
map
(
GoblinGoodsSkuInfoVo:
:
getSkuId
).
collect
(
Collectors
.
toList
());
threeNftIds
=
threeNftList
.
stream
().
map
(
GoblinGoodsSkuInfoVo:
:
getSkuId
).
collect
(
Collectors
.
toList
());
/*threeNftIds.addAll(threeDayAboutNft);*/
}
catch
(
Exception
e
)
{
log
.
error
(
"get NftIds error!"
);
}
//组合购
List
<
String
>
toDayCombinationIds
=
null
;
List
<
String
>
threeDayCombinationIds
=
null
;
try
{
//当天
Query
queryToDayCombination
=
new
Query
();
Sort
sortToDayCombination
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"saleStartTime"
);
...
...
@@ -676,7 +689,7 @@ public class DataUtils {
queryToDayCombination
.
addCriteria
(
Criteria
.
where
(
"status"
).
ne
(
7
));
queryToDayCombination
.
with
(
sortToDayCombination
);
List
<
GoblinMixDetailsVo
>
toDayCombinationList
=
mongoTemplate
.
find
(
queryToDayCombination
,
GoblinMixDetailsVo
.
class
,
GoblinMixDetailsVo
.
class
.
getSimpleName
());
List
<
String
>
toDayCombinationIds
=
toDayCombinationList
.
stream
().
map
(
GoblinMixDetailsVo:
:
getMixId
).
collect
(
Collectors
.
toList
());
toDayCombinationIds
=
toDayCombinationList
.
stream
().
map
(
GoblinMixDetailsVo:
:
getMixId
).
collect
(
Collectors
.
toList
());
//三天
Query
queryThreeDayCombination
=
new
Query
();
Sort
sortThreeDayCombination
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"saleStartTime"
);
...
...
@@ -684,7 +697,10 @@ public class DataUtils {
queryThreeDayCombination
.
addCriteria
(
Criteria
.
where
(
"status"
).
ne
(
7
));
queryThreeDayCombination
.
with
(
sortThreeDayCombination
);
List
<
GoblinMixDetailsVo
>
threeDayCombinationList
=
mongoTemplate
.
find
(
queryThreeDayCombination
,
GoblinMixDetailsVo
.
class
,
GoblinMixDetailsVo
.
class
.
getSimpleName
());
List
<
String
>
threeDayCombinationIds
=
threeDayCombinationList
.
stream
().
map
(
GoblinMixDetailsVo:
:
getMixId
).
collect
(
Collectors
.
toList
());
threeDayCombinationIds
=
threeDayCombinationList
.
stream
().
map
(
GoblinMixDetailsVo:
:
getMixId
).
collect
(
Collectors
.
toList
());
}
catch
(
Exception
e
)
{
log
.
error
(
"get CombinationIds error!"
);
}
//缓存ids
...
...
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