记得上下班打卡 | 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
e4fab6bd
Commit
e4fab6bd
authored
Jul 13, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改:演出预告列表
parent
a28b26ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
72 deletions
+52
-72
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+52
-72
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 @
e4fab6bd
...
@@ -368,7 +368,6 @@ public class DataUtils {
...
@@ -368,7 +368,6 @@ public class DataUtils {
String
redisKeyIds
=
KylinRedisConst
.
PERFORMANCES_LIST_NOTICE_IDS
;
String
redisKeyIds
=
KylinRedisConst
.
PERFORMANCES_LIST_NOTICE_IDS
;
Object
obj
=
redisUtil
.
get
(
redisKeyIds
);
Object
obj
=
redisUtil
.
get
(
redisKeyIds
);
if
(
obj
!=
null
)
{
if
(
obj
!=
null
)
{
//获取ids
//获取ids
HashMap
<
String
,
Object
>
map
=
(
HashMap
<
String
,
Object
>)
obj
;
HashMap
<
String
,
Object
>
map
=
(
HashMap
<
String
,
Object
>)
obj
;
List
<
Integer
>
toDayIds
=
(
List
<
Integer
>)
map
.
get
(
"toDayIds"
);
List
<
Integer
>
toDayIds
=
(
List
<
Integer
>)
map
.
get
(
"toDayIds"
);
...
@@ -384,90 +383,25 @@ public class DataUtils {
...
@@ -384,90 +383,25 @@ public class DataUtils {
List
<
GoblinGoodsSkuInfoVo
>
threeNftList
=
new
ArrayList
<>();
List
<
GoblinGoodsSkuInfoVo
>
threeNftList
=
new
ArrayList
<>();
List
<
GoblinMixDetailsVo
>
toDayCombinationList
=
new
ArrayList
<>();
List
<
GoblinMixDetailsVo
>
toDayCombinationList
=
new
ArrayList
<>();
List
<
GoblinMixDetailsVo
>
threeDayCombinationList
=
new
ArrayList
<>();
List
<
GoblinMixDetailsVo
>
threeDayCombinationList
=
new
ArrayList
<>();
// 固定条件
// 固定条件
if
(
toDayIds
!=
null
&&
toDayIds
.
size
()
>
0
)
{
toDayList
=
getKylinPerformanceVos
(
toDayIds
,
toDayList
);
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
());
}
// 固定条件
// 固定条件
if
(
threeDayIds
!=
null
&&
threeDayIds
.
size
()
>
0
)
{
threeDaysList
=
getKylinPerformanceVos
(
threeDayIds
,
threeDaysList
);
Query
queryT
=
new
Query
();
queryT
.
fields
().
exclude
(
"details"
);
queryT
.
fields
().
exclude
(
"noticeImage"
);
queryT
.
fields
().
exclude
(
"ticketTimeList"
);
queryT
.
fields
().
exclude
(
"describeElectronic"
);
queryT
.
addCriteria
(
Criteria
.
where
(
"mid"
).
in
(
threeDayIds
));
threeDaysList
=
mongoTemplate
.
find
(
queryT
,
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
}
//数字藏品
//数字藏品
//当天
//当天
if
(
toDayNftIds
!=
null
&&
toDayNftIds
.
size
()
>
0
)
{
toDaysNftList
=
getGoblinGoodsSkuInfoVos
(
toDayNftIds
,
toDaysNftList
);
Query
queryToDayNft
=
new
Query
();
queryToDayNft
.
fields
().
exclude
(
"extagVoList"
);
queryToDayNft
.
addCriteria
(
Criteria
.
where
(
"skuId"
).
in
(
toDayNftIds
));
toDaysNftList
=
mongoTemplate
.
find
(
queryToDayNft
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
}
//三天的
//三天的
if
(
threeNftIds
!=
null
&&
threeNftIds
.
size
()
>
0
)
{
threeNftList
=
getGoblinGoodsSkuInfoVos
(
threeNftIds
,
threeNftList
);
Query
queryThreeNft
=
new
Query
();
queryThreeNft
.
fields
().
exclude
(
"extagVoList"
);
queryThreeNft
.
addCriteria
(
Criteria
.
where
(
"skuId"
).
in
(
threeNftIds
));
threeNftList
=
mongoTemplate
.
find
(
queryThreeNft
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
}
//组合购
//组合购
//当天
//当天
if
(
toDayCombinationIds
!=
null
&&
toDayCombinationIds
.
size
()
>
0
)
{
toDayCombinationList
=
getGoblinMixDetailsVos
(
toDayCombinationIds
,
toDayCombinationList
);
Query
queryToDayCombination
=
new
Query
();
Sort
sortToDayCombination
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"saleStartTime"
);
queryToDayCombination
.
with
(
sortToDayCombination
);
queryToDayCombination
.
fields
().
exclude
(
"details"
);
queryToDayCombination
.
addCriteria
(
Criteria
.
where
(
"mixId"
).
in
(
toDayCombinationIds
));
toDayCombinationList
=
mongoTemplate
.
find
(
queryToDayCombination
,
GoblinMixDetailsVo
.
class
,
GoblinMixDetailsVo
.
class
.
getSimpleName
());
toDayCombinationList
.
forEach
(
goblinMixDetailsVo
->
{
List
<
GoblinMixDetailsItemVo
>
item
=
goblinMixDetailsVo
.
getItem
();
item
.
forEach
(
goblinMixDetailsItemVo
->{
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"skuId"
).
is
(
goblinMixDetailsItemVo
.
getSkuId
()));
GoblinGoodsSkuInfoVo
one
=
mongoTemplate
.
findOne
(
query
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
if
(
one
!=
null
){
goblinMixDetailsItemVo
.
setSkuName
(
one
.
getName
());
}
});
});
}
//三天
//三天
if
(
threeDayCombinationIds
!=
null
&&
threeDayCombinationIds
.
size
()
>
0
)
{
threeDayCombinationList
=
getGoblinMixDetailsVos
(
threeDayCombinationIds
,
threeDayCombinationList
);
Query
queryThreeDayCombination
=
new
Query
();
Sort
sortThreeDayCombination
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"saleStartTime"
);
queryThreeDayCombination
.
with
(
sortThreeDayCombination
);
queryThreeDayCombination
.
fields
().
exclude
(
"details"
);
queryThreeDayCombination
.
addCriteria
(
Criteria
.
where
(
"mixId"
).
in
(
threeDayCombinationIds
));
threeDayCombinationList
=
mongoTemplate
.
find
(
queryThreeDayCombination
,
GoblinMixDetailsVo
.
class
,
GoblinMixDetailsVo
.
class
.
getSimpleName
());
threeDayCombinationList
.
forEach
(
goblinMixDetailsVo
->
{
List
<
GoblinMixDetailsItemVo
>
item
=
goblinMixDetailsVo
.
getItem
();
item
.
forEach
(
goblinMixDetailsItemVo
->{
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"skuId"
).
is
(
goblinMixDetailsItemVo
.
getSkuId
()));
GoblinGoodsSkuInfoVo
one
=
mongoTemplate
.
findOne
(
query
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
if
(
one
!=
null
){
goblinMixDetailsItemVo
.
setSkuName
(
one
.
getName
());
}
});
});
}
HashMap
<
String
,
Object
>
info
=
CollectionUtil
.
mapStringObject
();
HashMap
<
String
,
Object
>
info
=
CollectionUtil
.
mapStringObject
();
info
.
put
(
"toDayList"
,
toDayList
);
info
.
put
(
"toDayList"
,
toDayList
);
...
@@ -481,6 +415,52 @@ public class DataUtils {
...
@@ -481,6 +415,52 @@ public class DataUtils {
return
(
HashMap
<
String
,
Object
>)
obj
;
return
(
HashMap
<
String
,
Object
>)
obj
;
}
}
private
List
<
GoblinMixDetailsVo
>
getGoblinMixDetailsVos
(
List
<
String
>
toDayCombinationIds
,
List
<
GoblinMixDetailsVo
>
toDayCombinationList
)
{
if
(
toDayCombinationIds
!=
null
&&
toDayCombinationIds
.
size
()
>
0
)
{
Query
queryToDayCombination
=
new
Query
();
Sort
sortToDayCombination
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"saleStartTime"
);
queryToDayCombination
.
with
(
sortToDayCombination
);
queryToDayCombination
.
fields
().
exclude
(
"details"
);
queryToDayCombination
.
addCriteria
(
Criteria
.
where
(
"mixId"
).
in
(
toDayCombinationIds
));
toDayCombinationList
=
mongoTemplate
.
find
(
queryToDayCombination
,
GoblinMixDetailsVo
.
class
,
GoblinMixDetailsVo
.
class
.
getSimpleName
());
toDayCombinationList
.
forEach
(
goblinMixDetailsVo
->
{
List
<
GoblinMixDetailsItemVo
>
item
=
goblinMixDetailsVo
.
getItem
();
item
.
forEach
(
goblinMixDetailsItemVo
->{
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"skuId"
).
is
(
goblinMixDetailsItemVo
.
getSkuId
()));
GoblinGoodsSkuInfoVo
one
=
mongoTemplate
.
findOne
(
query
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
if
(
one
!=
null
){
goblinMixDetailsItemVo
.
setSkuName
(
one
.
getName
());
}
});
});
}
return
toDayCombinationList
;
}
private
List
<
GoblinGoodsSkuInfoVo
>
getGoblinGoodsSkuInfoVos
(
List
<
String
>
toDayNftIds
,
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
)
{
if
(
toDayNftIds
!=
null
&&
toDayNftIds
.
size
()
>
0
)
{
Query
queryToDayNft
=
new
Query
();
queryToDayNft
.
fields
().
exclude
(
"extagVoList"
);
queryToDayNft
.
addCriteria
(
Criteria
.
where
(
"skuId"
).
in
(
toDayNftIds
));
toDaysNftList
=
mongoTemplate
.
find
(
queryToDayNft
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
}
return
toDaysNftList
;
}
private
List
<
KylinPerformanceVo
>
getKylinPerformanceVos
(
List
<
Integer
>
toDayIds
,
List
<
KylinPerformanceVo
>
toDayList
)
{
if
(
toDayIds
!=
null
&&
toDayIds
.
size
()
>
0
)
{
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
;
}
//执行脚本
//执行脚本
public
HashMap
<
String
,
Object
>
setRedisIds
()
{
public
HashMap
<
String
,
Object
>
setRedisIds
()
{
// 固定条件
// 固定条件
...
...
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