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
676562a8
Commit
676562a8
authored
Jan 22, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
2a4b51ec
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
335 additions
and
15 deletions
+335
-15
org_player.go
app/mobile/apis/org_player.go
+0
-4
org_player.go
app/mobile/service/org_player.go
+24
-0
docs.go
docs/docs.go
+118
-4
swagger.json
docs/swagger.json
+118
-4
swagger.yaml
docs/swagger.yaml
+75
-3
No files found.
app/mobile/apis/org_player.go
View file @
676562a8
...
...
@@ -284,10 +284,6 @@ func (e OrgPlayer) GetOrgMatchEvaluate(c *gin.Context) {
// @Summary <手机端>获取球员精彩时刻
// @Description <手机端>获取球员精彩时刻
// @Tags <手机端>球员数据
// @Param leagueId path string false "leagueId"
// @Param seasonId path string false "seasonId"
// @Param matchId path string false "matchId"
// @Param rounds path string false "rounds"
// @Param playerId path string false "playerId"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /mobile/v1/org-player/get-rounds [get]
...
...
app/mobile/service/org_player.go
View file @
676562a8
...
...
@@ -7,6 +7,7 @@ import (
"gorm.io/gorm"
"sort"
"strconv"
"time"
"go-admin/app/mobile/service/dto"
"go-admin/app/operate/models"
...
...
@@ -586,3 +587,26 @@ func (e *OrgPlayer) GetPageWonderful(evaluateId string, list *[]cDto.Wonderful,
}
return
nil
}
func
(
e
*
OrgPlayer
)
GetNowSeasonId
()
string
{
reply
:=
new
(
models
.
OrgSeason
)
now
:=
time
.
Now
()
negativeM
,
_
:=
time
.
ParseDuration
(
"-5m"
)
nowBefore
:=
now
.
Add
(
negativeM
)
err
:=
e
.
Orm
.
Table
(
"org_season"
)
.
Scopes
(
cDto
.
PassDel
(
"org_season"
))
.
Where
(
"start_time>?"
,
nowBefore
)
.
Order
(
"id desc"
)
.
First
(
&
reply
)
.
Error
if
err
!=
nil
&&
errors
.
Is
(
err
,
gorm
.
ErrRecordNotFound
)
{
err
=
errors
.
New
(
"查看对象不存在或无权查看"
)
e
.
Log
.
Errorf
(
"Service GetOrgMsg error:%s
\r\n
"
,
err
)
return
"0"
}
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"db error:%s"
,
err
)
return
"0"
}
return
"0"
}
docs/docs.go
View file @
676562a8
...
...
@@ -6597,7 +6597,52 @@ var doc = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.OrgTeamPlayerGetPageReq"
"$ref": "#/definitions/dto.OrgPlayerRankGetPageReq"
}
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"type": "string"
}
}
}
}
},
"/mobile/v1/org-player-rank/team": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "\u003c手机端\u003e获取球队排名",
"tags": [
"\u003c手机端\u003e比赛排名"
],
"summary": "\u003c手机端\u003e获取球队排名",
"parameters": [
{
"type": "integer",
"description": "页条数",
"name": "pageSize",
"in": "query"
},
{
"type": "integer",
"description": "页码",
"name": "pageIndex",
"in": "query"
},
{
"description": "data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.OrgPlayerRankGetPageReq"
}
}
],
...
...
@@ -6761,6 +6806,36 @@ var doc = `{
}
}
},
"/mobile/v1/org-player/get-rounds": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "\u003c手机端\u003e获取球员精彩时刻",
"tags": [
"\u003c手机端\u003e球员数据"
],
"summary": "\u003c手机端\u003e获取球员精彩时刻",
"parameters": [
{
"type": "string",
"description": "playerId",
"name": "playerId",
"in": "path"
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"type": "string"
}
}
}
}
},
"/mobile/v1/org-player/info": {
"get": {
"security": [
...
...
@@ -7729,9 +7804,6 @@ var doc = `{
"playerName": {
"type": "string"
},
"playerUserId": {
"type": "string"
},
"status": {
"type": "string"
},
...
...
@@ -7791,6 +7863,24 @@ var doc = `{
}
}
},
"dto.OrgPlayerRankGetPageReq": {
"type": "object",
"properties": {
"leagueId": {
"description": "联赛级别id",
"type": "string"
},
"pageIndex": {
"type": "integer"
},
"pageSize": {
"type": "integer"
},
"typeName": {
"type": "string"
}
}
},
"dto.OrgPlayerUpdateReq": {
"type": "object",
"properties": {
...
...
@@ -9593,9 +9683,21 @@ var doc = `{
"action": {
"type": "string"
},
"apis": {
"type": "array",
"items": {
"type": "integer"
}
},
"breadcrumb": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/models.SysMenu"
}
},
"component": {
"type": "string"
},
...
...
@@ -9605,12 +9707,18 @@ var doc = `{
"createdAt": {
"type": "string"
},
"dataScope": {
"type": "string"
},
"icon": {
"type": "string"
},
"isFrame": {
"type": "string"
},
"is_select": {
"type": "boolean"
},
"menuId": {
"type": "integer"
},
...
...
@@ -9623,6 +9731,9 @@ var doc = `{
"noCache": {
"type": "boolean"
},
"params": {
"type": "string"
},
"parentId": {
"type": "integer"
},
...
...
@@ -9635,6 +9746,9 @@ var doc = `{
"permission": {
"type": "string"
},
"roleId": {
"type": "integer"
},
"sort": {
"type": "integer"
},
...
...
docs/swagger.json
View file @
676562a8
...
...
@@ -6580,7 +6580,52 @@
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/dto.OrgTeamPlayerGetPageReq"
"$ref"
:
"#/definitions/dto.OrgPlayerRankGetPageReq"
}
}
],
"responses"
:
{
"200"
:
{
"description"
:
"{
\"
code
\"
: 200,
\"
data
\"
: [...]}"
,
"schema"
:
{
"type"
:
"string"
}
}
}
}
},
"/mobile/v1/org-player-rank/team"
:
{
"get"
:
{
"security"
:
[
{
"Bearer"
:
[]
}
],
"description"
:
"
\u
003c手机端
\u
003e获取球队排名"
,
"tags"
:
[
"
\u
003c手机端
\u
003e比赛排名"
],
"summary"
:
"
\u
003c手机端
\u
003e获取球队排名"
,
"parameters"
:
[
{
"type"
:
"integer"
,
"description"
:
"页条数"
,
"name"
:
"pageSize"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"页码"
,
"name"
:
"pageIndex"
,
"in"
:
"query"
},
{
"description"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/dto.OrgPlayerRankGetPageReq"
}
}
],
...
...
@@ -6744,6 +6789,36 @@
}
}
},
"/mobile/v1/org-player/get-rounds"
:
{
"get"
:
{
"security"
:
[
{
"Bearer"
:
[]
}
],
"description"
:
"
\u
003c手机端
\u
003e获取球员精彩时刻"
,
"tags"
:
[
"
\u
003c手机端
\u
003e球员数据"
],
"summary"
:
"
\u
003c手机端
\u
003e获取球员精彩时刻"
,
"parameters"
:
[
{
"type"
:
"string"
,
"description"
:
"playerId"
,
"name"
:
"playerId"
,
"in"
:
"path"
}
],
"responses"
:
{
"200"
:
{
"description"
:
"{
\"
code
\"
: 200,
\"
data
\"
: [...]}"
,
"schema"
:
{
"type"
:
"string"
}
}
}
}
},
"/mobile/v1/org-player/info"
:
{
"get"
:
{
"security"
:
[
...
...
@@ -7712,9 +7787,6 @@
"playerName"
:
{
"type"
:
"string"
},
"playerUserId"
:
{
"type"
:
"string"
},
"status"
:
{
"type"
:
"string"
},
...
...
@@ -7774,6 +7846,24 @@
}
}
},
"dto.OrgPlayerRankGetPageReq"
:
{
"type"
:
"object"
,
"properties"
:
{
"leagueId"
:
{
"description"
:
"联赛级别id"
,
"type"
:
"string"
},
"pageIndex"
:
{
"type"
:
"integer"
},
"pageSize"
:
{
"type"
:
"integer"
},
"typeName"
:
{
"type"
:
"string"
}
}
},
"dto.OrgPlayerUpdateReq"
:
{
"type"
:
"object"
,
"properties"
:
{
...
...
@@ -9576,9 +9666,21 @@
"action"
:
{
"type"
:
"string"
},
"apis"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"integer"
}
},
"breadcrumb"
:
{
"type"
:
"string"
},
"children"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/models.SysMenu"
}
},
"component"
:
{
"type"
:
"string"
},
...
...
@@ -9588,12 +9690,18 @@
"createdAt"
:
{
"type"
:
"string"
},
"dataScope"
:
{
"type"
:
"string"
},
"icon"
:
{
"type"
:
"string"
},
"isFrame"
:
{
"type"
:
"string"
},
"is_select"
:
{
"type"
:
"boolean"
},
"menuId"
:
{
"type"
:
"integer"
},
...
...
@@ -9606,6 +9714,9 @@
"noCache"
:
{
"type"
:
"boolean"
},
"params"
:
{
"type"
:
"string"
},
"parentId"
:
{
"type"
:
"integer"
},
...
...
@@ -9618,6 +9729,9 @@
"permission"
:
{
"type"
:
"string"
},
"roleId"
:
{
"type"
:
"integer"
},
"sort"
:
{
"type"
:
"integer"
},
...
...
docs/swagger.yaml
View file @
676562a8
...
...
@@ -601,8 +601,6 @@ definitions:
type
:
integer
playerName
:
type
:
string
playerUserId
:
type
:
string
status
:
type
:
string
teamId
:
...
...
@@ -642,6 +640,18 @@ definitions:
username
:
type
:
string
type
:
object
dto.OrgPlayerRankGetPageReq
:
properties
:
leagueId
:
description
:
联赛级别id
type
:
string
pageIndex
:
type
:
integer
pageSize
:
type
:
integer
typeName
:
type
:
string
type
:
object
dto.OrgPlayerUpdateReq
:
properties
:
clubId
:
...
...
@@ -1862,16 +1872,28 @@ definitions:
properties
:
action
:
type
:
string
apis
:
items
:
type
:
integer
type
:
array
breadcrumb
:
type
:
string
children
:
items
:
$ref
:
'
#/definitions/models.SysMenu'
type
:
array
component
:
type
:
string
createBy
:
type
:
integer
createdAt
:
type
:
string
dataScope
:
type
:
string
icon
:
type
:
string
is_select
:
type
:
boolean
isFrame
:
type
:
string
menuId
:
...
...
@@ -1882,6 +1904,8 @@ definitions:
type
:
string
noCache
:
type
:
boolean
params
:
type
:
string
parentId
:
type
:
integer
path
:
...
...
@@ -1890,6 +1914,8 @@ definitions:
type
:
string
permission
:
type
:
string
roleId
:
type
:
integer
sort
:
type
:
integer
sysApi
:
...
...
@@ -6140,7 +6166,7 @@ paths:
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/dto.Org
TeamPlayer
GetPageReq'
$ref
:
'
#/definitions/dto.Org
PlayerRank
GetPageReq'
responses
:
"
200"
:
description
:
'
{"code":
200,
"data":
[...]}'
...
...
@@ -6151,6 +6177,34 @@ paths:
summary
:
<手机端>获取球员排名
tags
:
-
<手机端>比赛排名
/mobile/v1/org-player-rank/team
:
get
:
description
:
<手机端>获取球队排名
parameters
:
-
description
:
页条数
in
:
query
name
:
pageSize
type
:
integer
-
description
:
页码
in
:
query
name
:
pageIndex
type
:
integer
-
description
:
data
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/dto.OrgPlayerRankGetPageReq'
responses
:
"
200"
:
description
:
'
{"code":
200,
"data":
[...]}'
schema
:
type
:
string
security
:
-
Bearer
:
[]
summary
:
<手机端>获取球队排名
tags
:
-
<手机端>比赛排名
/mobile/v1/org-player-user/get-msg
:
post
:
description
:
<手机端>获取验证码
...
...
@@ -6261,6 +6315,24 @@ paths:
summary
:
<手机端>获取球员生涯数据
tags
:
-
<手机端>球员数据
/mobile/v1/org-player/get-rounds
:
get
:
description
:
<手机端>获取球员精彩时刻
parameters
:
-
description
:
playerId
in
:
path
name
:
playerId
type
:
string
responses
:
"
200"
:
description
:
'
{"code":
200,
"data":
[...]}'
schema
:
type
:
string
security
:
-
Bearer
:
[]
summary
:
<手机端>获取球员精彩时刻
tags
:
-
<手机端>球员数据
/mobile/v1/org-player/info
:
get
:
description
:
<手机端>获取球员赛季数据
...
...
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