记得上下班打卡 | 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
32ab5294
Commit
32ab5294
authored
Jun 19, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
所有演出之获取 appstatus = 3,6,8,9 大部分列表增加状态判断
parent
ff485f12
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
29 deletions
+36
-29
KylinPerformancesServiceImpl.java
...vice/kylin/service/impl/KylinPerformancesServiceImpl.java
+31
-20
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+5
-9
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinPerformancesServiceImpl.java
View file @
32ab5294
...
@@ -96,18 +96,12 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -96,18 +96,12 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
if
(
recommend
>
0
)
{
// 去重
if
(
recommend
>
0
)
{
// 去重
List
<
KylinPerformanceVo
>
collect
=
performancesListRecommend
.
stream
().
filter
(
r
->
!
performancesIds
.
contains
(
r
.
getPerformancesId
())).
collect
(
Collectors
.
toList
());
List
<
KylinPerformanceVo
>
collect
=
performancesListRecommend
.
stream
().
filter
(
r
->
!
performancesIds
.
contains
(
r
.
getPerformancesId
())).
collect
(
Collectors
.
toList
());
performancesListNew
.
addAll
(
collect
);
performancesListNew
.
addAll
(
collect
);
/*for(KylinPerformanceVo recommendInfo : performancesListRecommend) {
for(KylinPerformanceVo info : performancesListNew) {
if (!recommendInfo.getPerformancesId().equals(info.getPerformancesId())) {
performancesListNewUnqui.add(recommendInfo);
}
}
}*/
}
else
{
}
else
{
performancesListNew
.
addAll
(
performancesListRecommend
);
performancesListNew
.
addAll
(
performancesListRecommend
);
}
}
}
}
}
}
performancesListNew
=
checkAppStatus
(
performancesListNew
);
// 组合数据
// 组合数据
HashMap
<
String
,
Object
>
info
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
info
=
new
HashMap
<>();
...
@@ -129,11 +123,13 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -129,11 +123,13 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
public
List
<
KylinPerformanceVo
>
recommendList
()
{
public
List
<
KylinPerformanceVo
>
recommendList
()
{
List
<
KylinPerformanceVo
>
performancesListRecommend
=
dataUtils
.
getPerformancesListIsRecommend
();
List
<
KylinPerformanceVo
>
performancesListRecommend
=
dataUtils
.
getPerformancesListIsRecommend
();
performancesListRecommend
=
checkAppStatus
(
performancesListRecommend
);
return
performancesListRecommend
;
return
performancesListRecommend
;
}
}
public
List
<
KylinPerformanceVo
>
exclusiveList
()
{
public
List
<
KylinPerformanceVo
>
exclusiveList
()
{
List
<
KylinPerformanceVo
>
performancesListExclusive
=
dataUtils
.
getPerformancesListIsExclusive
();
List
<
KylinPerformanceVo
>
performancesListExclusive
=
dataUtils
.
getPerformancesListIsExclusive
();
performancesListExclusive
=
checkAppStatus
(
performancesListExclusive
);
return
performancesListExclusive
;
return
performancesListExclusive
;
}
}
...
@@ -171,6 +167,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -171,6 +167,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
public
List
<
KylinPerformanceVo
>
roadList
(
String
roadShowId
)
{
public
List
<
KylinPerformanceVo
>
roadList
(
String
roadShowId
)
{
List
<
KylinPerformanceVo
>
performancesList
=
dataUtils
.
getRoadList
(
roadShowId
);
List
<
KylinPerformanceVo
>
performancesList
=
dataUtils
.
getRoadList
(
roadShowId
);
performancesList
=
checkAppStatus
(
performancesList
);
return
performancesList
;
return
performancesList
;
}
}
...
@@ -236,6 +233,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -236,6 +233,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
KylinPerformanceVo
info
=
dataUtils
.
getPerformanceVo
(
id
);
KylinPerformanceVo
info
=
dataUtils
.
getPerformanceVo
(
id
);
performanceList
.
add
(
info
);
performanceList
.
add
(
info
);
}
}
performanceList
=
checkAppStatus
(
performanceList
);
return
performanceList
;
return
performanceList
;
}
}
...
@@ -275,6 +273,8 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -275,6 +273,8 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
}
}
}
}
performancesListNew
=
checkAppStatus
(
performancesListNew
);
return
performancesListNew
;
return
performancesListNew
;
}
}
...
@@ -284,6 +284,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -284,6 +284,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
Query
query
=
new
BasicQuery
(
queryObject
);
Query
query
=
new
BasicQuery
(
queryObject
);
String
nowTimeStr
=
DateUtil
.
getNowTime
();
String
nowTimeStr
=
DateUtil
.
getNowTime
();
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"appStatus"
).
in
(
3
,
6
,
8
,
9
));
long
count
=
mongoTemplate
.
count
(
query
,
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
long
count
=
mongoTemplate
.
count
(
query
,
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
...
@@ -297,19 +298,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -297,19 +298,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
List
<
KylinPerformanceVo
>
list
=
mongoTemplate
.
find
(
query
,
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
List
<
KylinPerformanceVo
>
list
=
mongoTemplate
.
find
(
query
,
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
for
(
KylinPerformanceVo
info
:
list
)
{
list
=
checkAppStatus
(
list
);
String
timeStart
=
info
.
getSellTime
();
String
timeEnd
=
info
.
getStopSellTime
();
if
(
1
==
DateUtil
.
compareStrDay
(
timeStart
,
nowTimeStr
))
{
// 未开始
info
.
setAppStatus
(
9
);
}
else
{
// 已开始
info
.
setAppStatus
(
6
);
if
(
1
==
DateUtil
.
compareStrDay
(
nowTimeStr
,
timeEnd
))
{
// 已结束
info
.
setAppStatus
(
10
);
}
}
}
HashMap
info
=
new
HashMap
();
HashMap
info
=
new
HashMap
();
info
.
put
(
"total"
,
count
);
info
.
put
(
"total"
,
count
);
...
@@ -366,6 +355,28 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
...
@@ -366,6 +355,28 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
return
payDetailVo
;
return
payDetailVo
;
}
}
public
List
<
KylinPerformanceVo
>
checkAppStatus
(
List
<
KylinPerformanceVo
>
list
)
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
String
nowTimeStr
=
DateUtil
.
getNowTime
();
for
(
KylinPerformanceVo
info
:
list
)
{
String
timeStart
=
info
.
getSellTime
();
String
timeEnd
=
info
.
getStopSellTime
();
if
(
info
.
getAppStatus
()
!=
8
)
{
if
(
1
==
DateUtil
.
compareStrDay
(
timeStart
,
nowTimeStr
))
{
// 未开始
info
.
setAppStatus
(
9
);
}
else
{
// 已开始
info
.
setAppStatus
(
6
);
if
(
1
==
DateUtil
.
compareStrDay
(
nowTimeStr
,
timeEnd
))
{
// 已结束
info
.
setAppStatus
(
10
);
}
}
}
}
}
return
list
;
}
public
String
checkPerformanceTime
(
String
performancesId
){
public
String
checkPerformanceTime
(
String
performancesId
){
try
{
try
{
task
.
performanceVoStatus
(
performancesId
);
task
.
performanceVoStatus
(
performancesId
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
32ab5294
...
@@ -504,6 +504,7 @@ public class DataUtils {
...
@@ -504,6 +504,7 @@ public class DataUtils {
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"appStatus"
).
in
(
3
,
6
,
8
,
9
));
// 其他条件
// 其他条件
Pattern
cityNameCompile
=
Pattern
.
compile
(
"^.*"
+
cityName
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
Pattern
cityNameCompile
=
Pattern
.
compile
(
"^.*"
+
cityName
+
".*$"
,
Pattern
.
CASE_INSENSITIVE
);
query
.
addCriteria
(
Criteria
.
where
(
"cityName"
).
regex
(
cityNameCompile
));
query
.
addCriteria
(
Criteria
.
where
(
"cityName"
).
regex
(
cityNameCompile
));
...
@@ -521,15 +522,6 @@ public class DataUtils {
...
@@ -521,15 +522,6 @@ public class DataUtils {
return
(
List
<
KylinPerformanceVo
>)
redisUtil
.
get
(
redisKey
);
return
(
List
<
KylinPerformanceVo
>)
redisUtil
.
get
(
redisKey
);
}
}
/**
* 删除演出列表redis
*
* @param cityName
*/
public
void
delPerformancesListOfcityName
(
String
cityName
)
{
redisUtil
.
del
(
KylinRedisConst
.
ORDER_ENTITIES
.
concat
(
cityName
));
}
/**
/**
* 获取系统推荐演出列表redis
* 获取系统推荐演出列表redis
*/
*/
...
@@ -541,6 +533,7 @@ public class DataUtils {
...
@@ -541,6 +533,7 @@ public class DataUtils {
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"appStatus"
).
in
(
3
,
6
,
8
,
9
));
// 排序
// 排序
Sort
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"timeStart"
);
Sort
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"timeStart"
);
Pageable
pageable
=
PageRequest
.
of
(
0
,
8
,
sortName
);
Pageable
pageable
=
PageRequest
.
of
(
0
,
8
,
sortName
);
...
@@ -568,6 +561,7 @@ public class DataUtils {
...
@@ -568,6 +561,7 @@ public class DataUtils {
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
String
nowTimeStr
=
nowTime
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
));
String
nowTimeStr
=
nowTime
.
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
));
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"appStatus"
).
in
(
3
,
6
,
8
,
9
));
// 今天的
// 今天的
HashMap
toDayTime
=
DateUtil
.
oneDayStartEnd
();
HashMap
toDayTime
=
DateUtil
.
oneDayStartEnd
();
...
@@ -619,6 +613,7 @@ public class DataUtils {
...
@@ -619,6 +613,7 @@ public class DataUtils {
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"appStatus"
).
in
(
3
,
6
,
8
,
9
));
// 排序
// 排序
Sort
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"timeStart"
);
Sort
sortName
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"timeStart"
);
query
.
with
(
sortName
);
query
.
with
(
sortName
);
...
@@ -646,6 +641,7 @@ public class DataUtils {
...
@@ -646,6 +641,7 @@ public class DataUtils {
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
String
nowTimeStr
=
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
nowTime
);
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"timeEnd"
).
gte
(
nowTimeStr
));
query
.
addCriteria
(
Criteria
.
where
(
"appStatus"
).
in
(
3
,
6
,
8
,
9
));
// 不要查询的字段
// 不要查询的字段
query
.
fields
().
exclude
(
"details"
);
query
.
fields
().
exclude
(
"details"
);
query
.
fields
().
exclude
(
"noticeImage"
);
query
.
fields
().
exclude
(
"noticeImage"
);
...
...
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