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
0cf8c609
Commit
0cf8c609
authored
Jul 22, 2021
by
lenx065@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关注
parent
6cf85669
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
17 deletions
+50
-17
MatchServiceImpl.java
...n/java/com/live/common/service/impl/MatchServiceImpl.java
+38
-5
UserController.java
.../main/java/com/live/server/controller/UserController.java
+12
-12
No files found.
score-common/src/main/java/com/live/common/service/impl/MatchServiceImpl.java
View file @
0cf8c609
...
@@ -119,7 +119,7 @@ public class MatchServiceImpl implements MatchService {
...
@@ -119,7 +119,7 @@ public class MatchServiceImpl implements MatchService {
if
(
StringUtils
.
isNotBlank
(
commonStringId
.
getSportsId
()))
{
if
(
StringUtils
.
isNotBlank
(
commonStringId
.
getSportsId
()))
{
wrapper
.
eq
(
"sports_id"
,
commonStringId
.
getSportsId
());
wrapper
.
eq
(
"sports_id"
,
commonStringId
.
getSportsId
());
}
}
if
(
StringUtils
.
isNotBlank
(
commonStringId
.
getMatchTime
()))
{
if
(
StringUtils
.
isNotBlank
(
commonStringId
.
getMatchTime
()))
{
wrapper
.
ge
(
"match_time"
,
commonStringId
.
getMatchTime
()
+
" 00:00:00"
);
wrapper
.
ge
(
"match_time"
,
commonStringId
.
getMatchTime
()
+
" 00:00:00"
);
wrapper
.
le
(
"match_time"
,
commonStringId
.
getSportsId
()
+
" 23:59:59"
);
wrapper
.
le
(
"match_time"
,
commonStringId
.
getSportsId
()
+
" 23:59:59"
);
}
}
...
@@ -363,6 +363,11 @@ public class MatchServiceImpl implements MatchService {
...
@@ -363,6 +363,11 @@ public class MatchServiceImpl implements MatchService {
.
eq
(
User:
:
getPhone
,
userPhone
)
.
eq
(
User:
:
getPhone
,
userPhone
)
);
);
long
count
=
userReserveMapper
.
selectCount
(
Wrappers
.<
UserReserve
>
lambdaQuery
()
.
eq
(
UserReserve:
:
getUserId
,
account
.
getId
())
.
eq
(
UserReserve:
:
getDeleted
,
0
)
);
List
<
UserReserve
>
userReserves
=
userReserveMapper
.
selectList
(
Wrappers
.<
UserReserve
>
lambdaQuery
()
List
<
UserReserve
>
userReserves
=
userReserveMapper
.
selectList
(
Wrappers
.<
UserReserve
>
lambdaQuery
()
.
eq
(
UserReserve:
:
getUserId
,
account
.
getId
())
.
eq
(
UserReserve:
:
getUserId
,
account
.
getId
())
.
eq
(
UserReserve:
:
getDeleted
,
0
)
.
eq
(
UserReserve:
:
getDeleted
,
0
)
...
@@ -371,12 +376,40 @@ public class MatchServiceImpl implements MatchService {
...
@@ -371,12 +376,40 @@ public class MatchServiceImpl implements MatchService {
List
<
Match
>
matches
=
new
ArrayList
<>();
List
<
Match
>
matches
=
new
ArrayList
<>();
if
(
userReserves
.
size
()
>
0
)
{
if
(
userReserves
.
size
()
>
0
)
{
matches
=
matchMapper
.
selectBatchIds
(
userReserves
.
stream
().
map
(
UserReserve:
:
getMatchId
).
collect
(
Collectors
.
toSet
()));
matches
=
matchMapper
.
selectList
(
Wrappers
.<
Match
>
lambdaQuery
()
.
in
(
Match:
:
getId
,
userReserves
.
stream
().
map
(
UserReserve:
:
getMatchId
).
collect
(
Collectors
.
toSet
()))
.
eq
(
Match:
:
getDeleted
,
0
)
.
orderByDesc
(
Match:
:
getMatchTime
)
);
}
}
MatchListResponse
result
=
conversionByList
(
matches
,
true
);
MatchHomeListByDayResponse
response
=
new
MatchHomeListByDayResponse
();
result
.
getMatchLists
().
forEach
(
b
->
b
.
getMatchInfos
().
forEach
(
c
->
c
.
setSubscribe
(
true
)));
for
(
Match
match
:
matches
)
{
return
ResponseData
.
successResponse
(
result
);
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
.
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
...
...
score-server/src/main/java/com/live/server/controller/UserController.java
View file @
0cf8c609
...
@@ -47,18 +47,18 @@ public class UserController {
...
@@ -47,18 +47,18 @@ public class UserController {
return
userService
.
register
(
registerRequest
,
request
);
return
userService
.
register
(
registerRequest
,
request
);
}
}
@PostMapping
(
value
=
"/userInfoByIds"
)
//
@PostMapping(value = "/userInfoByIds")
@ApiOperation
(
value
=
"根据用户id获取用户信息"
,
notes
=
"根据用户id获取用户信息"
)
//
@ApiOperation(value = "根据用户id获取用户信息", notes = "根据用户id获取用户信息")
@ApiResponses
({
//
@ApiResponses({
@ApiResponse
(
code
=
200
,
message
=
"成功处理请求"
),
//
@ApiResponse(code = 200, message = "成功处理请求"),
@ApiResponse
(
code
=
401
,
message
=
"没有权限访问该服务"
),
//
@ApiResponse(code = 401, message = "没有权限访问该服务"),
@ApiResponse
(
code
=
403
,
message
=
"权限不足无法访问该服务"
),
//
@ApiResponse(code = 403, message = "权限不足无法访问该服务"),
@ApiResponse
(
code
=
404
,
message
=
"未发现该服务"
),
//
@ApiResponse(code = 404, message = "未发现该服务"),
@ApiResponse
(
code
=
500
,
message
=
"服务器内部错误"
)
//
@ApiResponse(code = 500, message = "服务器内部错误")
})
//
})
public
ResponseData
<?>
userInfoById
(
@RequestBody
UserInfoByIdRequest
ids
,
HttpServletRequest
request
)
{
//
public ResponseData<?> userInfoById(@RequestBody UserInfoByIdRequest ids,HttpServletRequest request) {
return
userService
.
userInfoById
(
ids
,
request
);
//
return userService.userInfoById(ids, request);
}
//
}
// @PostMapping(value = "/registerByPc")
// @PostMapping(value = "/registerByPc")
// @ApiOperation(value = "PC 版 用户手机号注册")
// @ApiOperation(value = "PC 版 用户手机号注册")
...
...
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