记得上下班打卡 | 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
8584a795
Commit
8584a795
authored
May 25, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
演出日历增加城市名参数
parent
9a92c31a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
KylinPerformancesController.java
...service/kylin/controller/KylinPerformancesController.java
+6
-3
KylinPerformancesServiceImpl.java
...vice/kylin/service/impl/KylinPerformancesServiceImpl.java
+8
-2
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinPerformancesController.java
View file @
8584a795
...
...
@@ -99,11 +99,14 @@ public class KylinPerformancesController {
@SneakyThrows
@GetMapping
(
value
=
"calendar"
)
@ApiOperation
(
"演出日历"
)
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"yearMonth"
,
value
=
"年月 2021-01"
,
required
=
true
)
public
ResponseDto
<
List
>
performanceList
(
@RequestParam
String
yearMonth
)
throws
ParseException
{
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"yearMonth"
,
value
=
"年月 2021-01"
,
required
=
true
),
@ApiImplicitParam
(
type
=
"query"
,
dataType
=
"String"
,
name
=
"cityName"
,
value
=
"城市名称"
,
required
=
true
)
})
public
ResponseDto
<
List
>
performanceList
(
@RequestParam
String
yearMonth
,
@RequestParam
String
cityName
)
throws
ParseException
{
List
result
=
null
;
try
{
result
=
kylinPerformancesService
.
performanceCalendar
(
yearMonth
);
result
=
kylinPerformancesService
.
performanceCalendar
(
yearMonth
,
cityName
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinPerformancesServiceImpl.java
View file @
8584a795
...
...
@@ -344,14 +344,20 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
return
list
;
}
public
List
performanceCalendar
(
String
yearMonth
)
throws
ParseException
{
public
List
performanceCalendar
(
String
yearMonth
,
String
cityName
)
throws
ParseException
{
Document
queryObject
=
new
Document
();
if
(!
cityName
.
isEmpty
())
{
queryObject
.
put
(
"cityName"
,
Pattern
.
compile
(
cityName
,
Pattern
.
CASE_INSENSITIVE
));
}
Query
query
=
new
BasicQuery
(
queryObject
);
// 处理成正常格式
yearMonth
=
yearMonth
.
concat
(
"-01 00:00:00"
);
// 获取此月开始结束时间
String
monthStart
=
DateUtil
.
getMonthFirst
(
yearMonth
);
String
monthEnd
=
DateUtil
.
getMonthLast
(
yearMonth
);
Query
query
=
Query
.
query
(
Criteria
.
where
(
"timeStart"
).
gte
(
monthStart
).
lte
(
monthEnd
));
query
.
addCriteria
(
Criteria
.
where
(
"timeStart"
).
gte
(
monthStart
).
lte
(
monthEnd
));
query
.
fields
().
include
(
"timeStart"
);
List
<
KylinPerformanceVo
>
list
=
mongoTemplate
.
find
(
query
,
KylinPerformanceVo
.
class
,
KylinPerformanceVo
.
class
.
getSimpleName
());
...
...
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