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
73645988
Commit
73645988
authored
Jan 28, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
req.ClubId = e.getClubId(c)
parent
8f786e13
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
9 deletions
+27
-9
org_team_club.go
app/operate/apis/org_team_club.go
+3
-5
org_team_player.go
app/operate/apis/org_team_player.go
+8
-0
org_team_team.go
app/operate/apis/org_team_team.go
+8
-0
org_team_player.go
app/operate/service/dto/org_team_player.go
+2
-1
org_team_team.go
app/operate/service/dto/org_team_team.go
+1
-0
org_team_player.go
app/operate/service/org_team_player.go
+2
-1
org_team_team.go
app/operate/service/org_team_team.go
+3
-2
No files found.
app/operate/apis/org_team_club.go
View file @
73645988
...
@@ -41,11 +41,9 @@ func (e OrgTeamClub) Get(c *gin.Context) {
...
@@ -41,11 +41,9 @@ func (e OrgTeamClub) Get(c *gin.Context) {
return
return
}
}
sOrgTeamUser
:=
service
.
OrgTeamUser
{}
sOrgClubUser
:=
service
.
OrgClubUser
{}
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgTeamUser
.
Service
)
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgClubUser
.
Service
)
_
,
teamId
:=
sOrgTeamUser
.
GetTeamId
(
user
.
GetUserId
(
c
))
_
,
clubId
:=
sOrgClubUser
.
GetClubId
(
user
.
GetUserId
(
c
))
_
,
clubId
:=
sOrgTeamUser
.
GetClubId
(
teamId
)
var
object
models
.
OrgClub
var
object
models
.
OrgClub
...
...
app/operate/apis/org_team_player.go
View file @
73645988
...
@@ -26,6 +26,13 @@ func (e OrgTeamPlayer) getTeamId(c *gin.Context) string {
...
@@ -26,6 +26,13 @@ func (e OrgTeamPlayer) getTeamId(c *gin.Context) string {
return
teamId
return
teamId
}
}
func
(
e
OrgTeamPlayer
)
getClubId
(
c
*
gin
.
Context
)
string
{
sOrgTeamUser
:=
service
.
OrgClubUser
{}
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgTeamUser
.
Service
)
_
,
teamId
:=
sOrgTeamUser
.
GetClubId
(
user
.
GetUserId
(
c
))
return
teamId
}
// GetPage <球队>获取球员表现列表
// GetPage <球队>获取球员表现列表
// @Summary <球队>获取球员表现列表
// @Summary <球队>获取球员表现列表
// @Description <球队>获取球员表现列表
// @Description <球队>获取球员表现列表
...
@@ -55,6 +62,7 @@ func (e OrgTeamPlayer) GetPage(c *gin.Context) {
...
@@ -55,6 +62,7 @@ func (e OrgTeamPlayer) GetPage(c *gin.Context) {
list
:=
make
([]
dto
.
OrgTeamPlayerGetPageReply
,
0
)
list
:=
make
([]
dto
.
OrgTeamPlayerGetPageReply
,
0
)
var
count
int64
var
count
int64
req
.
TeamId
=
e
.
getTeamId
(
c
)
req
.
TeamId
=
e
.
getTeamId
(
c
)
req
.
ClubId
=
e
.
getClubId
(
c
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
app/operate/apis/org_team_team.go
View file @
73645988
...
@@ -26,6 +26,13 @@ func (e OrgTeamTeam) getTeamId(c *gin.Context) string {
...
@@ -26,6 +26,13 @@ func (e OrgTeamTeam) getTeamId(c *gin.Context) string {
return
teamId
return
teamId
}
}
func
(
e
OrgTeamTeam
)
getClubId
(
c
*
gin
.
Context
)
string
{
sOrgTeamUser
:=
service
.
OrgClubUser
{}
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgTeamUser
.
Service
)
_
,
teamId
:=
sOrgTeamUser
.
GetClubId
(
user
.
GetUserId
(
c
))
return
teamId
}
// GetPage <球队>获取球队表现列表
// GetPage <球队>获取球队表现列表
// @Summary <球队>获取球队表现列表
// @Summary <球队>获取球队表现列表
// @Description <球队>获取球队表现列表
// @Description <球队>获取球队表现列表
...
@@ -54,6 +61,7 @@ func (e OrgTeamTeam) GetPage(c *gin.Context) {
...
@@ -54,6 +61,7 @@ func (e OrgTeamTeam) GetPage(c *gin.Context) {
list
:=
make
([]
dto
.
OrgTeamTeamGetPageReply
,
0
)
list
:=
make
([]
dto
.
OrgTeamTeamGetPageReply
,
0
)
var
count
int64
var
count
int64
req
.
TeamId
=
e
.
getTeamId
(
c
)
req
.
TeamId
=
e
.
getTeamId
(
c
)
req
.
ClubId
=
e
.
getClubId
(
c
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
app/operate/service/dto/org_team_player.go
View file @
73645988
...
@@ -6,7 +6,8 @@ import (
...
@@ -6,7 +6,8 @@ import (
type
OrgTeamPlayerGetPageReq
struct
{
type
OrgTeamPlayerGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
TeamId
string
`form:"reamId" search:"-"`
//联赛级别id
TeamId
string
`form:"teamId" search:"-"`
//联赛级别id
ClubId
string
`form:"clubId" search:"-"`
//联赛级别id
LeagueId
string
`form:"leagueId" search:"type:exact;column:league_id;table:om" comment:"联赛级别id"`
//联赛级别id
LeagueId
string
`form:"leagueId" search:"type:exact;column:league_id;table:om" comment:"联赛级别id"`
//联赛级别id
DivisionId
string
`form:"divisionId" search:"type:exact;column:division_id;table:om" comment:"赛区id"`
//赛区id
DivisionId
string
`form:"divisionId" search:"type:exact;column:division_id;table:om" comment:"赛区id"`
//赛区id
SeasonId
string
`form:"seasonId" search:"type:exact;column:season_id;table:om" comment:"赛季id"`
//赛季id
SeasonId
string
`form:"seasonId" search:"type:exact;column:season_id;table:om" comment:"赛季id"`
//赛季id
...
...
app/operate/service/dto/org_team_team.go
View file @
73645988
...
@@ -8,6 +8,7 @@ import (
...
@@ -8,6 +8,7 @@ import (
type
OrgTeamTeamGetPageReq
struct
{
type
OrgTeamTeamGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
TeamId
string
`form:"teamId" search:"type:exact;column:team_id;table:omtp" comment:""`
TeamId
string
`form:"teamId" search:"type:exact;column:team_id;table:omtp" comment:""`
ClubId
string
`form:"clubId" search:"type:exact;column:club_id;table:omtp" comment:""`
LeagueId
string
`form:"leagueId" search:"type:exact;column:league_id;table:om" comment:""`
LeagueId
string
`form:"leagueId" search:"type:exact;column:league_id;table:om" comment:""`
DivisionId
string
`form:"divisionId" search:"type:exact;column:division_id;table:om" comment:""`
DivisionId
string
`form:"divisionId" search:"type:exact;column:division_id;table:om" comment:""`
SeasonId
string
`form:"seasonId" search:"type:exact;column:season_id;table:om" comment:""`
SeasonId
string
`form:"seasonId" search:"type:exact;column:season_id;table:om" comment:""`
...
...
app/operate/service/org_team_player.go
View file @
73645988
...
@@ -32,8 +32,9 @@ func (e *OrgTeamPlayer) GetPage(c *dto.OrgTeamPlayerGetPageReq, p *actions.DataP
...
@@ -32,8 +32,9 @@ func (e *OrgTeamPlayer) GetPage(c *dto.OrgTeamPlayerGetPageReq, p *actions.DataP
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
actions
.
Permission
(
"omtp"
,
p
),
actions
.
Permission
(
"omtp"
,
p
),
cDto
.
PassDel
(
"omtp"
),
cDto
.
PassDel
(
"omtp"
),
cDto
.
SetWhere
(
"omtp"
,
"team_id"
,
c
.
TeamId
),
cDto
.
SetWhere
(
"omtp"
,
"club_id"
,
c
.
ClubId
),
)
.
)
.
Where
(
"omtp.team_id=?"
,
c
.
TeamId
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
Count
(
count
)
.
Error
if
err
!=
nil
{
if
err
!=
nil
{
...
...
app/operate/service/org_team_team.go
View file @
73645988
...
@@ -35,8 +35,9 @@ func (e *OrgTeamTeam) GetPage(c *dto.OrgTeamTeamGetPageReq, p *actions.DataPermi
...
@@ -35,8 +35,9 @@ func (e *OrgTeamTeam) GetPage(c *dto.OrgTeamTeamGetPageReq, p *actions.DataPermi
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
actions
.
Permission
(
"otmp"
,
p
),
actions
.
Permission
(
"otmp"
,
p
),
cDto
.
PassDel
(
"omtp"
),
cDto
.
PassDel
(
"omtp"
),
cDto
.
SetWhere
(
"omtp"
,
"team_id"
,
c
.
TeamId
),
cDto
.
SetWhere
(
"omtp"
,
"club_id"
,
c
.
ClubId
),
)
.
)
.
Where
(
"omtp.team_id=?"
,
c
.
TeamId
)
.
Group
(
"omtp.match_id"
)
.
Group
(
"omtp.match_id"
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
Count
(
count
)
.
Error
...
@@ -89,8 +90,8 @@ func (e *OrgTeamTeam) GetMatchInfo(id string, p *actions.DataPermission, data *c
...
@@ -89,8 +90,8 @@ func (e *OrgTeamTeam) GetMatchInfo(id string, p *actions.DataPermission, data *c
Joins
(
"left join org_season as os on os.id = om.season_id"
)
.
Joins
(
"left join org_season as os on os.id = om.season_id"
)
.
Scopes
(
Scopes
(
actions
.
Permission
(
"omtp"
,
p
),
actions
.
Permission
(
"omtp"
,
p
),
cDto
.
SetWhere
(
"omtp"
,
"team_id"
,
id
),
)
.
)
.
Where
(
"omtp.team_id=?"
,
id
)
.
First
(
data
)
.
Error
First
(
data
)
.
Error
if
err
!=
nil
{
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchService GetMatchInfo error:%s
\r\n
"
,
err
)
e
.
Log
.
Errorf
(
"OrgMatchService GetMatchInfo error:%s
\r\n
"
,
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