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
c624c74a
Commit
c624c74a
authored
Jan 24, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ba19a872
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
org_player.go
app/mobile/apis/org_player.go
+9
-8
org_player.go
app/mobile/router/org_player.go
+2
-2
org_player.go
app/mobile/service/dto/org_player.go
+1
-1
org_player.go
app/mobile/service/org_player.go
+1
-1
No files found.
app/mobile/apis/org_player.go
View file @
c624c74a
...
...
@@ -68,9 +68,10 @@ func (e OrgPlayer) GetPage(c *gin.Context) {
func
(
e
OrgPlayer
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
c
.
Bind
(
&
req
)
err
=
e
.
MakeContext
(
c
)
.
//
err := c.Bind(&req)
err
:
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
...
...
@@ -133,14 +134,14 @@ func (e OrgPlayer) Get(c *gin.Context) {
// @Tags <手机端>球员数据
// @Param playerId path string false "playerId"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /mobile/v1/org-player/info [get]
// @Router /mobile/v1/org-player/info
/{id}
[get]
// @Security Bearer
func
(
e
OrgPlayer
)
GetInfo
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
c
.
Bind
(
&
req
)
err
=
e
.
MakeContext
(
c
)
.
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
...
...
@@ -190,14 +191,14 @@ func (e OrgPlayer) GetInfo(c *gin.Context) {
// @Tags <手机端>球员数据
// @Param playerId path string false "playerId"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /mobile/v1/org-player/get-match-season [get]
// @Router /mobile/v1/org-player/get-match-season
/{id}
[get]
// @Security Bearer
func
(
e
OrgPlayer
)
GetOrgMatchSeason
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
c
.
Bind
(
&
req
)
err
=
e
.
MakeContext
(
c
)
.
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
...
...
app/mobile/router/org_player.go
View file @
c624c74a
...
...
@@ -16,8 +16,8 @@ func registerOrgPlayerRouter(v1 *gin.RouterGroup) {
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"/:id"
,
api
.
Get
)
r
.
GET
(
"/info"
,
api
.
GetInfo
)
r
.
GET
(
"/get-match-season"
,
api
.
GetOrgMatchSeason
)
r
.
GET
(
"/info
/:id
"
,
api
.
GetInfo
)
r
.
GET
(
"/get-match-season
/:id
"
,
api
.
GetOrgMatchSeason
)
r
.
GET
(
"/evaluate"
,
api
.
GetOrgMatchEvaluate
)
r
.
GET
(
"/get-rounds"
,
api
.
GetOrgRounds
)
}
...
...
app/mobile/service/dto/org_player.go
View file @
c624c74a
...
...
@@ -139,7 +139,7 @@ type OrgMatchEvaluateList struct {
// OrgPlayerGetReq 功能获取请求参数
type
OrgPlayerGetReq
struct
{
PlayerId
int
`
form:"playerId" json:"playerI
d"`
PlayerId
int
`
uri:"i
d"`
}
type
OrgPlayerGetReply
struct
{
...
...
app/mobile/service/org_player.go
View file @
c624c74a
...
...
@@ -92,7 +92,7 @@ func (e *OrgPlayer) GetData(d *dto.OrgPlayerDataGetReq, p *actions.DataPermissio
func
(
e
*
OrgPlayer
)
GetDataSeason
(
d
*
dto
.
OrgPlayerDataGetReq
,
p
*
actions
.
DataPermission
,
model
*
dto
.
OrgPlayerDataGetReply
)
error
{
var
err
error
field
:=
"count(om.id) as
count_match
"
field
:=
"count(om.id) as
scoring
"
err
=
e
.
Orm
.
Table
(
"org_match_team_player as omtp"
)
.
Select
(
field
)
.
...
...
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