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
edcfa60d
Commit
edcfa60d
authored
Jan 16, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search
parent
418d9ed4
Changes
24
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1875 additions
and
682 deletions
+1875
-682
org_ad.go
app/operate/apis/org_ad.go
+60
-59
org_club_player.go
app/operate/apis/org_club_player.go
+1
-0
org_club_team.go
app/operate/apis/org_club_team.go
+2
-1
org_division.go
app/operate/apis/org_division.go
+60
-59
org_league.go
app/operate/apis/org_league.go
+60
-59
org_match.go
app/operate/apis/org_match.go
+2
-1
org_match_evaluate.go
app/operate/apis/org_match_evaluate.go
+1
-0
org_match_team_player.go
app/operate/apis/org_match_team_player.go
+60
-59
org_news.go
app/operate/apis/org_news.go
+60
-59
org_season.go
app/operate/apis/org_season.go
+2
-1
org_team_club.go
app/operate/apis/org_team_club.go
+19
-19
org_team_match.go
app/operate/apis/org_team_match.go
+2
-1
org_team_player.go
app/operate/apis/org_team_player.go
+1
-0
org_team_team.go
app/operate/apis/org_team_team.go
+1
-0
org_ad.go
app/operate/service/dto/org_ad.go
+67
-63
org_division.go
app/operate/service/dto/org_division.go
+34
-33
org_league.go
app/operate/service/dto/org_league.go
+1
-1
org_match.go
app/operate/service/dto/org_match.go
+5
-6
org_news.go
app/operate/service/dto/org_news.go
+47
-43
org_season.go
app/operate/service/dto/org_season.go
+76
-60
org_season.go
app/operate/service/org_season.go
+32
-28
docs.go
docs/docs.go
+478
-46
swagger.json
docs/swagger.json
+478
-46
swagger.yaml
docs/swagger.yaml
+326
-38
No files found.
app/operate/apis/org_ad.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgAd struct {
...
@@ -24,6 +24,7 @@ type OrgAd struct {
// @Tags <运营>广告
// @Tags <运营>广告
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgAdGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-ad [get]
// @Router /api/v1/org-ad [get]
// @Security Bearer
// @Security Bearer
...
@@ -84,7 +85,7 @@ func (e OrgAd) Get(c *gin.Context) {
...
@@ -84,7 +85,7 @@ func (e OrgAd) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Insert <运营>创建广告
// Insert <运营>创建广告
...
@@ -153,7 +154,7 @@ func (e OrgAd) Update(c *gin.Context) {
...
@@ -153,7 +154,7 @@ func (e OrgAd) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改广告 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改广告 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
}
// Delete <运营>删除广告
// Delete <运营>删除广告
...
@@ -186,5 +187,5 @@ func (e OrgAd) Delete(c *gin.Context) {
...
@@ -186,5 +187,5 @@ func (e OrgAd) Delete(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除广告失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除广告失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
}
}
app/operate/apis/org_club_player.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgClubPlayer struct {
...
@@ -24,6 +24,7 @@ type OrgClubPlayer struct {
// @Tags <俱乐部>球员
// @Tags <俱乐部>球员
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgClubPlayerGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-club-player [get]
// @Router /api/v1/org-club-player [get]
// @Security Bearer
// @Security Bearer
...
...
app/operate/apis/org_club_team.go
View file @
edcfa60d
...
@@ -25,6 +25,7 @@ type OrgClubTeam struct {
...
@@ -25,6 +25,7 @@ type OrgClubTeam struct {
// @Tags <俱乐部>球队
// @Tags <俱乐部>球队
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgClubTeamGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-club-team [get]
// @Router /api/v1/org-club-team [get]
// @Security Bearer
// @Security Bearer
...
@@ -197,7 +198,7 @@ func (e OrgClubTeam) GetInfo(c *gin.Context) {
...
@@ -197,7 +198,7 @@ func (e OrgClubTeam) GetInfo(c *gin.Context) {
//赛季列表
//赛季列表
sOrgSeason
:=
service
.
OrgSeason
{}
sOrgSeason
:=
service
.
OrgSeason
{}
listOrgSeason
:=
make
([]
models
.
OrgSeason
,
0
)
listOrgSeason
:=
make
([]
dto
.
OrgSeasonGetPageReply
,
0
)
var
countOrgSeason
int64
=
0
var
countOrgSeason
int64
=
0
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgSeason
.
Service
)
.
Errors
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgSeason
.
Service
)
.
Errors
...
...
app/operate/apis/org_division.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgDivision struct {
...
@@ -24,6 +24,7 @@ type OrgDivision struct {
// @Tags <赛事>赛区
// @Tags <赛事>赛区
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgDivisionGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-division [get]
// @Router /api/v1/org-division [get]
// @Security Bearer
// @Security Bearer
...
@@ -84,7 +85,7 @@ func (e OrgDivision) Get(c *gin.Context) {
...
@@ -84,7 +85,7 @@ func (e OrgDivision) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Insert <赛事>创建赛区
// Insert <赛事>创建赛区
...
@@ -153,7 +154,7 @@ func (e OrgDivision) Update(c *gin.Context) {
...
@@ -153,7 +154,7 @@ func (e OrgDivision) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改赛区 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改赛区 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
}
// Delete <赛事>删除赛区
// Delete <赛事>删除赛区
...
@@ -186,5 +187,5 @@ func (e OrgDivision) Delete(c *gin.Context) {
...
@@ -186,5 +187,5 @@ func (e OrgDivision) Delete(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除赛区失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除赛区失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
}
}
app/operate/apis/org_league.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgLeague struct {
...
@@ -24,6 +24,7 @@ type OrgLeague struct {
// @Tags <赛事>联赛
// @Tags <赛事>联赛
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgLeagueGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-league [get]
// @Router /api/v1/org-league [get]
// @Security Bearer
// @Security Bearer
...
@@ -84,7 +85,7 @@ func (e OrgLeague) Get(c *gin.Context) {
...
@@ -84,7 +85,7 @@ func (e OrgLeague) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Insert <赛事>创建联赛
// Insert <赛事>创建联赛
...
@@ -153,7 +154,7 @@ func (e OrgLeague) Update(c *gin.Context) {
...
@@ -153,7 +154,7 @@ func (e OrgLeague) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改联赛 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改联赛 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
}
// Delete <赛事>删除联赛
// Delete <赛事>删除联赛
...
@@ -186,5 +187,5 @@ func (e OrgLeague) Delete(c *gin.Context) {
...
@@ -186,5 +187,5 @@ func (e OrgLeague) Delete(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除联赛失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除联赛失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
}
}
app/operate/apis/org_match.go
View file @
edcfa60d
...
@@ -26,6 +26,7 @@ type OrgMatch struct {
...
@@ -26,6 +26,7 @@ type OrgMatch struct {
// @Tags <赛事>比赛
// @Tags <赛事>比赛
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgMatchGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-match [get]
// @Router /api/v1/org-match [get]
// @Security Bearer
// @Security Bearer
...
@@ -106,7 +107,7 @@ func (e OrgMatch) GetInfo(c *gin.Context) {
...
@@ -106,7 +107,7 @@ func (e OrgMatch) GetInfo(c *gin.Context) {
//赛季列表
//赛季列表
sOrgSeason
:=
service
.
OrgSeason
{}
sOrgSeason
:=
service
.
OrgSeason
{}
listOrgSeason
:=
make
([]
models
.
OrgSeason
,
0
)
listOrgSeason
:=
make
([]
dto
.
OrgSeasonGetPageReply
,
0
)
var
countOrgSeason
int64
=
0
var
countOrgSeason
int64
=
0
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgSeason
.
Service
)
.
Errors
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgSeason
.
Service
)
.
Errors
...
...
app/operate/apis/org_match_evaluate.go
View file @
edcfa60d
...
@@ -26,6 +26,7 @@ type OrgMatchEvaluate struct {
...
@@ -26,6 +26,7 @@ type OrgMatchEvaluate struct {
// @Param data body dto.OrgMatchEvaluateGetPageReq true "body"
// @Param data body dto.OrgMatchEvaluateGetPageReq true "body"
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgMatchEvaluateGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-match-evaluate [get]
// @Router /api/v1/org-match-evaluate [get]
// @Security Bearer
// @Security Bearer
...
...
app/operate/apis/org_match_team_player.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgMatchTeamPlayer struct {
...
@@ -24,6 +24,7 @@ type OrgMatchTeamPlayer struct {
// @Tags 比赛球员数据
// @Tags 比赛球员数据
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgMatchTeamPlayerGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-match-team-player [get]
// @Router /api/v1/org-match-team-player [get]
// @Security Bearer
// @Security Bearer
...
@@ -84,7 +85,7 @@ func (e OrgMatchTeamPlayer) Get(c *gin.Context) {
...
@@ -84,7 +85,7 @@ func (e OrgMatchTeamPlayer) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Insert 创建比赛球员数据
// Insert 创建比赛球员数据
...
@@ -153,7 +154,7 @@ func (e OrgMatchTeamPlayer) Update(c *gin.Context) {
...
@@ -153,7 +154,7 @@ func (e OrgMatchTeamPlayer) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改比赛球员数据 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改比赛球员数据 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
}
// Delete 删除比赛球员数据
// Delete 删除比赛球员数据
...
@@ -186,5 +187,5 @@ func (e OrgMatchTeamPlayer) Delete(c *gin.Context) {
...
@@ -186,5 +187,5 @@ func (e OrgMatchTeamPlayer) Delete(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除比赛球员数据失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除比赛球员数据失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
}
}
app/operate/apis/org_news.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgNews struct {
...
@@ -24,6 +24,7 @@ type OrgNews struct {
// @Tags 新闻
// @Tags 新闻
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgNewsGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-news [get]
// @Router /api/v1/org-news [get]
// @Security Bearer
// @Security Bearer
...
@@ -84,7 +85,7 @@ func (e OrgNews) Get(c *gin.Context) {
...
@@ -84,7 +85,7 @@ func (e OrgNews) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Insert 创建新闻
// Insert 创建新闻
...
@@ -153,7 +154,7 @@ func (e OrgNews) Update(c *gin.Context) {
...
@@ -153,7 +154,7 @@ func (e OrgNews) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改新闻 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改新闻 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
}
// Delete 删除新闻
// Delete 删除新闻
...
@@ -186,5 +187,5 @@ func (e OrgNews) Delete(c *gin.Context) {
...
@@ -186,5 +187,5 @@ func (e OrgNews) Delete(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除新闻失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"删除新闻失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
e
.
OK
(
req
.
GetId
(),
"删除成功"
)
}
}
app/operate/apis/org_season.go
View file @
edcfa60d
...
@@ -23,6 +23,7 @@ type OrgSeason struct {
...
@@ -23,6 +23,7 @@ type OrgSeason struct {
// @Tags <赛事>赛季
// @Tags <赛事>赛季
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgSeasonGetPageReq true "data"
// @Success 200 {string} string {data=response.Page{list=[]models.OrgSeason}} "{"code": 200, "data": [...]}"
// @Success 200 {string} string {data=response.Page{list=[]models.OrgSeason}} "{"code": 200, "data": [...]}"
// @Router /api/v1/org-season [get]
// @Router /api/v1/org-season [get]
// @Security Bearer
// @Security Bearer
...
@@ -41,7 +42,7 @@ func (e OrgSeason) GetPage(c *gin.Context) {
...
@@ -41,7 +42,7 @@ func (e OrgSeason) GetPage(c *gin.Context) {
}
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgSeason
,
0
)
list
:=
make
([]
dto
.
OrgSeasonGetPageReply
,
0
)
var
count
int64
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
...
...
app/operate/apis/org_team_club.go
View file @
edcfa60d
...
@@ -48,7 +48,7 @@ func (e OrgTeamClub) Get(c *gin.Context) {
...
@@ -48,7 +48,7 @@ func (e OrgTeamClub) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Update <球队>修改俱乐部
// Update <球队>修改俱乐部
...
@@ -82,5 +82,5 @@ func (e OrgTeamClub) Update(c *gin.Context) {
...
@@ -82,5 +82,5 @@ func (e OrgTeamClub) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改俱乐部 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改俱乐部 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
return
}
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
}
app/operate/apis/org_team_match.go
View file @
edcfa60d
...
@@ -26,6 +26,7 @@ type OrgTeamMatch struct {
...
@@ -26,6 +26,7 @@ type OrgTeamMatch struct {
// @Tags <球队>比赛
// @Tags <球队>比赛
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgTeamMatchGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-match [get]
// @Router /api/v1/org-team-match [get]
// @Security Bearer
// @Security Bearer
...
@@ -310,7 +311,7 @@ func (e OrgTeamMatch) GetInfo(c *gin.Context) {
...
@@ -310,7 +311,7 @@ func (e OrgTeamMatch) GetInfo(c *gin.Context) {
//赛季列表
//赛季列表
sOrgSeason
:=
service
.
OrgSeason
{}
sOrgSeason
:=
service
.
OrgSeason
{}
listOrgSeason
:=
make
([]
models
.
OrgSeason
,
0
)
listOrgSeason
:=
make
([]
dto
.
OrgSeasonGetPageReply
,
0
)
var
countOrgSeason
int64
=
0
var
countOrgSeason
int64
=
0
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgSeason
.
Service
)
.
Errors
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgSeason
.
Service
)
.
Errors
...
...
app/operate/apis/org_team_player.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgTeamPlayer struct {
...
@@ -24,6 +24,7 @@ type OrgTeamPlayer struct {
// @Tags <球队>球员表现
// @Tags <球队>球员表现
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgTeamPlayerGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-player [get]
// @Router /api/v1/org-team-player [get]
// @Security Bearer
// @Security Bearer
...
...
app/operate/apis/org_team_team.go
View file @
edcfa60d
...
@@ -24,6 +24,7 @@ type OrgTeamTeam struct {
...
@@ -24,6 +24,7 @@ type OrgTeamTeam struct {
// @Tags <球队>球队表现
// @Tags <球队>球队表现
// @Param pageSize query int false "页条数"
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgTeamTeamGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-team-team [get]
// @Router /api/v1/org-team-team [get]
// @Security Bearer
// @Security Bearer
...
...
app/operate/service/dto/org_ad.go
View file @
edcfa60d
...
@@ -9,10 +9,14 @@ import (
...
@@ -9,10 +9,14 @@ import (
type
OrgAdGetPageReq
struct
{
type
OrgAdGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
OrgAdOrder
adName
string
`form:"adName" search:"type:contains;column:ad_name;table:org_ad"`
StartTime
string
`form:"startTime" search:"type:gte;column:created_at;table:org_ad" comment:"开始时间"`
EndTime
string
`form:"endTime" search:"type:lte;column:created_at;table:org_ad" comment:"结束时间"`
Status
string
`form:"status" search:"type:exact;column:status;table:org_ad"`
}
}
type
OrgAdOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_ad"`
type
OrgAdOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_ad"`
UserId
string
`form:"userIdOrder" search:"type:order;column:user_id;table:org_ad"`
UserId
string
`form:"userIdOrder" search:"type:order;column:user_id;table:org_ad"`
AdName
string
`form:"adNameOrder" search:"type:order;column:ad_name;table:org_ad"`
AdName
string
`form:"adNameOrder" search:"type:order;column:ad_name;table:org_ad"`
AdType
string
`form:"adTypeOrder" search:"type:order;column:ad_type;table:org_ad"`
AdType
string
`form:"adTypeOrder" search:"type:order;column:ad_type;table:org_ad"`
...
@@ -26,7 +30,6 @@ type OrgAdOrder struct {Id int `form:"idOrder" search:"type:order;column:id;tab
...
@@ -26,7 +30,6 @@ type OrgAdOrder struct {Id int `form:"idOrder" search:"type:order;column:id;tab
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_ad"`
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_ad"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_ad"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_ad"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_ad"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_ad"`
}
}
func
(
m
*
OrgAdGetPageReq
)
GetNeedSearch
()
interface
{}
{
func
(
m
*
OrgAdGetPageReq
)
GetNeedSearch
()
interface
{}
{
...
@@ -48,7 +51,7 @@ type OrgAdInsertReq struct {
...
@@ -48,7 +51,7 @@ type OrgAdInsertReq struct {
func
(
s
*
OrgAdInsertReq
)
Generate
(
model
*
models
.
OrgAd
)
{
func
(
s
*
OrgAdInsertReq
)
Generate
(
model
*
models
.
OrgAd
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
UserId
=
s
.
UserId
model
.
UserId
=
s
.
UserId
model
.
AdName
=
s
.
AdName
model
.
AdName
=
s
.
AdName
...
@@ -79,7 +82,7 @@ type OrgAdUpdateReq struct {
...
@@ -79,7 +82,7 @@ type OrgAdUpdateReq struct {
func
(
s
*
OrgAdUpdateReq
)
Generate
(
model
*
models
.
OrgAd
)
{
func
(
s
*
OrgAdUpdateReq
)
Generate
(
model
*
models
.
OrgAd
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
UserId
=
s
.
UserId
model
.
UserId
=
s
.
UserId
model
.
AdName
=
s
.
AdName
model
.
AdName
=
s
.
AdName
...
@@ -99,6 +102,7 @@ func (s *OrgAdUpdateReq) GetId() interface{} {
...
@@ -99,6 +102,7 @@ func (s *OrgAdUpdateReq) GetId() interface{} {
type
OrgAdGetReq
struct
{
type
OrgAdGetReq
struct
{
Id
int
`uri:"id"`
Id
int
`uri:"id"`
}
}
func
(
s
*
OrgAdGetReq
)
GetId
()
interface
{}
{
func
(
s
*
OrgAdGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
return
s
.
Id
}
}
...
...
app/operate/service/dto/org_division.go
View file @
edcfa60d
...
@@ -9,10 +9,11 @@ import (
...
@@ -9,10 +9,11 @@ import (
type
OrgDivisionGetPageReq
struct
{
type
OrgDivisionGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
OrgDivisionOrder
DivisionName
string
`form:"divisionName" search:"type:contains;column:division_name;table:org_division" comment:"赛区名称"`
//赛区名称
}
}
type
OrgDivisionOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_division"`
type
OrgDivisionOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_division"`
DivisionName
string
`form:"divisionNameOrder" search:"type:order;column:division_name;table:org_division"`
DivisionName
string
`form:"divisionNameOrder" search:"type:order;column:division_name;table:org_division"`
Status
string
`form:"statusOrder" search:"type:order;column:status;table:org_division"`
Status
string
`form:"statusOrder" search:"type:order;column:status;table:org_division"`
CreateBy
string
`form:"createByOrder" search:"type:order;column:create_by;table:org_division"`
CreateBy
string
`form:"createByOrder" search:"type:order;column:create_by;table:org_division"`
...
@@ -20,7 +21,6 @@ type OrgDivisionOrder struct {Id int `form:"idOrder" search:"type:order;column:
...
@@ -20,7 +21,6 @@ type OrgDivisionOrder struct {Id int `form:"idOrder" search:"type:order;column:
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_division"`
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_division"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_division"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_division"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_division"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_division"`
}
}
func
(
m
*
OrgDivisionGetPageReq
)
GetNeedSearch
()
interface
{}
{
func
(
m
*
OrgDivisionGetPageReq
)
GetNeedSearch
()
interface
{}
{
...
@@ -36,7 +36,7 @@ type OrgDivisionInsertReq struct {
...
@@ -36,7 +36,7 @@ type OrgDivisionInsertReq struct {
func
(
s
*
OrgDivisionInsertReq
)
Generate
(
model
*
models
.
OrgDivision
)
{
func
(
s
*
OrgDivisionInsertReq
)
Generate
(
model
*
models
.
OrgDivision
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
DivisionName
=
s
.
DivisionName
model
.
DivisionName
=
s
.
DivisionName
model
.
Status
=
s
.
Status
model
.
Status
=
s
.
Status
...
@@ -55,7 +55,7 @@ type OrgDivisionUpdateReq struct {
...
@@ -55,7 +55,7 @@ type OrgDivisionUpdateReq struct {
func
(
s
*
OrgDivisionUpdateReq
)
Generate
(
model
*
models
.
OrgDivision
)
{
func
(
s
*
OrgDivisionUpdateReq
)
Generate
(
model
*
models
.
OrgDivision
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
DivisionName
=
s
.
DivisionName
model
.
DivisionName
=
s
.
DivisionName
model
.
Status
=
s
.
Status
model
.
Status
=
s
.
Status
...
@@ -69,6 +69,7 @@ func (s *OrgDivisionUpdateReq) GetId() interface{} {
...
@@ -69,6 +69,7 @@ func (s *OrgDivisionUpdateReq) GetId() interface{} {
type
OrgDivisionGetReq
struct
{
type
OrgDivisionGetReq
struct
{
Id
int
`uri:"id"`
Id
int
`uri:"id"`
}
}
func
(
s
*
OrgDivisionGetReq
)
GetId
()
interface
{}
{
func
(
s
*
OrgDivisionGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
return
s
.
Id
}
}
...
...
app/operate/service/dto/org_league.go
View file @
edcfa60d
...
@@ -9,7 +9,7 @@ import (
...
@@ -9,7 +9,7 @@ import (
type
OrgLeagueGetPageReq
struct
{
type
OrgLeagueGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
OrgLeagueOrder
LeagueName
string
`form:"leagueName" search:"type:contains;column:league_name;table:org_league" comment:"联赛级别"`
//联赛级别
}
}
type
OrgLeagueOrder
struct
{
type
OrgLeagueOrder
struct
{
...
...
app/operate/service/dto/org_match.go
View file @
edcfa60d
...
@@ -17,7 +17,6 @@ type OrgMatchGetPageReq struct {
...
@@ -17,7 +17,6 @@ type OrgMatchGetPageReq struct {
Status
string
`form:"status" search:"type:exact;column:status;table:om" comment:"比赛状态 1 未开始 2 比赛中 3 已结束"`
Status
string
`form:"status" search:"type:exact;column:status;table:om" comment:"比赛状态 1 未开始 2 比赛中 3 已结束"`
MatchStartTime
string
`form:"matchStartTime" search:"type:gte;column:match_start_time;table:om" comment:"比赛开始时间"`
MatchStartTime
string
`form:"matchStartTime" search:"type:gte;column:match_start_time;table:om" comment:"比赛开始时间"`
MatchEndTime
string
`form:"matchEndTime" search:"type:lte;column:match_end_time;table:om" comment:"比赛结束时间"`
MatchEndTime
string
`form:"matchEndTime" search:"type:lte;column:match_end_time;table:om" comment:"比赛结束时间"`
OrgMatchOrder
}
}
type
OrgMatchGetPageReply
struct
{
type
OrgMatchGetPageReply
struct
{
...
@@ -43,7 +42,7 @@ type OrgMatchGetInfoReq struct {
...
@@ -43,7 +42,7 @@ type OrgMatchGetInfoReq struct {
type
OrgMatchGetInfoReply
struct
{
type
OrgMatchGetInfoReply
struct
{
OrgMatch
models
.
OrgMatch
`form:"orgMatch"`
OrgMatch
models
.
OrgMatch
`form:"orgMatch"`
OrgLeagueList
[]
models
.
OrgLeague
`form:"orgLeagueList"`
OrgLeagueList
[]
models
.
OrgLeague
`form:"orgLeagueList"`
OrgSeasonList
[]
models
.
OrgSeason
`form:"orgSeasonList"`
OrgSeasonList
[]
OrgSeasonGetPageReply
`form:"orgSeasonList"`
OrgDivisionList
[]
models
.
OrgDivision
`form:"orgDivisionList"`
OrgDivisionList
[]
models
.
OrgDivision
`form:"orgDivisionList"`
OrgTeamList
[]
OrgTeamGetPageReply
`form:"orgTeamList"`
OrgTeamList
[]
OrgTeamGetPageReply
`form:"orgTeamList"`
}
}
...
...
app/operate/service/dto/org_news.go
View file @
edcfa60d
...
@@ -9,10 +9,14 @@ import (
...
@@ -9,10 +9,14 @@ import (
type
OrgNewsGetPageReq
struct
{
type
OrgNewsGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
OrgNewsOrder
NewsName
string
`form:"newsName" search:"type:contains;column:news_name;table:org_news"`
StartTime
string
`form:"startTime" search:"type:gte;column:created_at;table:org_news" comment:"开始时间"`
EndTime
string
`form:"endTime" search:"type:lte;column:created_at;table:org_news" comment:"结束时间"`
Status
string
`form:"status" search:"type:exact;column:status;table:org_news"`
}
}
type
OrgNewsOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_news"`
type
OrgNewsOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_news"`
NewsName
string
`form:"newsNameOrder" search:"type:order;column:news_name;table:org_news"`
NewsName
string
`form:"newsNameOrder" search:"type:order;column:news_name;table:org_news"`
NewsTitle
string
`form:"newsTitleOrder" search:"type:order;column:news_title;table:org_news"`
NewsTitle
string
`form:"newsTitleOrder" search:"type:order;column:news_title;table:org_news"`
NewsContent
string
`form:"newsContentOrder" search:"type:order;column:news_content;table:org_news"`
NewsContent
string
`form:"newsContentOrder" search:"type:order;column:news_content;table:org_news"`
...
@@ -22,7 +26,6 @@ type OrgNewsOrder struct {Id int `form:"idOrder" search:"type:order;column:id;t
...
@@ -22,7 +26,6 @@ type OrgNewsOrder struct {Id int `form:"idOrder" search:"type:order;column:id;t
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_news"`
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_news"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_news"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_news"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_news"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_news"`
}
}
func
(
m
*
OrgNewsGetPageReq
)
GetNeedSearch
()
interface
{}
{
func
(
m
*
OrgNewsGetPageReq
)
GetNeedSearch
()
interface
{}
{
...
@@ -40,7 +43,7 @@ type OrgNewsInsertReq struct {
...
@@ -40,7 +43,7 @@ type OrgNewsInsertReq struct {
func
(
s
*
OrgNewsInsertReq
)
Generate
(
model
*
models
.
OrgNews
)
{
func
(
s
*
OrgNewsInsertReq
)
Generate
(
model
*
models
.
OrgNews
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
NewsName
=
s
.
NewsName
model
.
NewsName
=
s
.
NewsName
model
.
NewsTitle
=
s
.
NewsTitle
model
.
NewsTitle
=
s
.
NewsTitle
...
@@ -63,7 +66,7 @@ type OrgNewsUpdateReq struct {
...
@@ -63,7 +66,7 @@ type OrgNewsUpdateReq struct {
func
(
s
*
OrgNewsUpdateReq
)
Generate
(
model
*
models
.
OrgNews
)
{
func
(
s
*
OrgNewsUpdateReq
)
Generate
(
model
*
models
.
OrgNews
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
NewsName
=
s
.
NewsName
model
.
NewsName
=
s
.
NewsName
model
.
NewsTitle
=
s
.
NewsTitle
model
.
NewsTitle
=
s
.
NewsTitle
...
@@ -79,6 +82,7 @@ func (s *OrgNewsUpdateReq) GetId() interface{} {
...
@@ -79,6 +82,7 @@ func (s *OrgNewsUpdateReq) GetId() interface{} {
type
OrgNewsGetReq
struct
{
type
OrgNewsGetReq
struct
{
Id
int
`uri:"id"`
Id
int
`uri:"id"`
}
}
func
(
s
*
OrgNewsGetReq
)
GetId
()
interface
{}
{
func
(
s
*
OrgNewsGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
return
s
.
Id
}
}
...
...
app/operate/service/dto/org_season.go
View file @
edcfa60d
...
@@ -9,7 +9,22 @@ import (
...
@@ -9,7 +9,22 @@ import (
type
OrgSeasonGetPageReq
struct
{
type
OrgSeasonGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
OrgSeasonOrder
LeagueId
string
`form:"leagueId" search:"type:exact;column:league_id;table:os"`
SeasonId
string
`form:"seasonId" search:"type:exact;column:id;table:os"`
SeasonStartTime
string
`form:"seasonStartTime" search:"type:gte;column:start_time;table:os" comment:"比赛开始时间"`
SeasonEndTime
string
`form:"seasonEndTime" search:"type:lte;column:end_time;table:os" comment:"比赛结束时间"`
Status
string
`form:"status" search:"type:exact;column:status;table:os"`
}
type
OrgSeasonGetPageReply
struct
{
Id
string
`json:"id"`
LeagueId
string
`json:"leagueId"`
LeagueName
string
`json:"leagueName"`
SeasonName
string
`json:"seasonName"`
TotalRounds
string
`json:"totalRounds"`
StartTime
string
`json:"startTime"`
EndTime
string
`json:"endTime"`
Status
string
`json:"status"`
}
}
type
OrgSeasonGetReply
struct
{
type
OrgSeasonGetReply
struct
{
...
@@ -17,7 +32,8 @@ type OrgSeasonGetReply struct {
...
@@ -17,7 +32,8 @@ type OrgSeasonGetReply struct {
OrgLeagueList
[]
models
.
OrgLeague
`form:"orgLeagueList"`
OrgLeagueList
[]
models
.
OrgLeague
`form:"orgLeagueList"`
}
}
type
OrgSeasonOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_season"`
type
OrgSeasonOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_season"`
LeagueId
string
`form:"leagueIdOrder" search:"type:order;column:league_id;table:org_season"`
LeagueId
string
`form:"leagueIdOrder" search:"type:order;column:league_id;table:org_season"`
DivisionId
string
`form:"divisionIdOrder" search:"type:order;column:division_id;table:org_season"`
DivisionId
string
`form:"divisionIdOrder" search:"type:order;column:division_id;table:org_season"`
SeasonName
string
`form:"seasonNameOrder" search:"type:order;column:season_name;table:org_season"`
SeasonName
string
`form:"seasonNameOrder" search:"type:order;column:season_name;table:org_season"`
...
@@ -30,7 +46,6 @@ type OrgSeasonOrder struct {Id int `form:"idOrder" search:"type:order;column:id
...
@@ -30,7 +46,6 @@ type OrgSeasonOrder struct {Id int `form:"idOrder" search:"type:order;column:id
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_season"`
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_season"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_season"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_season"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_season"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_season"`
}
}
func
(
m
*
OrgSeasonGetPageReq
)
GetNeedSearch
()
interface
{}
{
func
(
m
*
OrgSeasonGetPageReq
)
GetNeedSearch
()
interface
{}
{
...
@@ -51,7 +66,7 @@ type OrgSeasonInsertReq struct {
...
@@ -51,7 +66,7 @@ type OrgSeasonInsertReq struct {
func
(
s
*
OrgSeasonInsertReq
)
Generate
(
model
*
models
.
OrgSeason
)
{
func
(
s
*
OrgSeasonInsertReq
)
Generate
(
model
*
models
.
OrgSeason
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
LeagueId
=
s
.
LeagueId
model
.
LeagueId
=
s
.
LeagueId
model
.
DivisionId
=
s
.
DivisionId
model
.
DivisionId
=
s
.
DivisionId
...
@@ -80,7 +95,7 @@ type OrgSeasonUpdateReq struct {
...
@@ -80,7 +95,7 @@ type OrgSeasonUpdateReq struct {
func
(
s
*
OrgSeasonUpdateReq
)
Generate
(
model
*
models
.
OrgSeason
)
{
func
(
s
*
OrgSeasonUpdateReq
)
Generate
(
model
*
models
.
OrgSeason
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
LeagueId
=
s
.
LeagueId
model
.
LeagueId
=
s
.
LeagueId
model
.
DivisionId
=
s
.
DivisionId
model
.
DivisionId
=
s
.
DivisionId
...
@@ -99,6 +114,7 @@ func (s *OrgSeasonUpdateReq) GetId() interface{} {
...
@@ -99,6 +114,7 @@ func (s *OrgSeasonUpdateReq) GetId() interface{} {
type
OrgSeasonGetReq
struct
{
type
OrgSeasonGetReq
struct
{
Id
int
`uri:"id"`
Id
int
`uri:"id"`
}
}
func
(
s
*
OrgSeasonGetReq
)
GetId
()
interface
{}
{
func
(
s
*
OrgSeasonGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
return
s
.
Id
}
}
...
...
app/operate/service/org_season.go
View file @
edcfa60d
...
@@ -17,15 +17,19 @@ type OrgSeason struct {
...
@@ -17,15 +17,19 @@ type OrgSeason struct {
}
}
// GetPage 获取OrgSeason列表
// GetPage 获取OrgSeason列表
func
(
e
*
OrgSeason
)
GetPage
(
c
*
dto
.
OrgSeasonGetPageReq
,
p
*
actions
.
DataPermission
,
list
*
[]
models
.
OrgSeason
,
count
*
int64
)
error
{
func
(
e
*
OrgSeason
)
GetPage
(
c
*
dto
.
OrgSeasonGetPageReq
,
p
*
actions
.
DataPermission
,
list
*
[]
dto
.
OrgSeasonGetPageReply
,
count
*
int64
)
error
{
var
err
error
var
err
error
var
data
models
.
OrgSeason
var
data
models
.
OrgSeason
err
=
e
.
Orm
.
Model
(
&
data
)
.
err
=
e
.
Orm
.
Table
(
"org_season as os"
)
.
Joins
(
"left join org_league as ol on os.league_id=ol.id"
)
.
Select
(
"os.id, os.league_id, ol.league_name, os.season_name, os.total_rounds, os.start_time,"
+
"os.end_time, os.status"
)
.
Scopes
(
Scopes
(
cDto
.
MakeCondition
(
c
.
GetNeedSearch
()),
cDto
.
MakeCondition
(
c
.
GetNeedSearch
()),
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
actions
.
Permission
(
data
.
TableName
(),
p
),
actions
.
Permission
(
data
.
TableName
(),
p
),
cDto
.
PassDel
(
"os"
),
)
.
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
Count
(
count
)
.
Error
...
...
docs/docs.go
View file @
edcfa60d
This diff is collapsed.
Click to expand it.
docs/swagger.json
View file @
edcfa60d
This diff is collapsed.
Click to expand it.
docs/swagger.yaml
View file @
edcfa60d
This diff is collapsed.
Click to expand it.
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