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
0183cdab
Commit
0183cdab
authored
Dec 27, 2021
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Api
parent
ad8360a5
Changes
21
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1634 additions
and
108 deletions
+1634
-108
org_ad.go
app/operate/apis/org_ad.go
+20
-20
org_club.go
app/operate/apis/org_club.go
+20
-20
org_club_player.go
app/operate/apis/org_club_player.go
+123
-0
org_club_team.go
app/operate/apis/org_club_team.go
+123
-0
org_player.go
app/operate/apis/org_player.go
+20
-20
org_team.go
app/operate/apis/org_team.go
+20
-20
org_team_club.go
app/operate/apis/org_team_club.go
+86
-0
org_team_match.go
app/operate/apis/org_team_match.go
+155
-0
org_team_match_evaluate.go
app/operate/apis/org_team_match_evaluate.go
+158
-0
org_team_player.go
app/operate/apis/org_team_player.go
+123
-0
org_team_team.go
app/operate/apis/org_team_team.go
+123
-0
org_team_user.go
app/operate/apis/org_team_user.go
+20
-20
org_user.go
app/operate/apis/org_user.go
+453
-0
org_club_player.go
app/operate/router/org_club_player.go
+24
-0
org_club_team.go
app/operate/router/org_club_team.go
+24
-0
org_team_club.go
app/operate/router/org_team_club.go
+5
-8
org_team_match.go
app/operate/router/org_team_match.go
+25
-0
org_team_match_evaluate.go
app/operate/router/org_team_match_evaluate.go
+25
-0
org_team_player.go
app/operate/router/org_team_player.go
+24
-0
org_team_team.go
app/operate/router/org_team_team.go
+24
-0
org_user.go
app/operate/router/org_user.go
+39
-0
No files found.
app/operate/apis/org_ad.go
View file @
0183cdab
...
...
@@ -18,10 +18,10 @@ type OrgAd struct {
api
.
Api
}
// GetPage 获取广告列表
// @Summary 获取广告列表
// @Description 获取广告列表
// @Tags 广告
// GetPage
<运营>
获取广告列表
// @Summary
<运营>
获取广告列表
// @Description
<运营>
获取广告列表
// @Tags
<运营>
广告
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
...
...
@@ -54,10 +54,10 @@ func (e OrgAd) GetPage(c *gin.Context) {
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get 获取广告
// @Summary 获取广告
// @Description 获取广告
// @Tags 广告
// Get
<运营>
获取广告
// @Summary
<运营>
获取广告
// @Description
<运营>
获取广告
// @Tags
<运营>
广告
// @Param id path string false "id"
// @Success 200 {string} string {data=models.OrgAd} "{"code": 200, "data": [...]}"
// @Router /api/v1/org-ad/{id} [get]
...
...
@@ -87,10 +87,10 @@ func (e OrgAd) Get(c *gin.Context) {
e
.
OK
(
object
,
"查询成功"
)
}
// Insert 创建广告
// @Summary 创建广告
// @Description 创建广告
// @Tags 广告
// Insert
<运营>
创建广告
// @Summary
<运营>
创建广告
// @Description
<运营>
创建广告
// @Tags
<运营>
广告
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgAdInsertReq true "data"
...
...
@@ -122,10 +122,10 @@ func (e OrgAd) Insert(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"创建成功"
)
}
// Update 修改广告
// @Summary 修改广告
// @Description 修改广告
// @Tags 广告
// Update
<运营>
修改广告
// @Summary
<运营>
修改广告
// @Description
<运营>
修改广告
// @Tags
<运营>
广告
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgAdUpdateReq true "body"
...
...
@@ -156,10 +156,10 @@ func (e OrgAd) Update(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
// Delete 删除广告
// @Summary 删除广告
// @Description 删除广告
// @Tags 广告
// Delete
<运营>
删除广告
// @Summary
<运营>
删除广告
// @Description
<运营>
删除广告
// @Tags
<运营>
广告
// @Param ids body []int false "ids"
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Router /api/v1/org-ad [delete]
...
...
app/operate/apis/org_club.go
View file @
0183cdab
...
...
@@ -18,10 +18,10 @@ type OrgClub struct {
api
.
Api
}
// GetPage 获取俱乐部列表
// @Summary 获取俱乐部列表
// @Description 获取俱乐部列表
// @Tags 俱乐部
// GetPage
<俱乐部>
获取俱乐部列表
// @Summary
<俱乐部>
获取俱乐部列表
// @Description
<俱乐部>
获取俱乐部列表
// @Tags
<俱乐部>
俱乐部
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
...
...
@@ -54,10 +54,10 @@ func (e OrgClub) GetPage(c *gin.Context) {
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get 获取俱乐部
// @Summary 获取俱乐部
// @Description 获取俱乐部
// @Tags 俱乐部
// Get
<俱乐部>
获取俱乐部
// @Summary
<俱乐部>
获取俱乐部
// @Description
<俱乐部>
获取俱乐部
// @Tags
<俱乐部>
俱乐部
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-club/{id} [get]
...
...
@@ -87,10 +87,10 @@ func (e OrgClub) Get(c *gin.Context) {
e
.
OK
(
object
,
"查询成功"
)
}
// Insert 创建俱乐部
// @Summary 创建俱乐部
// @Description 创建俱乐部
// @Tags 俱乐部
// Insert
<俱乐部>
创建俱乐部
// @Summary
<俱乐部>
创建俱乐部
// @Description
<俱乐部>
创建俱乐部
// @Tags
<俱乐部>
俱乐部
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgClubInsertReq true "data"
...
...
@@ -122,10 +122,10 @@ func (e OrgClub) Insert(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"创建成功"
)
}
// Update 修改俱乐部
// @Summary 修改俱乐部
// @Description 修改俱乐部
// @Tags 俱乐部
// Update
<俱乐部>
修改俱乐部
// @Summary
<俱乐部>
修改俱乐部
// @Description
<俱乐部>
修改俱乐部
// @Tags
<俱乐部>
俱乐部
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgClubUpdateReq true "body"
...
...
@@ -156,10 +156,10 @@ func (e OrgClub) Update(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
// Delete 删除俱乐部
// @Summary 删除俱乐部
// @Description 删除俱乐部
// @Tags 俱乐部
// Delete
<俱乐部>
删除俱乐部
// @Summary
<俱乐部>
删除俱乐部
// @Description
<俱乐部>
删除俱乐部
// @Tags
<俱乐部>
俱乐部
// @Param ids body []int false "ids"
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Router /api/v1/org-club [delete]
...
...
app/operate/apis/org_club_player.go
0 → 100644
View file @
0183cdab
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
)
type
OrgClubPlayer
struct
{
api
.
Api
}
// GetPage <俱乐部>获取球员数据列表
// @Summary <俱乐部>获取球员数据列表
// @Description <俱乐部>获取球员数据列表
// @Tags <俱乐部>球员
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-player [get]
// @Security Bearer
func
(
e
OrgClubPlayer
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetPageReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgPlayer
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球员 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// GetPage <俱乐部>获取球员比赛列表
// @Summary <俱乐部>获取球员比赛列表
// @Description <俱乐部>获取球员比赛列表
// @Tags <俱乐部>球员
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-player/get-match [get]
// @Security Bearer
func
(
e
OrgClubPlayer
)
GetPageMatch
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetPageReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgPlayer
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球员 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get <俱乐部>获取球员比赛详情
// @Summary <俱乐部>获取球员比赛详情
// @Description <俱乐部>获取球员比赛详情
// @Tags <俱乐部>球员
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-player/{id} [get]
// @Security Bearer
func
(
e
OrgClubPlayer
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgPlayer
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球员失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
app/operate/apis/org_club_team.go
0 → 100644
View file @
0183cdab
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
)
type
OrgClubTeam
struct
{
api
.
Api
}
// GetPage <俱乐部>获取球队数据列表
// @Summary <俱乐部>获取球队数据列表
// @Description <俱乐部>获取球队数据列表
// @Tags <俱乐部>球队
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-club-team [get]
// @Security Bearer
func
(
e
OrgClubTeam
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgTeamGetPageReq
{}
s
:=
service
.
OrgTeam
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgTeam
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// GetPage <俱乐部>获取球队比赛列表
// @Summary <俱乐部>获取球队比赛列表
// @Description <俱乐部>获取球队比赛列表
// @Tags <俱乐部>球队
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-club-team/get-match [get]
// @Security Bearer
func
(
e
OrgClubTeam
)
GetPageMatch
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgTeamGetPageReq
{}
s
:=
service
.
OrgTeam
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgTeam
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get <俱乐部>获取球队比赛详情
// @Summary <俱乐部>获取球队比赛详情
// @Description <俱乐部>获取球队比赛详情
// @Tags <俱乐部>球队
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-club-team/{id} [get]
// @Security Bearer
func
(
e
OrgClubTeam
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgTeamGetReq
{}
s
:=
service
.
OrgTeam
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgTeam
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
\ No newline at end of file
app/operate/apis/org_player.go
View file @
0183cdab
...
...
@@ -18,10 +18,10 @@ type OrgPlayer struct {
api
.
Api
}
// GetPage 获取球员列表
// @Summary 获取球员列表
// @Description 获取球员列表
// @Tags 球员
// GetPage
<球队>
获取球员列表
// @Summary
<球队>
获取球员列表
// @Description
<球队>
获取球员列表
// @Tags
<球队>
球员
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
...
...
@@ -54,10 +54,10 @@ func (e OrgPlayer) GetPage(c *gin.Context) {
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get 获取球员
// @Summary 获取球员
// @Description 获取球员
// @Tags 球员
// Get
<球队>
获取球员
// @Summary
<球队>
获取球员
// @Description
<球队>
获取球员
// @Tags
<球队>
球员
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-player/{id} [get]
...
...
@@ -87,10 +87,10 @@ func (e OrgPlayer) Get(c *gin.Context) {
e
.
OK
(
object
,
"查询成功"
)
}
// Insert 创建球员
// @Summary 创建球员
// @Description 创建球员
// @Tags 球员
// Insert
<球队>
创建球员
// @Summary
<球队>
创建球员
// @Description
<球队>
创建球员
// @Tags
<球队>
球员
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgPlayerInsertReq true "data"
...
...
@@ -122,10 +122,10 @@ func (e OrgPlayer) Insert(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"创建成功"
)
}
// Update 修改球员
// @Summary 修改球员
// @Description 修改球员
// @Tags 球员
// Update
<球队>
修改球员
// @Summary
<球队>
修改球员
// @Description
<球队>
修改球员
// @Tags
<球队>
球员
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgPlayerUpdateReq true "body"
...
...
@@ -156,10 +156,10 @@ func (e OrgPlayer) Update(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
// Delete 删除球员
// @Summary 删除球员
// @Description 删除球员
// @Tags 球员
// Delete
<球队>
删除球员
// @Summary
<球队>
删除球员
// @Description
<球队>
删除球员
// @Tags
<球队>
球员
// @Param ids body []int false "ids"
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Router /api/v1/org-player [delete]
...
...
app/operate/apis/org_team.go
View file @
0183cdab
...
...
@@ -18,10 +18,10 @@ type OrgTeam struct {
api
.
Api
}
// GetPage 获取球队列表
// @Summary 获取球队列表
// @Description 获取球队列表
// @Tags 球队
// GetPage
<球队>
获取球队列表
// @Summary
<球队>
获取球队列表
// @Description
<球队>
获取球队列表
// @Tags
<球队>
球队
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
...
...
@@ -54,10 +54,10 @@ func (e OrgTeam) GetPage(c *gin.Context) {
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get 获取球队
// @Summary 获取球队
// @Description 获取球队
// @Tags 球队
// Get
<球队>
获取球队
// @Summary
<球队>
获取球队
// @Description
<球队>
获取球队
// @Tags
<球队>
球队
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team/{id} [get]
...
...
@@ -87,10 +87,10 @@ func (e OrgTeam) Get(c *gin.Context) {
e
.
OK
(
object
,
"查询成功"
)
}
// Insert 创建球队
// @Summary 创建球队
// @Description 创建球队
// @Tags 球队
// Insert
<球队>
创建球队
// @Summary
<球队>
创建球队
// @Description
<球队>
创建球队
// @Tags
<球队>
球队
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgTeamInsertReq true "data"
...
...
@@ -122,10 +122,10 @@ func (e OrgTeam) Insert(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"创建成功"
)
}
// Update 修改球队
// @Summary 修改球队
// @Description 修改球队
// @Tags 球队
// Update
<球队>
修改球队
// @Summary
<球队>
修改球队
// @Description
<球队>
修改球队
// @Tags
<球队>
球队
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgTeamUpdateReq true "body"
...
...
@@ -156,10 +156,10 @@ func (e OrgTeam) Update(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
// Delete 删除球队
// @Summary 删除球队
// @Description 删除球队
// @Tags 球队
// Delete
<球队>
删除球队
// @Summary
<球队>
删除球队
// @Description
<球队>
删除球队
// @Tags
<球队>
球队
// @Param ids body []int false "ids"
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Router /api/v1/org-team [delete]
...
...
app/operate/apis/org_team_club.go
0 → 100644
View file @
0183cdab
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth/user"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
)
type
OrgTeamClub
struct
{
api
.
Api
}
// Get <球队>获取俱乐部详情
// @Summary <球队>获取俱乐部详情
// @Description <球队>获取俱乐部详情
// @Tags <球队>俱乐部
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-club/{id} [get]
// @Security Bearer
func
(
e
OrgTeamClub
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgClubGetReq
{}
s
:=
service
.
OrgClub
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgClub
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取俱乐部失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
// Update <球队>修改俱乐部
// @Summary <球队>修改俱乐部
// @Description <球队>修改俱乐部
// @Tags <球队>俱乐部
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgClubUpdateReq true "body"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Router /api/v1/org-team-club/{id} [put]
// @Security Bearer
func
(
e
OrgTeamClub
)
Update
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgClubUpdateReq
{}
s
:=
service
.
OrgClub
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
req
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Update
(
&
req
,
p
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改俱乐部 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
\ No newline at end of file
app/operate/apis/org_team_match.go
0 → 100644
View file @
0183cdab
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth/user"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
)
type
OrgTeamMatch
struct
{
api
.
Api
}
// GetPage <球队>获取比赛列表
// @Summary <球队>获取比赛列表
// @Description <球队>获取比赛列表
// @Tags <球队>比赛
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-match [get]
// @Security Bearer
func
(
e
OrgTeamMatch
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchGetPageReq
{}
s
:=
service
.
OrgMatch
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgMatch
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get <球队>获取比赛所有球员
// @Summary <球队>获取比赛所有球员
// @Description <球队>获取比赛所有球员
// @Tags <球队>比赛
// @Param id path string false "id"
// @Success 200 {string} string {data=models.OrgMatch} "{"code": 200, "data": [...]}"
// @Router /api/v1/get-players/{id} [get]
// @Security Bearer
func
(
e
OrgTeamMatch
)
GetPlayers
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchGetReq
{}
s
:=
service
.
OrgMatch
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgMatch
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
// Get <球队>获取比赛已设置球员
// @Summary <球队>获取比赛已设置球员
// @Description <球队>获取比赛已设置球员
// @Tags <球队>比赛
// @Param id path string false "id"
// @Success 200 {string} string {data=models.OrgMatch} "{"code": 200, "data": [...]}"
// @Router /api/v1/get-players/get-players-is-set/{id} [get]
// @Security Bearer
func
(
e
OrgTeamMatch
)
GetPlayersIsSet
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchGetReq
{}
s
:=
service
.
OrgMatch
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgMatch
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
// Update <球队>修改比赛球员
// @Summary <球队>修改比赛球员
// @Description <球队>修改比赛球员
// @Tags <球队>比赛
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgMatchUpdateReq true "body"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Router /api/v1/get-players/{id} [put]
// @Security Bearer
func
(
e
OrgTeamMatch
)
UpdatePlayers
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchUpdateReq
{}
s
:=
service
.
OrgMatch
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
req
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Update
(
&
req
,
p
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改比赛 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
app/operate/apis/org_team_match_evaluate.go
0 → 100644
View file @
0183cdab
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth/user"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
)
type
OrgTeamMatchEvaluate
struct
{
api
.
Api
}
// GetPage <球队>教练评价列表
// @Summary <球队>教练评价列表
// @Description <球队>教练评价列表
// @Tags <球队>教练评价
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-match-evaluate [get]
// @Security Bearer
func
(
e
OrgTeamMatchEvaluate
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchEvaluateGetPageReq
{}
s
:=
service
.
OrgMatchEvaluate
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgMatchEvaluate
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// GetPage <球队>教练评价比赛列表
// @Summary <球队>教练评价比赛列表
// @Description <球队>教练评价比赛列表
// @Tags <球队>教练评价
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-match-evaluate/get-match [get]
// @Security Bearer
func
(
e
OrgTeamMatchEvaluate
)
GetPageMatch
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchEvaluateGetPageReq
{}
s
:=
service
.
OrgMatchEvaluate
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgMatchEvaluate
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get <球队>教练评价比赛详情
// @Summary <球队>教练评价比赛详情
// @Description <球队>教练评价比赛详情
// @Tags <球队>教练评价
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-match-evaluate/{id} [get]
// @Security Bearer
func
(
e
OrgTeamMatchEvaluate
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchEvaluateGetReq
{}
s
:=
service
.
OrgMatchEvaluate
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgMatchEvaluate
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛球员信息失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
// Update <球队>修改评价
// @Summary <球队>修改评价
// @Description <球队>修改评价
// @Tags <球队>教练评价
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgMatchEvaluateUpdateReq true "body"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Router /api/v1/org-match-evaluate/{id} [put]
// @Security Bearer
func
(
e
OrgTeamMatchEvaluate
)
Update
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgMatchEvaluateUpdateReq
{}
s
:=
service
.
OrgMatchEvaluate
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
req
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Update
(
&
req
,
p
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
app/operate/apis/org_team_player.go
0 → 100644
View file @
0183cdab
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
)
type
OrgTeamPlayer
struct
{
api
.
Api
}
// GetPage <球队>获取球员表现列表
// @Summary <球队>获取球员表现列表
// @Description <球队>获取球员表现列表
// @Tags <球队>球员表现
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-player [get]
// @Security Bearer
func
(
e
OrgTeamPlayer
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetPageReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgPlayer
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球员 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// GetPage <球队>获取球员表现比赛列表
// @Summary <球队>获取球员表现比赛列表
// @Description <球队>获取球员表现比赛列表
// @Tags <球队>球员表现
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-player/get-match [get]
// @Security Bearer
func
(
e
OrgTeamPlayer
)
GetPageMatch
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetPageReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgPlayer
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球员 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get <球队>获取球员表现比赛详情
// @Summary <球队>获取球员表现比赛详情
// @Description <球队>获取球员表现比赛详情
// @Tags <球队>球员表现
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-player/{id} [get]
// @Security Bearer
func
(
e
OrgTeamPlayer
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerGetReq
{}
s
:=
service
.
OrgPlayer
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgPlayer
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球员失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
app/operate/apis/org_team_team.go
0 → 100644
View file @
0183cdab
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
)
type
OrgTeamTeam
struct
{
api
.
Api
}
// GetPage <球队>获取球队表现列表
// @Summary <球队>获取球队表现列表
// @Description <球队>获取球队表现列表
// @Tags <球队>球队表现
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-team [get]
// @Security Bearer
func
(
e
OrgTeamTeam
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgTeamGetPageReq
{}
s
:=
service
.
OrgTeam
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgTeam
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// GetPage <球队>获取球队表现比赛列表
// @Summary <球队>获取球队表现比赛列表
// @Description <球队>获取球队表现比赛列表
// @Tags <球队>球队表现
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-team/get-match [get]
// @Security Bearer
func
(
e
OrgTeamTeam
)
GetPageMatch
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgTeamGetPageReq
{}
s
:=
service
.
OrgTeam
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgTeam
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get <球队>获取球队表现比赛详情
// @Summary <球队>获取球队表现比赛详情
// @Description <球队>获取球队表现比赛详情
// @Tags <球队>球队表现
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-team/{id} [get]
// @Security Bearer
func
(
e
OrgTeamTeam
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgTeamGetReq
{}
s
:=
service
.
OrgTeam
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
OrgTeam
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
OK
(
object
,
"查询成功"
)
}
app/operate/apis/org_team_user.go
View file @
0183cdab
...
...
@@ -18,10 +18,10 @@ type OrgTeamUser struct {
api
.
Api
}
// GetPage
获取球队人员账户信息
列表
// @Summary
获取球队人员账户信息
列表
// @Description
获取球队人员账户信息
列表
// @Tags
球队人员账户信息
// GetPage
<球队>工作人员
列表
// @Summary
<球队>工作人员
列表
// @Description
<球队>工作人员
列表
// @Tags
<球队>工作人员
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
...
...
@@ -54,10 +54,10 @@ func (e OrgTeamUser) GetPage(c *gin.Context) {
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get
获取球队人员账户
信息
// @Summary
获取球队人员账户
信息
// @Description
获取球队人员账户
信息
// @Tags
球队人员账户信息
// Get
<球队>工作人员
信息
// @Summary
<球队>工作人员
信息
// @Description
<球队>工作人员
信息
// @Tags
<球队>工作人员
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-user/{id} [get]
...
...
@@ -87,10 +87,10 @@ func (e OrgTeamUser) Get(c *gin.Context) {
e
.
OK
(
object
,
"查询成功"
)
}
// Insert
创建球队人员账户信息
// @Summary
创建球队人员账户信息
// @Description
创建球队人员账户信息
// @Tags
球队人员账户信息
// Insert
<球队>创建工作人员
// @Summary
<球队>创建工作人员
// @Description
<球队>创建工作人员
// @Tags
<球队>工作人员
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgTeamUserInsertReq true "data"
...
...
@@ -122,10 +122,10 @@ func (e OrgTeamUser) Insert(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"创建成功"
)
}
// Update
修改球队人员账户信息
// @Summary
修改球队人员账户信息
// @Description
修改球队人员账户信息
// @Tags
球队人员账户信息
// Update
<球队>修改工作人员
// @Summary
<球队>修改工作人员
// @Description
<球队>修改工作人员
// @Tags
<球队>工作人员
// @Accept application/json
// @Product application/json
// @Param data body dto.OrgTeamUserUpdateReq true "body"
...
...
@@ -156,10 +156,10 @@ func (e OrgTeamUser) Update(c *gin.Context) {
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
// Delete
删除球队人员账户信息
// @Summary
删除球队人员账户信息
// @Description
删除球队人员账户信息
// @Tags
球队人员账户信息
// Delete
<球队>删除工作人员
// @Summary
<球队>删除工作人员
// @Description
<球队>删除工作人员
// @Tags
<球队>工作人员
// @Param ids body []int false "ids"
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Router /api/v1/org-team-user [delete]
...
...
app/operate/apis/org_user.go
0 → 100644
View file @
0183cdab
This diff is collapsed.
Click to expand it.
app/operate/router/org_club_player.go
0 → 100644
View file @
0183cdab
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/operate/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrgClubPlayerRouter
)
}
// registerOrgClubPlayerRouter
func
registerOrgClubPlayerRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
OrgClubPlayer
{}
r
:=
v1
.
Group
(
"/org-club-player"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"get-match"
,
api
.
GetPageMatch
)
r
.
GET
(
"/:id"
,
api
.
Get
)
}
}
\ No newline at end of file
app/operate/router/org_club_team.go
0 → 100644
View file @
0183cdab
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/operate/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrgClubTeamRouter
)
}
// registerOrgClubTeamRouter
func
registerOrgClubTeamRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
OrgClubTeam
{}
r
:=
v1
.
Group
(
"/org-club-team"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"get-match"
,
api
.
GetPageMatch
)
r
.
GET
(
"/:id"
,
api
.
Get
)
}
}
\ No newline at end of file
app/operate/router/org_
club_user
.go
→
app/operate/router/org_
team_club
.go
View file @
0183cdab
...
...
@@ -9,18 +9,15 @@ import (
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrg
ClubUser
Router
)
routerCheckRole
=
append
(
routerCheckRole
,
registerOrg
TeamClub
Router
)
}
// registerOrg
ClubUser
Router
func
registerOrg
ClubUser
Router
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
Org
ClubUser
{}
r
:=
v1
.
Group
(
"/org-
club-user
"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
// registerOrg
TeamClub
Router
func
registerOrg
TeamClub
Router
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
Org
TeamClub
{}
r
:=
v1
.
Group
(
"/org-
team-club
"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"/:id"
,
api
.
Get
)
r
.
POST
(
""
,
api
.
Insert
)
r
.
PUT
(
"/:id"
,
api
.
Update
)
r
.
DELETE
(
""
,
api
.
Delete
)
}
}
\ No newline at end of file
app/operate/router/org_team_match.go
0 → 100644
View file @
0183cdab
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/operate/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrgTeamMatchRouter
)
}
// registerOrgTeamMatchRouter
func
registerOrgTeamMatchRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
OrgTeamMatch
{}
r
:=
v1
.
Group
(
"/org-team-match"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"/:id"
,
api
.
GetPlayers
)
r
.
GET
(
"/get-players-is-set/:id"
,
api
.
GetPlayersIsSet
)
r
.
PUT
(
"/:id"
,
api
.
UpdatePlayers
)
}
}
\ No newline at end of file
app/operate/router/org_team_match_evaluate.go
0 → 100644
View file @
0183cdab
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/operate/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrgTeamMatchEvaluateRouter
)
}
// registerOrgTeamMatchEvaluateRouter
func
registerOrgTeamMatchEvaluateRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
OrgTeamMatchEvaluate
{}
r
:=
v1
.
Group
(
"/org-team-match-evaluate"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"/get-match"
,
api
.
GetPageMatch
)
r
.
GET
(
"/:id"
,
api
.
Get
)
r
.
PUT
(
"/:id"
,
api
.
Update
)
}
}
\ No newline at end of file
app/operate/router/org_team_player.go
0 → 100644
View file @
0183cdab
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/operate/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrgTeamPlayerRouter
)
}
// registerOrgTeamPlayerRouter
func
registerOrgTeamPlayerRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
OrgTeamPlayer
{}
r
:=
v1
.
Group
(
"/org-team-player"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"get-match"
,
api
.
GetPageMatch
)
r
.
GET
(
"/:id"
,
api
.
Get
)
}
}
\ No newline at end of file
app/operate/router/org_team_team.go
0 → 100644
View file @
0183cdab
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/operate/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrgTeamTeamRouter
)
}
// registerOrgTeamTeamRouter
func
registerOrgTeamTeamRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
OrgTeamTeam
{}
r
:=
v1
.
Group
(
"/org-team-team"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"get-match"
,
api
.
GetPageMatch
)
r
.
GET
(
"/:id"
,
api
.
Get
)
}
}
\ No newline at end of file
app/operate/router/org_user.go
0 → 100644
View file @
0183cdab
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/admin/apis"
"go-admin/common/actions"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerSysUserRouter
)
}
// 需认证的路由代码
func
registerSysUserRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
SysUser
{}
r
:=
v1
.
Group
(
"/sys-user"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
.
Use
(
actions
.
PermissionAction
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"/:id"
,
api
.
Get
)
r
.
POST
(
""
,
api
.
Insert
)
r
.
PUT
(
""
,
api
.
Update
)
r
.
DELETE
(
""
,
api
.
Delete
)
}
user
:=
v1
.
Group
(
"/user"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
.
Use
(
actions
.
PermissionAction
())
{
user
.
GET
(
"/profile"
,
api
.
GetProfile
)
user
.
POST
(
"/avatar"
,
api
.
InsetAvatar
)
user
.
PUT
(
"/pwd/set"
,
api
.
UpdatePwd
)
user
.
PUT
(
"/pwd/reset"
,
api
.
ResetPwd
)
user
.
PUT
(
"/status"
,
api
.
UpdateStatus
)
}
v1auth
:=
v1
.
Group
(
""
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
{
v1auth
.
GET
(
"/getinfo"
,
api
.
GetInfo
)
}
}
\ No newline at end of file
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