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
6cf85669
Commit
6cf85669
authored
Jul 22, 2021
by
lenx065@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
赛事类型
parent
c810434a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
59 deletions
+63
-59
MatchHomeListByDayResponse.java
...ive/common/domain/dto/api/MatchHomeListByDayResponse.java
+3
-1
MatchService.java
...n/src/main/java/com/live/common/service/MatchService.java
+1
-1
MatchServiceImpl.java
...n/java/com/live/common/service/impl/MatchServiceImpl.java
+10
-8
MatchController.java
...main/java/com/live/server/controller/MatchController.java
+49
-49
No files found.
score-common/src/main/java/com/live/common/domain/dto/api/MatchHomeListByDayResponse.java
View file @
6cf85669
...
...
@@ -21,7 +21,9 @@ public class MatchHomeListByDayResponse {
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
static
class
MatchInfo
{
public
static
class
MatchInfo
{
// 0足球 1篮球
private
Integer
sportsType
;
private
String
matchShortName
;
private
String
matchTime
;
private
MatchListInfo
home
;
...
...
score-common/src/main/java/com/live/common/service/MatchService.java
View file @
6cf85669
...
...
@@ -26,7 +26,7 @@ public interface MatchService {
ResponseData
<?>
userCancelReserveMatch
(
CommonStringId
commonStringId
,
HttpServletRequest
request
);
ResponseData
<?>
userGetReserveMatch
(
HttpServletRequest
request
);
ResponseData
<?>
userGetReserveMatch
(
CommonPage
commonPage
,
HttpServletRequest
request
);
ResponseData
<?>
userGetAnchorList
(
HttpServletRequest
request
);
...
...
score-common/src/main/java/com/live/common/service/impl/MatchServiceImpl.java
View file @
6cf85669
...
...
@@ -119,6 +119,10 @@ public class MatchServiceImpl implements MatchService {
if
(
StringUtils
.
isNotBlank
(
commonStringId
.
getSportsId
()))
{
wrapper
.
eq
(
"sports_id"
,
commonStringId
.
getSportsId
());
}
if
(
StringUtils
.
isNotBlank
(
commonStringId
.
getMatchTime
())){
wrapper
.
ge
(
"match_time"
,
commonStringId
.
getMatchTime
()
+
" 00:00:00"
);
wrapper
.
le
(
"match_time"
,
commonStringId
.
getSportsId
()
+
" 23:59:59"
);
}
//-1 全部 0 展示正在进行 和 未开始 1 正在进行 2未开始 3完场
//1正在进行 2未开始 3完场 4 未知
...
...
@@ -179,6 +183,7 @@ public class MatchServiceImpl implements MatchService {
Team
home
=
teamMapper
.
selectById
(
match
.
getHomeId
());
Team
away
=
teamMapper
.
selectById
(
match
.
getAwayId
());
Sports
sports
=
sportsMapper
.
selectById
(
match
.
getSportsId
());
matchInfo
.
setMatchShortName
(
match
.
getCompetitionShortName
());
matchInfo
.
setAway
(
MatchListInfo
.
builder
()
...
...
@@ -192,6 +197,7 @@ public class MatchServiceImpl implements MatchService {
.
score
(
match
.
getHomeScore
())
.
build
());
matchInfo
.
setMatchTime
(
DateUtil
.
format
(
match
.
getMatchTime
(),
DateUtil
.
HM_
));
matchInfo
.
setSportsType
(
sports
.
getSportsId
());
response
.
getMatchInfos
().
add
(
matchInfo
);
}
...
...
@@ -349,7 +355,9 @@ public class MatchServiceImpl implements MatchService {
}
@Override
public
ResponseData
<?>
userGetReserveMatch
(
HttpServletRequest
request
)
{
public
ResponseData
<?>
userGetReserveMatch
(
CommonPage
commonPage
,
HttpServletRequest
request
)
{
int
jumpNum
=
(
commonPage
.
getPageNum
()
-
1
)
*
commonPage
.
getPageSize
();
String
userPhone
=
CommonMethod
.
getUserPhone
(
request
);
User
account
=
userMapper
.
selectOne
(
Wrappers
.<
User
>
lambdaQuery
()
.
eq
(
User:
:
getPhone
,
userPhone
)
...
...
@@ -358,6 +366,7 @@ public class MatchServiceImpl implements MatchService {
List
<
UserReserve
>
userReserves
=
userReserveMapper
.
selectList
(
Wrappers
.<
UserReserve
>
lambdaQuery
()
.
eq
(
UserReserve:
:
getUserId
,
account
.
getId
())
.
eq
(
UserReserve:
:
getDeleted
,
0
)
.
last
(
String
.
format
(
" limit %s,%s"
,
jumpNum
,
commonPage
.
getPageSize
()))
);
List
<
Match
>
matches
=
new
ArrayList
<>();
...
...
@@ -2225,12 +2234,6 @@ public class MatchServiceImpl implements MatchService {
* @return
*/
private
MatchListResponse
.
MatchInfoResponse
conversionMatchInfo
(
Match
match
,
Integer
sportsType
,
Team
awayTeam
,
Team
homeTeam
,
boolean
otherAnchors
)
{
List
<
MatchListResponse
.
GuideResponse
>
guideResponseList
=
new
ArrayList
<>();
if
(
otherAnchors
)
{
guideResponseList
=
guidesByMatchId
(
match
.
getId
());
}
return
MatchListResponse
.
MatchInfoResponse
.
builder
()
.
id
(
match
.
getId
())
.
matchName
(
match
.
getCompetitionName
())
...
...
@@ -2254,7 +2257,6 @@ public class MatchServiceImpl implements MatchService {
.
build
())
.
homeScore
(
match
.
getHomeScore
())
.
awayScore
(
match
.
getAwayScore
())
.
guides
(
guideResponseList
)
.
build
();
}
...
...
score-server/src/main/java/com/live/server/controller/MatchController.java
View file @
6cf85669
...
...
@@ -153,57 +153,57 @@ public class MatchController {
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"登录凭证(登录后 token 值)"
,
dataType
=
"String"
,
paramType
=
"header"
,
required
=
true
)
})
public
ResponseData
<?>
userGetReserveMatch
(
HttpServletRequest
request
)
{
return
matchService
.
userGetReserveMatch
(
request
);
public
ResponseData
<?>
userGetReserveMatch
(
@RequestBody
CommonPage
commonPage
,
HttpServletRequest
request
)
{
return
matchService
.
userGetReserveMatch
(
commonPage
,
request
);
}
@PostMapping
(
value
=
"/userFollowAnchor"
)
@ApiOperation
(
value
=
"用户关注主播 房间ID"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"成功处理请求"
),
@ApiResponse
(
code
=
401
,
message
=
"没有权限访问该服务"
),
@ApiResponse
(
code
=
403
,
message
=
"权限不足无法访问该服务"
),
@ApiResponse
(
code
=
404
,
message
=
"未发现该服务"
),
@ApiResponse
(
code
=
500
,
message
=
"服务器内部错误"
)
})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"登录凭证(登录后 token 值)"
,
dataType
=
"String"
,
paramType
=
"header"
,
required
=
true
)
})
public
ResponseData
<?>
userFollowAnchor
(
@RequestBody
CommonStringId
commonIntId
,
HttpServletRequest
request
)
{
return
matchService
.
userFollowAnchor
(
commonIntId
,
request
);
}
@PostMapping
(
value
=
"/userUnFollowAnchor"
)
@ApiOperation
(
value
=
"用户取消关注 房间ID"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"成功处理请求"
),
@ApiResponse
(
code
=
401
,
message
=
"没有权限访问该服务"
),
@ApiResponse
(
code
=
403
,
message
=
"权限不足无法访问该服务"
),
@ApiResponse
(
code
=
404
,
message
=
"未发现该服务"
),
@ApiResponse
(
code
=
500
,
message
=
"服务器内部错误"
)
})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"登录凭证(登录后 token 值)"
,
dataType
=
"String"
,
paramType
=
"header"
,
required
=
true
)
})
public
ResponseData
<?>
userUnFollowAnchor
(
@RequestBody
CommonStringId
commonIntId
,
HttpServletRequest
request
)
{
return
matchService
.
userUnFollowAnchor
(
commonIntId
,
request
);
}
@PostMapping
(
value
=
"/userGetAnchorList"
)
@ApiOperation
(
value
=
"获取用户关注的主播列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"成功处理请求"
),
@ApiResponse
(
code
=
401
,
message
=
"没有权限访问该服务"
),
@ApiResponse
(
code
=
403
,
message
=
"权限不足无法访问该服务"
),
@ApiResponse
(
code
=
404
,
message
=
"未发现该服务"
),
@ApiResponse
(
code
=
500
,
message
=
"服务器内部错误"
)
})
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"登录凭证(登录后 token 值)"
,
dataType
=
"String"
,
paramType
=
"header"
,
required
=
true
)
})
public
ResponseData
<?>
userGetAnchorList
(
HttpServletRequest
request
)
{
return
matchService
.
userGetAnchorList
(
request
);
}
//
@PostMapping(value = "/userFollowAnchor")
//
@ApiOperation(value = "用户关注主播 房间ID")
//
@ApiResponses({
//
@ApiResponse(code = 200, message = "成功处理请求"),
//
@ApiResponse(code = 401, message = "没有权限访问该服务"),
//
@ApiResponse(code = 403, message = "权限不足无法访问该服务"),
//
@ApiResponse(code = 404, message = "未发现该服务"),
//
@ApiResponse(code = 500, message = "服务器内部错误")
//
})
//
@ApiImplicitParams({
//
@ApiImplicitParam(name = "token", value = "登录凭证(登录后 token 值)", dataType = "String", paramType = "header", required = true)
//
})
//
public ResponseData<?> userFollowAnchor(@RequestBody CommonStringId commonIntId, HttpServletRequest request) {
//
return matchService.userFollowAnchor(commonIntId, request);
//
}
//
//
@PostMapping(value = "/userUnFollowAnchor")
//
@ApiOperation(value = "用户取消关注 房间ID")
//
@ApiResponses({
//
@ApiResponse(code = 200, message = "成功处理请求"),
//
@ApiResponse(code = 401, message = "没有权限访问该服务"),
//
@ApiResponse(code = 403, message = "权限不足无法访问该服务"),
//
@ApiResponse(code = 404, message = "未发现该服务"),
//
@ApiResponse(code = 500, message = "服务器内部错误")
//
})
//
@ApiImplicitParams({
//
@ApiImplicitParam(name = "token", value = "登录凭证(登录后 token 值)", dataType = "String", paramType = "header", required = true)
//
})
//
public ResponseData<?> userUnFollowAnchor(@RequestBody CommonStringId commonIntId, HttpServletRequest request) {
//
return matchService.userUnFollowAnchor(commonIntId, request);
//
}
//
//
@PostMapping(value = "/userGetAnchorList")
//
@ApiOperation(value = "获取用户关注的主播列表")
//
@ApiResponses({
//
@ApiResponse(code = 200, message = "成功处理请求"),
//
@ApiResponse(code = 401, message = "没有权限访问该服务"),
//
@ApiResponse(code = 403, message = "权限不足无法访问该服务"),
//
@ApiResponse(code = 404, message = "未发现该服务"),
//
@ApiResponse(code = 500, message = "服务器内部错误")
//
})
//
@ApiImplicitParams({
//
@ApiImplicitParam(name = "token", value = "登录凭证(登录后 token 值)", dataType = "String", paramType = "header", required = true)
//
})
//
public ResponseData<?> userGetAnchorList(HttpServletRequest request) {
//
return matchService.userGetAnchorList(request);
//
}
@PostMapping
(
value
=
"/matchInfoBasketball"
)
@ApiOperation
(
value
=
"根据ID获取赛事详情 篮球 接口"
)
...
...
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