Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nbya
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
haoyanbin
nbya
Commits
a8b40bc0
Commit
a8b40bc0
authored
Jan 26, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页
parent
dc5dd470
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
org_player.go
app/mobile/apis/org_player.go
+4
-2
org_player.go
app/mobile/service/dto/org_player.go
+2
-1
org_player.go
app/mobile/service/org_player.go
+9
-3
No files found.
app/mobile/apis/org_player.go
View file @
a8b40bc0
...
...
@@ -174,16 +174,18 @@ func (e OrgPlayer) GetInfo(c *gin.Context) {
reply
.
OrgMatchInfo
=
*
replyOrgMatchInfo
err
,
matchId
:=
s
.
GetMatchId
(
strconv
.
Itoa
(
req
.
PlayerId
),
seasonId
)
var
count
int64
replyGetRoundsScoring
:=
make
([]
dto
.
OrgPlayerRoundsScoring
,
0
)
err
=
s
.
GetRoundsScoring
(
strconv
.
Itoa
(
req
.
PlayerId
),
matchId
,
&
replyGetRoundsScoring
)
err
=
s
.
GetRoundsScoring
(
&
req
,
matchId
,
&
replyGetRoundsScoring
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
reply
.
RoundsScoring
=
replyGetRoundsScoring
e
.
OK
(
reply
,
"查询成功"
)
//e.OK(reply, "查询成功")
e
.
PageOK
(
reply
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get <手机端>获取球员生涯数据
...
...
app/mobile/service/dto/org_player.go
View file @
a8b40bc0
...
...
@@ -139,7 +139,8 @@ type OrgMatchEvaluateList struct {
// OrgPlayerGetReq 功能获取请求参数
type
OrgPlayerGetReq
struct
{
PlayerId
int
`uri:"id"`
dto
.
Pagination
`search:"-"`
PlayerId
int
`uri:"id"`
}
type
OrgPlayerGetReply
struct
{
...
...
app/mobile/service/org_player.go
View file @
a8b40bc0
...
...
@@ -240,7 +240,7 @@ func (e *OrgPlayer) GetMatchId(playerId string, seasonId string) (error, []strin
return
nil
,
matchId
}
func
(
e
*
OrgPlayer
)
GetRoundsScoring
(
playerId
string
,
matchId
[]
string
,
data
*
[]
dto
.
OrgPlayerRoundsScoring
)
error
{
func
(
e
*
OrgPlayer
)
GetRoundsScoring
(
c
*
dto
.
OrgPlayerGetReq
,
matchId
[]
string
,
data
*
[]
dto
.
OrgPlayerRoundsScoring
,
count
*
int64
)
error
{
var
err
error
field
:=
"om.id, om.rounds, om.grouping,"
+
...
...
@@ -260,9 +260,15 @@ func (e *OrgPlayer) GetRoundsScoring(playerId string, matchId []string, data *[]
Select
(
field
)
.
Joins
(
"left join org_match_team_player as omtp on omtp.match_id = om.id and omtp.rounds = om.rounds"
)
.
Where
(
"omtp.match_id in (?)"
,
matchId
)
.
Where
(
"omtp.player_id = ? "
,
playerId
)
.
Where
(
"omtp.player_id = ? "
,
c
.
PlayerId
)
.
Scopes
(
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
cDto
.
PassDel
(
"om"
),
)
.
Group
(
"omtp.match_id"
)
.
Find
(
data
)
.
Error
Find
(
data
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchService GetRoundsScoring error:%s
\r\n
"
,
err
)
return
err
...
...
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