记得上下班打卡 | 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
368550bd
Commit
368550bd
authored
Jul 13, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_notice_0708' into dev_notice_0708
parents
4a53976b
353c5966
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
21 deletions
+49
-21
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+49
-21
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 @
368550bd
...
...
@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.utils;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.dto.manage.vo.GoblinGoodsAnticipateValueVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinGoodsSkuInfoVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinMixDetailsItemVo
;
...
...
@@ -369,31 +370,25 @@ public class DataUtils {
List
<
String
>
toDayCombinationIds
=
(
List
<
String
>)
map
.
get
(
"toDayCombinationIds"
);
List
<
String
>
threeDayCombinationIds
=
(
List
<
String
>)
map
.
get
(
"threeDayCombinationIds"
);
List
<
KylinPerformanceVo
>
toDayList
=
new
ArrayList
<>();
List
<
KylinPerformanceVo
>
threeDaysList
=
new
ArrayList
<>();
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
=
new
ArrayList
<>();
List
<
GoblinGoodsSkuInfoVo
>
threeNftList
=
new
ArrayList
<>();
List
<
GoblinMixDetailsVo
>
toDayCombinationList
=
new
ArrayList
<>();
List
<
GoblinMixDetailsVo
>
threeDayCombinationList
=
new
ArrayList
<>();
// 固定条件
toDayList
=
getKylinPerformanceVos
(
toDayIds
,
toDayList
);
List
<
KylinPerformanceVo
>
toDayList
=
getKylinPerformanceVos
(
toDayIds
);
// 固定条件
threeDaysList
=
getKylinPerformanceVos
(
threeDayIds
,
threeDaysList
);
List
<
KylinPerformanceVo
>
threeDaysList
=
getKylinPerformanceVos
(
threeDayIds
);
//数字藏品
//当天
toDaysNftList
=
getGoblinGoodsSkuInfoVos
(
toDayNftIds
,
toDaysNftList
);
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
=
getGoblinGoodsSkuInfoVos
(
toDayNftIds
);
//三天的
threeNftList
=
getGoblinGoodsSkuInfoVos
(
threeNftIds
,
threeNftList
);
List
<
GoblinGoodsSkuInfoVo
>
threeNftList
=
getGoblinGoodsSkuInfoVos
(
threeNftIds
);
//组合购
//当天
toDayCombinationList
=
getGoblinMixDetailsVos
(
toDayCombinationIds
,
toDayCombinationList
);
List
<
GoblinMixDetailsVo
>
toDayCombinationList
=
getGoblinMixDetailsVos
(
toDayCombinationIds
);
//三天
threeDayCombinationList
=
getGoblinMixDetailsVos
(
threeDayCombinationIds
,
threeDayCombinationList
);
List
<
GoblinMixDetailsVo
>
threeDayCombinationList
=
getGoblinMixDetailsVos
(
threeDayCombinationIds
);
HashMap
<
String
,
Object
>
info
=
CollectionUtil
.
mapStringObject
();
info
.
put
(
"toDayList"
,
toDayList
);
...
...
@@ -407,9 +402,26 @@ public class DataUtils {
return
(
HashMap
<
String
,
Object
>)
obj
;
}
private
List
<
GoblinMixDetailsVo
>
getGoblinMixDetailsVos
(
List
<
String
>
toDayCombinationIds
,
List
<
GoblinMixDetailsVo
>
toDayCombinationList
)
{
private
List
<
GoblinMixDetailsVo
>
getGoblinMixDetailsVos
(
List
<
String
>
toDayCombinationIds
)
{
List
<
GoblinMixDetailsVo
>
toDayCombinationList
=
new
ArrayList
<>();
String
rdk
=
GoblinRedisConst
.
GOBLIN_MIX_DETAILS
;
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_SKU
;
if
(
toDayCombinationIds
!=
null
&&
toDayCombinationIds
.
size
()
>
0
)
{
Query
queryToDayCombination
=
new
Query
();
toDayCombinationIds
.
forEach
(
id
->{
Object
obj
=
redisUtil
.
get
(
rdk
.
concat
(
id
));
if
(
obj
!=
null
){
GoblinMixDetailsVo
goblinMixDetailsVo
=
(
GoblinMixDetailsVo
)
obj
;
goblinMixDetailsVo
.
getItem
().
forEach
(
goblinMixDetailsItemVo
->{
Object
objRk
=
redisUtil
.
get
(
rk
.
concat
(
goblinMixDetailsItemVo
.
getSkuId
()));
if
(
objRk
!=
null
){
goblinMixDetailsItemVo
.
setSkuName
(((
GoblinGoodsSkuInfoVo
)
objRk
).
getName
());
}
});
toDayCombinationList
.
add
(
goblinMixDetailsVo
);
}
});
/*Query queryToDayCombination = new Query();
Sort sortToDayCombination = Sort.by(Sort.Direction.ASC, "saleStartTime");
queryToDayCombination.with(sortToDayCombination);
queryToDayCombination.fields().exclude("details");
...
...
@@ -425,30 +437,46 @@ public class DataUtils {
goblinMixDetailsItemVo.setSkuName(one.getName());
}
});
});
});
*/
}
return
toDayCombinationList
;
}
private
List
<
GoblinGoodsSkuInfoVo
>
getGoblinGoodsSkuInfoVos
(
List
<
String
>
toDayNftIds
,
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
)
{
private
List
<
GoblinGoodsSkuInfoVo
>
getGoblinGoodsSkuInfoVos
(
List
<
String
>
toDayNftIds
)
{
List
<
GoblinGoodsSkuInfoVo
>
toDaysNftList
=
new
ArrayList
<>();
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_SKU
;
if
(
toDayNftIds
!=
null
&&
toDayNftIds
.
size
()
>
0
)
{
Query
queryToDayNft
=
new
Query
();
toDayNftIds
.
forEach
(
id
->
{
Object
obj
=
redisUtil
.
get
(
rk
.
concat
(
id
));
if
(
obj
!=
null
){
toDaysNftList
.
add
((
GoblinGoodsSkuInfoVo
)
obj
);
}
});
/*Query queryToDayNft = new Query();
queryToDayNft.fields().exclude("extagVoList");
queryToDayNft.addCriteria(Criteria.where("skuId").in(toDayNftIds));
toDaysNftList
=
mongoTemplate
.
find
(
queryToDayNft
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
toDaysNftList = mongoTemplate.find(queryToDayNft, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
*/
}
return
toDaysNftList
;
}
private
List
<
KylinPerformanceVo
>
getKylinPerformanceVos
(
List
<
Integer
>
toDayIds
,
List
<
KylinPerformanceVo
>
toDayList
)
{
private
List
<
KylinPerformanceVo
>
getKylinPerformanceVos
(
List
<
Integer
>
toDayIds
)
{
List
<
KylinPerformanceVo
>
toDayList
=
new
ArrayList
<>();
String
key
=
KylinRedisConst
.
PERFORMANCES
;
if
(
toDayIds
!=
null
&&
toDayIds
.
size
()
>
0
)
{
Query
query
=
new
Query
();
toDayIds
.
forEach
(
id
->
{
Object
obj
=
redisUtil
.
get
(
key
+
id
);
if
(
obj
!=
null
)
{
toDayList
.
add
((
KylinPerformanceVo
)
obj
);
}
});
/*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
());
toDayList = mongoTemplate.find(query, KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
*/
}
return
toDayList
;
}
...
...
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