Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sequoia_score
Overview
Overview
Details
Activity
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
mark
sequoia_score
Commits
1a284d6f
Commit
1a284d6f
authored
Aug 03, 2021
by
Lem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据结构
parent
b7f59d04
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
31 deletions
+12
-31
GetArticleListResponse.java
...m/live/common/domain/dto/back/GetArticleListResponse.java
+2
-0
ArticleServiceImpl.java
...java/com/live/common/service/impl/ArticleServiceImpl.java
+2
-0
MatchServiceImpl.java
...n/java/com/live/common/service/impl/MatchServiceImpl.java
+8
-31
No files found.
score-common/src/main/java/com/live/common/domain/dto/back/GetArticleListResponse.java
View file @
1a284d6f
...
@@ -28,6 +28,8 @@ public class GetArticleListResponse {
...
@@ -28,6 +28,8 @@ public class GetArticleListResponse {
private
Integer
readNum
;
private
Integer
readNum
;
private
String
dateTime
;
private
List
<
TagInfoResponse
>
tags
;
private
List
<
TagInfoResponse
>
tags
;
private
Integer
deleted
;
private
Integer
deleted
;
...
...
score-common/src/main/java/com/live/common/service/impl/ArticleServiceImpl.java
View file @
1a284d6f
...
@@ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
...
@@ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.sql.Date
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -541,6 +542,7 @@ public class ArticleServiceImpl implements ArticleService {
...
@@ -541,6 +542,7 @@ public class ArticleServiceImpl implements ArticleService {
.
build
()).
collect
(
Collectors
.
toList
()))
.
build
()).
collect
(
Collectors
.
toList
()))
.
deleted
(
article
.
getDeleted
())
.
deleted
(
article
.
getDeleted
())
.
readNum
(
article
.
getReadNum
())
.
readNum
(
article
.
getReadNum
())
.
dateTime
(
DateUtil
.
format
(
article
.
getReleaseTime
(),
DateUtil
.
MDHM_
))
.
build
());
.
build
());
}
}
return
responses
;
return
responses
;
...
...
score-common/src/main/java/com/live/common/service/impl/MatchServiceImpl.java
View file @
1a284d6f
...
@@ -166,6 +166,11 @@ public class MatchServiceImpl implements MatchService {
...
@@ -166,6 +166,11 @@ public class MatchServiceImpl implements MatchService {
break
;
break
;
}
}
List
<
MatchHomeListByDayResponse
>
responses
=
returnWebMatchList
(
request
,
matches
);
return
ResponseData
.
successResponse
(
new
ResultPage
<>(
commonStringId
.
getPageNum
(),
commonStringId
.
getPageSize
(),
(
int
)
count
,
responses
));
}
private
List
<
MatchHomeListByDayResponse
>
returnWebMatchList
(
HttpServletRequest
request
,
List
<
Match
>
matches
){
Map
<
String
,
List
<
MatchHomeListByDayResponse
.
MatchInfo
>>
responseMap
=
new
LinkedHashMap
<>();
Map
<
String
,
List
<
MatchHomeListByDayResponse
.
MatchInfo
>>
responseMap
=
new
LinkedHashMap
<>();
for
(
Match
match
:
matches
)
{
for
(
Match
match
:
matches
)
{
MatchHomeListByDayResponse
.
MatchInfo
matchInfo
=
new
MatchHomeListByDayResponse
.
MatchInfo
();
MatchHomeListByDayResponse
.
MatchInfo
matchInfo
=
new
MatchHomeListByDayResponse
.
MatchInfo
();
...
@@ -220,9 +225,7 @@ public class MatchServiceImpl implements MatchService {
...
@@ -220,9 +225,7 @@ public class MatchServiceImpl implements MatchService {
.
matchInfos
(
responseMap
.
get
(
key
))
.
matchInfos
(
responseMap
.
get
(
key
))
.
build
());
.
build
());
}
}
return
responses
;
return
ResponseData
.
successResponse
(
new
ResultPage
(
commonStringId
.
getPageNum
(),
commonStringId
.
getPageSize
(),
(
int
)
count
,
responses
));
}
}
@Override
@Override
...
@@ -854,34 +857,8 @@ public class MatchServiceImpl implements MatchService {
...
@@ -854,34 +857,8 @@ public class MatchServiceImpl implements MatchService {
}
}
}
}
MatchHomeListByDayResponse
response
=
new
MatchHomeListByDayResponse
();
List
<
MatchHomeListByDayResponse
>
responses
=
returnWebMatchList
(
request
,
matches
);
response
.
setMatchInfos
(
new
ArrayList
<>());
return
ResponseData
.
successResponse
(
new
ResultPage
<>(
commonPage
.
getPageNum
(),
commonPage
.
getPageSize
(),
(
int
)
count
,
responses
));
for
(
Match
match
:
matches
)
{
MatchHomeListByDayResponse
.
MatchInfo
matchInfo
=
new
MatchHomeListByDayResponse
.
MatchInfo
();
matchInfo
.
setSubscribed
(
true
);
Team
home
=
teamMapper
.
selectById
(
match
.
getHomeId
());
Team
away
=
teamMapper
.
selectById
(
match
.
getAwayId
());
Sports
sports
=
sportsMapper
.
selectById
(
match
.
getSportsId
());
matchInfo
.
setMatchId
(
match
.
getId
());
matchInfo
.
setMatchShortName
(
match
.
getCompetitionShortName
());
matchInfo
.
setAway
(
MatchListInfo
.
builder
()
.
teamName
(
away
.
getTeamName
())
.
teamLogo
(
away
.
getTeamIcon
())
.
score
(
match
.
getAwayScore
())
.
build
());
matchInfo
.
setHome
(
MatchListInfo
.
builder
()
.
teamName
(
home
.
getTeamName
())
.
teamLogo
(
home
.
getTeamIcon
())
.
score
(
match
.
getHomeScore
())
.
build
());
matchInfo
.
setMatchTime
(
DateUtil
.
format
(
match
.
getMatchTime
(),
DateUtil
.
HM_
));
matchInfo
.
setSportsType
(
sports
.
getSportsId
());
response
.
getMatchInfos
().
add
(
matchInfo
);
}
return
ResponseData
.
successResponse
(
new
ResultPage
<>(
commonPage
.
getPageNum
(),
commonPage
.
getPageSize
(),
(
int
)
count
,
response
));
}
}
@Override
@Override
...
...
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