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
ceb0efa5
Commit
ceb0efa5
authored
Jan 29, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7606c505
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
org_team.go
app/operate/apis/org_team.go
+13
-0
org_team.go
app/operate/service/dto/org_team.go
+1
-0
org_team.go
app/operate/service/org_team.go
+1
-0
No files found.
app/operate/apis/org_team.go
View file @
ceb0efa5
...
...
@@ -20,6 +20,13 @@ type OrgTeam struct {
api
.
Api
}
func
(
e
OrgTeam
)
getClubId
(
c
*
gin
.
Context
)
string
{
sOrgTeamUser
:=
service
.
OrgClubUser
{}
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgTeamUser
.
Service
)
_
,
teamId
:=
sOrgTeamUser
.
GetClubId
(
user
.
GetUserId
(
c
))
return
teamId
}
// GetPage <球队>获取球队列表
// @Summary <球队>获取球队列表
// @Description <球队>获取球队列表
...
...
@@ -48,6 +55,8 @@ func (e OrgTeam) GetPage(c *gin.Context) {
list
:=
make
([]
dto
.
OrgTeamGetPageReply
,
0
)
var
count
int64
req
.
ClubId
=
e
.
getClubId
(
c
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
...
...
@@ -136,6 +145,10 @@ func (e OrgTeam) Insert(c *gin.Context) {
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
if
req
.
ClubId
==
""
||
req
.
TeamName
==
""
{
e
.
Error
(
111
,
err
,
"数据有误"
)
return
}
userId
:=
user
.
GetUserId
(
c
)
// 设置创建人
req
.
CreateBy
=
userId
...
...
app/operate/service/dto/org_team.go
View file @
ceb0efa5
...
...
@@ -9,6 +9,7 @@ import (
type
OrgTeamGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
ClubId
string
`form:"clubId" json:"clubId" search:"-"`
//球队名称
TeamName
string
`form:"teamName" json:"teamName" search:"type:contains;column:team_name;table:ot" comment:"球队名称"`
//球队名称
CreateStartTime
string
`form:"createStartTime" search:"type:gte;column:created_at;table:ot" comment:"开始时间"`
//开始时间
CreateEndTime
string
`form:"createEndTime" search:"type:lte;column:created_at;table:ot" comment:"结束时间"`
//结束时间
...
...
app/operate/service/org_team.go
View file @
ceb0efa5
...
...
@@ -29,6 +29,7 @@ func (e *OrgTeam) GetPage(c *dto.OrgTeamGetPageReq, p *actions.DataPermission, l
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
actions
.
Permission
(
data
.
TableName
(),
p
),
cDto
.
PassDel
(
"ot"
),
cDto
.
SetWhere
(
"ot"
,
"club_id"
,
c
.
ClubId
),
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
...
...
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