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
4691a15e
Commit
4691a15e
authored
Dec 31, 2021
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
影像维护
parent
4877c269
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
284 additions
and
195 deletions
+284
-195
org_match.go
app/operate/apis/org_match.go
+13
-4
org_match_evaluate.go
app/operate/apis/org_match_evaluate.go
+36
-35
org_team_match_evaluate.go
app/operate/apis/org_team_match_evaluate.go
+33
-33
org_match_evaluate.go
app/operate/models/org_match_evaluate.go
+18
-14
org_match_team_player.go
app/operate/models/org_match_team_player.go
+1
-0
org_player.go
app/operate/models/org_player.go
+17
-17
org_match_evaluate.go
app/operate/service/dto/org_match_evaluate.go
+100
-58
org_match_team_player.go
app/operate/service/dto/org_match_team_player.go
+6
-1
org_match_evaluate.go
app/operate/service/org_match_evaluate.go
+60
-33
No files found.
app/operate/apis/org_match.go
View file @
4691a15e
...
@@ -355,7 +355,7 @@ func (e OrgMatch) GetPlayerIsSet(c *gin.Context) {
...
@@ -355,7 +355,7 @@ func (e OrgMatch) GetPlayerIsSet(c *gin.Context) {
// @Product application/json
// @Product application/json
// @Param data body dto.UpdateOrgMatchTeamPlayerReq true "body"
// @Param data body dto.UpdateOrgMatchTeamPlayerReq true "body"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Router /api/v1/org-match/update-player
/{id}
[put]
// @Router /api/v1/org-match/update-player [put]
// @Security Bearer
// @Security Bearer
func
(
e
OrgMatch
)
UpdatePlayer
(
c
*
gin
.
Context
)
{
func
(
e
OrgMatch
)
UpdatePlayer
(
c
*
gin
.
Context
)
{
req
:=
dto
.
UpdateOrgMatchTeamPlayerReq
{}
req
:=
dto
.
UpdateOrgMatchTeamPlayerReq
{}
...
@@ -373,7 +373,7 @@ func (e OrgMatch) UpdatePlayer(c *gin.Context) {
...
@@ -373,7 +373,7 @@ func (e OrgMatch) UpdatePlayer(c *gin.Context) {
playersIds
:=
strings
.
Split
(
req
.
PlayersIds
,
","
)
playersIds
:=
strings
.
Split
(
req
.
PlayersIds
,
","
)
sOrgPlayer
:=
service
.
OrgPlayer
{}
sOrgPlayer
:=
service
.
OrgPlayer
{}
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
s
.
Service
)
.
Errors
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
s
OrgPlayer
.
Service
)
.
Errors
if
err
!=
nil
{
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
e
.
Error
(
500
,
err
,
err
.
Error
())
...
@@ -382,15 +382,23 @@ func (e OrgMatch) UpdatePlayer(c *gin.Context) {
...
@@ -382,15 +382,23 @@ func (e OrgMatch) UpdatePlayer(c *gin.Context) {
p
:=
actions
.
GetPermissionFromContext
(
c
)
p
:=
actions
.
GetPermissionFromContext
(
c
)
for
_
,
v
:=
range
playersIds
{
for
_
,
v
:=
range
playersIds
{
var
orgPlayer
models
.
OrgPlayer
orgPlayer
:=
new
(
models
.
OrgPlayer
)
id
,
_
:=
strconv
.
Atoi
(
v
)
id
,
_
:=
strconv
.
Atoi
(
v
)
err
=
sOrgPlayer
.
Get
(
&
dto
.
OrgPlayerGetReq
{
Id
:
id
},
p
,
&
orgPlayer
)
reqOrgPlayer
:=
new
(
dto
.
OrgPlayerGetReq
)
reqOrgPlayer
.
Id
=
id
err
=
sOrgPlayer
.
Get
(
reqOrgPlayer
,
p
,
orgPlayer
)
//if orgPlayer.Id == 0 {
// e.Error(500, err, "球员不存在")
// return
//}
if
err
!=
nil
{
if
err
!=
nil
{
orgMatchPlayer
:=
dto
.
OrgMatchTeamPlayerInsertReq
{
orgMatchPlayer
:=
dto
.
OrgMatchTeamPlayerInsertReq
{
MatchId
:
req
.
MatchId
,
MatchId
:
req
.
MatchId
,
ClubId
:
orgPlayer
.
ClubId
,
ClubId
:
orgPlayer
.
ClubId
,
TeamId
:
orgPlayer
.
TeamId
,
TeamId
:
orgPlayer
.
TeamId
,
PlayerId
:
v
,
PlayerName
:
orgPlayer
.
PlayerName
,
PlayerName
:
orgPlayer
.
PlayerName
,
PlayerNumber
:
orgPlayer
.
PlayerNumber
,
PlayerNumber
:
orgPlayer
.
PlayerNumber
,
Position
:
orgPlayer
.
Position
,
Position
:
orgPlayer
.
Position
,
...
@@ -405,6 +413,7 @@ func (e OrgMatch) UpdatePlayer(c *gin.Context) {
...
@@ -405,6 +413,7 @@ func (e OrgMatch) UpdatePlayer(c *gin.Context) {
MatchId
:
req
.
MatchId
,
MatchId
:
req
.
MatchId
,
ClubId
:
orgPlayer
.
ClubId
,
ClubId
:
orgPlayer
.
ClubId
,
TeamId
:
orgPlayer
.
TeamId
,
TeamId
:
orgPlayer
.
TeamId
,
PlayerId
:
v
,
PlayerName
:
orgPlayer
.
PlayerName
,
PlayerName
:
orgPlayer
.
PlayerName
,
PlayerNumber
:
orgPlayer
.
PlayerNumber
,
PlayerNumber
:
orgPlayer
.
PlayerNumber
,
Position
:
orgPlayer
.
Position
,
Position
:
orgPlayer
.
Position
,
...
...
app/operate/apis/org_match_evaluate.go
View file @
4691a15e
...
@@ -42,7 +42,7 @@ func (e OrgMatchEvaluate) GetPage(c *gin.Context) {
...
@@ -42,7 +42,7 @@ func (e OrgMatchEvaluate) GetPage(c *gin.Context) {
}
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgMatchEvaluate
,
0
)
list
:=
make
([]
dto
.
OrgMatchEvaluateGetPageReply
,
0
)
var
count
int64
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
...
@@ -78,7 +78,7 @@ func (e OrgMatchEvaluate) GetPageMatch(c *gin.Context) {
...
@@ -78,7 +78,7 @@ func (e OrgMatchEvaluate) GetPageMatch(c *gin.Context) {
}
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgMatchEvaluate
,
0
)
list
:=
make
([]
dto
.
OrgMatchEvaluateGetPageReply
,
0
)
var
count
int64
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
...
@@ -120,7 +120,7 @@ func (e OrgMatchEvaluate) Get(c *gin.Context) {
...
@@ -120,7 +120,7 @@ func (e OrgMatchEvaluate) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Update <赛事>赛后评价影像维护
// Update <赛事>赛后评价影像维护
...
@@ -154,8 +154,9 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
...
@@ -154,8 +154,9 @@ func (e OrgMatchEvaluate) 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
(),
"修改成功"
)
}
}
// Update <赛事>赛后评价影像维护
// Update <赛事>赛后评价影像维护
// @Summary <赛事>赛后评价影像维护
// @Summary <赛事>赛后评价影像维护
// @Description <赛事>赛后评价影像维护
// @Description <赛事>赛后评价影像维护
...
@@ -187,5 +188,5 @@ func (e OrgMatchEvaluate) Status(c *gin.Context) {
...
@@ -187,5 +188,5 @@ func (e OrgMatchEvaluate) Status(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_evaluate.go
View file @
4691a15e
...
@@ -42,7 +42,7 @@ func (e OrgTeamMatchEvaluate) GetPage(c *gin.Context) {
...
@@ -42,7 +42,7 @@ func (e OrgTeamMatchEvaluate) GetPage(c *gin.Context) {
}
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgMatchEvaluate
,
0
)
list
:=
make
([]
dto
.
OrgMatchEvaluateGetPageReply
,
0
)
var
count
int64
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
...
@@ -78,7 +78,7 @@ func (e OrgTeamMatchEvaluate) GetPageMatch(c *gin.Context) {
...
@@ -78,7 +78,7 @@ func (e OrgTeamMatchEvaluate) GetPageMatch(c *gin.Context) {
}
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgMatchEvaluate
,
0
)
list
:=
make
([]
dto
.
OrgMatchEvaluateGetPageReply
,
0
)
var
count
int64
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
...
@@ -120,7 +120,7 @@ func (e OrgTeamMatchEvaluate) Get(c *gin.Context) {
...
@@ -120,7 +120,7 @@ func (e OrgTeamMatchEvaluate) Get(c *gin.Context) {
return
return
}
}
e
.
OK
(
object
,
"查询成功"
)
e
.
OK
(
object
,
"查询成功"
)
}
}
// Update <球队>修改评价
// Update <球队>修改评价
...
@@ -154,5 +154,5 @@ func (e OrgTeamMatchEvaluate) Update(c *gin.Context) {
...
@@ -154,5 +154,5 @@ func (e OrgTeamMatchEvaluate) 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/models/org_match_evaluate.go
View file @
4691a15e
...
@@ -9,13 +9,17 @@ import (
...
@@ -9,13 +9,17 @@ import (
type
OrgMatchEvaluate
struct
{
type
OrgMatchEvaluate
struct
{
models
.
Model
models
.
Model
Rounds
string
`json:"rounds" gorm:"type:bigint(20);comment:Rounds"`
TeamUserId
string
`json:"teamUserId" gorm:"type:bigint(20);comment:org_team_user表id(教练id)"`
TeamUserId
string
`json:"teamUserId" gorm:"type:bigint(20);comment:org_team_user表id(教练id)"`
PlayerId
string
`json:"playerId" gorm:"type:bigint(20);comment:org_player表id(球员id)"`
PlayerId
string
`json:"playerId" gorm:"type:bigint(20);comment:org_player表id(球员id)"`
Content
string
`json:"content" gorm:"type:text;comment:教练评价内容"`
Content
string
`json:"content" gorm:"type:text;comment:教练评价内容"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" gorm:"type:varchar(255);comment:精彩时刻图"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" gorm:"type:varchar(255);comment:精彩时刻图"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" gorm:"type:varchar(255);comment:精彩时刻图标题"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" gorm:"type:varchar(255);comment:精彩时刻视频"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" gorm:"type:varchar(255);comment:精彩时刻视频"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" gorm:"type:varchar(255);comment:精彩时刻图标题"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" gorm:"type:varchar(255);comment:精彩时刻视频标题"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" gorm:"type:varchar(255);comment:精彩时刻视频标题"`
MvStatus
string
`json:"mvStatus" gorm:"type:bigint(20);comment:视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`json:"status" gorm:"type:bigint(20);comment:发布状态 1 待审核 3 驳回 4 发布完成"`
Remark
string
`json:"remark" gorm:"type:varchar(255);comment:驳回原因"`
models
.
ModelTime
models
.
ModelTime
models
.
ControlBy
models
.
ControlBy
}
}
...
...
app/operate/models/org_match_team_player.go
View file @
4691a15e
...
@@ -11,6 +11,7 @@ type OrgMatchTeamPlayer struct {
...
@@ -11,6 +11,7 @@ type OrgMatchTeamPlayer struct {
MatchId
string
`json:"matchId" gorm:"type:bigint(20);comment:MatchId"`
MatchId
string
`json:"matchId" gorm:"type:bigint(20);comment:MatchId"`
ClubId
string
`json:"clubId" gorm:"type:bigint(20);comment:ClubId"`
ClubId
string
`json:"clubId" gorm:"type:bigint(20);comment:ClubId"`
TeamId
string
`json:"teamId" gorm:"type:bigint(20);comment:TeamId"`
TeamId
string
`json:"teamId" gorm:"type:bigint(20);comment:TeamId"`
PlayerId
string
`json:"playerId" gorm:"type:bigint(20);comment:PlayerId"`
PlayerName
string
`json:"playerName" gorm:"type:varchar(60);comment:球员名称"`
PlayerName
string
`json:"playerName" gorm:"type:varchar(60);comment:球员名称"`
PlayerNumber
string
`json:"playerNumber" gorm:"type:varchar(60);comment:球员号码"`
PlayerNumber
string
`json:"playerNumber" gorm:"type:varchar(60);comment:球员号码"`
Position
string
`json:"position" gorm:"type:varchar(60);comment:场上位置"`
Position
string
`json:"position" gorm:"type:varchar(60);comment:场上位置"`
...
...
app/operate/models/org_player.go
View file @
4691a15e
app/operate/service/dto/org_match_evaluate.go
View file @
4691a15e
...
@@ -9,10 +9,33 @@ import (
...
@@ -9,10 +9,33 @@ import (
type
OrgMatchEvaluateGetPageReq
struct
{
type
OrgMatchEvaluateGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
dto
.
Pagination
`search:"-"`
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:""`
SeasonId
string
`form:"seasonId" search:"type:exact;column:season_id;table:om" comment:""`
Rounds
string
`form:"rounds" search:"type:exact;column:rounds;table:omtp" comment:""`
PlayerName
string
`form:"playerName" search:"type:exact;column:player_name;table:omtp" comment:""`
MvStatus
string
`form:"mvStatus" search:"type:exact;column:mv_status;table:ome" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`form:"status" search:"type:exact;column:status;table:ome" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
OrgMatchEvaluateOrder
OrgMatchEvaluateOrder
}
}
type
OrgMatchEvaluateOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_match_evaluate"`
type
OrgMatchEvaluateGetPageReply
struct
{
Id
string
`json:"id"`
LeagueName
string
`json:"leagueName"`
DivisionName
string
`json:"divisionName"`
SeasonName
string
`json:"seasonName"`
Rounds
string
`json:"rounds"`
PlayerName
string
`json:"playerName"`
MatchStartTime
time
.
Time
`form:"matchStartTimeOrder" search:"type:order;column:match_start_time;table:org_match"`
MatchEndTime
time
.
Time
`form:"matchEndTimeOrder" search:"type:order;column:match_end_time;table:org_match"`
MvStatus
string
`json:"mvStatus" gorm:"type:bigint(20);comment:视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`json:"status" gorm:"type:bigint(20);comment:发布状态 1 待审核 3 驳回 4 发布完成"`
}
//ol.league_name, od.division_name, os.season_name, om.rounds, omtp.player_name, om.match_start_time, om.match_end_time, ome.mv_status, ome.status, ome.remark
type
OrgMatchEvaluateOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_match_evaluate"`
Rounds
string
`form:"roundsOrder" search:"type:order;column:rounds;table:org_match_evaluate"`
TeamUserId
string
`form:"teamUserIdOrder" search:"type:order;column:team_user_id;table:org_match_evaluate"`
TeamUserId
string
`form:"teamUserIdOrder" search:"type:order;column:team_user_id;table:org_match_evaluate"`
PlayerId
string
`form:"playerIdOrder" search:"type:order;column:player_id;table:org_match_evaluate"`
PlayerId
string
`form:"playerIdOrder" search:"type:order;column:player_id;table:org_match_evaluate"`
Content
string
`form:"contentOrder" search:"type:order;column:content;table:org_match_evaluate"`
Content
string
`form:"contentOrder" search:"type:order;column:content;table:org_match_evaluate"`
...
@@ -20,12 +43,14 @@ type OrgMatchEvaluateOrder struct {Id int `form:"idOrder" search:"type:order;co
...
@@ -20,12 +43,14 @@ type OrgMatchEvaluateOrder struct {Id int `form:"idOrder" search:"type:order;co
WonderfulMomentMv
string
`form:"wonderfulMomentMvOrder" search:"type:order;column:wonderful_moment_mv;table:org_match_evaluate"`
WonderfulMomentMv
string
`form:"wonderfulMomentMvOrder" search:"type:order;column:wonderful_moment_mv;table:org_match_evaluate"`
WonderfulMomentImgTitle
string
`form:"wonderfulMomentImgTitleOrder" search:"type:order;column:wonderful_moment_img_title;table:org_match_evaluate"`
WonderfulMomentImgTitle
string
`form:"wonderfulMomentImgTitleOrder" search:"type:order;column:wonderful_moment_img_title;table:org_match_evaluate"`
WonderfulMomentMvTitle
string
`form:"wonderfulMomentMvTitleOrder" search:"type:order;column:wonderful_moment_mv_title;table:org_match_evaluate"`
WonderfulMomentMvTitle
string
`form:"wonderfulMomentMvTitleOrder" search:"type:order;column:wonderful_moment_mv_title;table:org_match_evaluate"`
MvStatus
string
`form:"mvStatusOrder" search:"type:order;column:mv_status;table:org_match_evaluate"`
Status
string
`form:"statusOrder" search:"type:order;column:status;table:org_match_evaluate"`
Remark
string
`form:"remarkOrder" search:"type:order;column:remark;table:org_match_evaluate"`
CreateBy
string
`form:"createByOrder" search:"type:order;column:create_by;table:org_match_evaluate"`
CreateBy
string
`form:"createByOrder" search:"type:order;column:create_by;table:org_match_evaluate"`
UpdateBy
string
`form:"updateByOrder" search:"type:order;column:update_by;table:org_match_evaluate"`
UpdateBy
string
`form:"updateByOrder" search:"type:order;column:update_by;table:org_match_evaluate"`
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_match_evaluate"`
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_match_evaluate"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_match_evaluate"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_match_evaluate"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_match_evaluate"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_match_evaluate"`
}
}
func
(
m
*
OrgMatchEvaluateGetPageReq
)
GetNeedSearch
()
interface
{}
{
func
(
m
*
OrgMatchEvaluateGetPageReq
)
GetNeedSearch
()
interface
{}
{
...
@@ -34,20 +59,25 @@ func (m *OrgMatchEvaluateGetPageReq) GetNeedSearch() interface{} {
...
@@ -34,20 +59,25 @@ func (m *OrgMatchEvaluateGetPageReq) GetNeedSearch() interface{} {
type
OrgMatchEvaluateInsertReq
struct
{
type
OrgMatchEvaluateInsertReq
struct
{
Id
int
`json:"-" comment:""`
//
Id
int
`json:"-" comment:""`
//
Rounds
string
`json:"rounds" comment:""`
TeamUserId
string
`json:"teamUserId" comment:"org_team_user表id(教练id)"`
TeamUserId
string
`json:"teamUserId" comment:"org_team_user表id(教练id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
Content
string
`json:"content" comment:"教练评价内容"`
Content
string
`json:"content" comment:"教练评价内容"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" comment:"精彩时刻图"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" comment:"精彩时刻图"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" comment:"精彩时刻图标题
"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" comment:"精彩时刻视频
"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" comment:"精彩时刻视频
"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" comment:"精彩时刻图标题
"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" comment:"精彩时刻视频标题"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" comment:"精彩时刻视频标题"`
MvStatus
string
`json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
Remark
string
`json:"remark" comment:"驳回原因"`
common
.
ControlBy
common
.
ControlBy
}
}
func
(
s
*
OrgMatchEvaluateInsertReq
)
Generate
(
model
*
models
.
OrgMatchEvaluate
)
{
func
(
s
*
OrgMatchEvaluateInsertReq
)
Generate
(
model
*
models
.
OrgMatchEvaluate
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
Rounds
=
s
.
Rounds
model
.
TeamUserId
=
s
.
TeamUserId
model
.
TeamUserId
=
s
.
TeamUserId
model
.
PlayerId
=
s
.
PlayerId
model
.
PlayerId
=
s
.
PlayerId
model
.
Content
=
s
.
Content
model
.
Content
=
s
.
Content
...
@@ -55,6 +85,9 @@ func (s *OrgMatchEvaluateInsertReq) Generate(model *models.OrgMatchEvaluate) {
...
@@ -55,6 +85,9 @@ func (s *OrgMatchEvaluateInsertReq) Generate(model *models.OrgMatchEvaluate) {
model
.
WonderfulMomentMv
=
s
.
WonderfulMomentMv
model
.
WonderfulMomentMv
=
s
.
WonderfulMomentMv
model
.
WonderfulMomentImgTitle
=
s
.
WonderfulMomentImgTitle
model
.
WonderfulMomentImgTitle
=
s
.
WonderfulMomentImgTitle
model
.
WonderfulMomentMvTitle
=
s
.
WonderfulMomentMvTitle
model
.
WonderfulMomentMvTitle
=
s
.
WonderfulMomentMvTitle
model
.
MvStatus
=
s
.
MvStatus
model
.
Status
=
s
.
Status
model
.
Remark
=
s
.
Remark
}
}
func
(
s
*
OrgMatchEvaluateInsertReq
)
GetId
()
interface
{}
{
func
(
s
*
OrgMatchEvaluateInsertReq
)
GetId
()
interface
{}
{
...
@@ -63,20 +96,25 @@ func (s *OrgMatchEvaluateInsertReq) GetId() interface{} {
...
@@ -63,20 +96,25 @@ func (s *OrgMatchEvaluateInsertReq) GetId() interface{} {
type
OrgMatchEvaluateUpdateReq
struct
{
type
OrgMatchEvaluateUpdateReq
struct
{
Id
int
`uri:"id" comment:""`
//
Id
int
`uri:"id" comment:""`
//
Rounds
string
`json:"rounds" comment:""`
TeamUserId
string
`json:"teamUserId" comment:"org_team_user表id(教练id)"`
TeamUserId
string
`json:"teamUserId" comment:"org_team_user表id(教练id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
Content
string
`json:"content" comment:"教练评价内容"`
Content
string
`json:"content" comment:"教练评价内容"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" comment:"精彩时刻图"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" comment:"精彩时刻图"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" comment:"精彩时刻图标题
"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" comment:"精彩时刻视频
"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" comment:"精彩时刻视频
"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" comment:"精彩时刻图标题
"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" comment:"精彩时刻视频标题"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" comment:"精彩时刻视频标题"`
MvStatus
string
`json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
Remark
string
`json:"remark" comment:"驳回原因"`
common
.
ControlBy
common
.
ControlBy
}
}
func
(
s
*
OrgMatchEvaluateUpdateReq
)
Generate
(
model
*
models
.
OrgMatchEvaluate
)
{
func
(
s
*
OrgMatchEvaluateUpdateReq
)
Generate
(
model
*
models
.
OrgMatchEvaluate
)
{
if
s
.
Id
==
0
{
if
s
.
Id
==
0
{
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
model
.
Model
=
common
.
Model
{
Id
:
s
.
Id
}
}
}
model
.
Rounds
=
s
.
Rounds
model
.
TeamUserId
=
s
.
TeamUserId
model
.
TeamUserId
=
s
.
TeamUserId
model
.
PlayerId
=
s
.
PlayerId
model
.
PlayerId
=
s
.
PlayerId
model
.
Content
=
s
.
Content
model
.
Content
=
s
.
Content
...
@@ -84,6 +122,9 @@ func (s *OrgMatchEvaluateUpdateReq) Generate(model *models.OrgMatchEvaluate) {
...
@@ -84,6 +122,9 @@ func (s *OrgMatchEvaluateUpdateReq) Generate(model *models.OrgMatchEvaluate) {
model
.
WonderfulMomentMv
=
s
.
WonderfulMomentMv
model
.
WonderfulMomentMv
=
s
.
WonderfulMomentMv
model
.
WonderfulMomentImgTitle
=
s
.
WonderfulMomentImgTitle
model
.
WonderfulMomentImgTitle
=
s
.
WonderfulMomentImgTitle
model
.
WonderfulMomentMvTitle
=
s
.
WonderfulMomentMvTitle
model
.
WonderfulMomentMvTitle
=
s
.
WonderfulMomentMvTitle
model
.
MvStatus
=
s
.
MvStatus
model
.
Status
=
s
.
Status
model
.
Remark
=
s
.
Remark
}
}
func
(
s
*
OrgMatchEvaluateUpdateReq
)
GetId
()
interface
{}
{
func
(
s
*
OrgMatchEvaluateUpdateReq
)
GetId
()
interface
{}
{
...
@@ -94,6 +135,7 @@ func (s *OrgMatchEvaluateUpdateReq) GetId() interface{} {
...
@@ -94,6 +135,7 @@ func (s *OrgMatchEvaluateUpdateReq) GetId() interface{} {
type
OrgMatchEvaluateGetReq
struct
{
type
OrgMatchEvaluateGetReq
struct
{
Id
int
`uri:"id"`
Id
int
`uri:"id"`
}
}
func
(
s
*
OrgMatchEvaluateGetReq
)
GetId
()
interface
{}
{
func
(
s
*
OrgMatchEvaluateGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
return
s
.
Id
}
}
...
...
app/operate/service/dto/org_match_team_player.go
View file @
4691a15e
...
@@ -13,7 +13,7 @@ type OrgMatchTeamPlayerGetPageReq struct {
...
@@ -13,7 +13,7 @@ type OrgMatchTeamPlayerGetPageReq struct {
}
}
type
UpdateOrgMatchTeamPlayerReq
struct
{
type
UpdateOrgMatchTeamPlayerReq
struct
{
MatchId
string
`json:"matchId" gorm:"type:bigint(20);comment:MatchId"`
MatchId
string
`json:"matchId" gorm:"type:bigint(20);comment:MatchId"`
PlayersIds
string
`
form
:"playersIds"`
PlayersIds
string
`
json
:"playersIds"`
}
}
type
OrgMatchTeamPlayerOrder
struct
{
type
OrgMatchTeamPlayerOrder
struct
{
...
@@ -21,6 +21,7 @@ type OrgMatchTeamPlayerOrder struct {
...
@@ -21,6 +21,7 @@ type OrgMatchTeamPlayerOrder struct {
MatchId
string
`form:"matchIdOrder" search:"type:order;column:match_id;table:org_match_team_player"`
MatchId
string
`form:"matchIdOrder" search:"type:order;column:match_id;table:org_match_team_player"`
ClubId
string
`form:"clubIdOrder" search:"type:order;column:club_id;table:org_match_team_player"`
ClubId
string
`form:"clubIdOrder" search:"type:order;column:club_id;table:org_match_team_player"`
TeamId
string
`form:"teamIdOrder" search:"type:order;column:team_id;table:org_match_team_player"`
TeamId
string
`form:"teamIdOrder" search:"type:order;column:team_id;table:org_match_team_player"`
PlayerId
string
`form:"playerIdOrder" search:"type:order;column:player_id;table:org_match_team_player"`
PlayerName
string
`form:"playerNameOrder" search:"type:order;column:player_name;table:org_match_team_player"`
PlayerName
string
`form:"playerNameOrder" search:"type:order;column:player_name;table:org_match_team_player"`
PlayerNumber
string
`form:"playerNumberOrder" search:"type:order;column:player_number;table:org_match_team_player"`
PlayerNumber
string
`form:"playerNumberOrder" search:"type:order;column:player_number;table:org_match_team_player"`
Position
string
`form:"positionOrder" search:"type:order;column:position;table:org_match_team_player"`
Position
string
`form:"positionOrder" search:"type:order;column:position;table:org_match_team_player"`
...
@@ -49,6 +50,7 @@ type OrgMatchTeamPlayerInsertReq struct {
...
@@ -49,6 +50,7 @@ type OrgMatchTeamPlayerInsertReq struct {
MatchId
string
`json:"matchId" comment:""`
MatchId
string
`json:"matchId" comment:""`
ClubId
string
`json:"clubId" comment:""`
ClubId
string
`json:"clubId" comment:""`
TeamId
string
`json:"teamId" comment:""`
TeamId
string
`json:"teamId" comment:""`
PlayerId
string
`json:"playerId" comment:""`
PlayerName
string
`json:"playerName" comment:"球员名称"`
PlayerName
string
`json:"playerName" comment:"球员名称"`
PlayerNumber
string
`json:"playerNumber" comment:"球员号码"`
PlayerNumber
string
`json:"playerNumber" comment:"球员号码"`
Position
string
`json:"position" comment:"场上位置"`
Position
string
`json:"position" comment:"场上位置"`
...
@@ -71,6 +73,7 @@ func (s *OrgMatchTeamPlayerInsertReq) Generate(model *models.OrgMatchTeamPlayer)
...
@@ -71,6 +73,7 @@ func (s *OrgMatchTeamPlayerInsertReq) Generate(model *models.OrgMatchTeamPlayer)
model
.
MatchId
=
s
.
MatchId
model
.
MatchId
=
s
.
MatchId
model
.
ClubId
=
s
.
ClubId
model
.
ClubId
=
s
.
ClubId
model
.
TeamId
=
s
.
TeamId
model
.
TeamId
=
s
.
TeamId
model
.
PlayerId
=
s
.
PlayerId
model
.
PlayerName
=
s
.
PlayerName
model
.
PlayerName
=
s
.
PlayerName
model
.
PlayerNumber
=
s
.
PlayerNumber
model
.
PlayerNumber
=
s
.
PlayerNumber
model
.
Position
=
s
.
Position
model
.
Position
=
s
.
Position
...
@@ -94,6 +97,7 @@ type OrgMatchTeamPlayerUpdateReq struct {
...
@@ -94,6 +97,7 @@ type OrgMatchTeamPlayerUpdateReq struct {
MatchId
string
`json:"matchId" comment:""`
MatchId
string
`json:"matchId" comment:""`
ClubId
string
`json:"clubId" comment:""`
ClubId
string
`json:"clubId" comment:""`
TeamId
string
`json:"teamId" comment:""`
TeamId
string
`json:"teamId" comment:""`
PlayerId
string
`json:"playerId" comment:""`
PlayerName
string
`json:"playerName" comment:"球员名称"`
PlayerName
string
`json:"playerName" comment:"球员名称"`
PlayerNumber
string
`json:"playerNumber" comment:"球员号码"`
PlayerNumber
string
`json:"playerNumber" comment:"球员号码"`
Position
string
`json:"position" comment:"场上位置"`
Position
string
`json:"position" comment:"场上位置"`
...
@@ -116,6 +120,7 @@ func (s *OrgMatchTeamPlayerUpdateReq) Generate(model *models.OrgMatchTeamPlayer)
...
@@ -116,6 +120,7 @@ func (s *OrgMatchTeamPlayerUpdateReq) Generate(model *models.OrgMatchTeamPlayer)
model
.
MatchId
=
s
.
MatchId
model
.
MatchId
=
s
.
MatchId
model
.
ClubId
=
s
.
ClubId
model
.
ClubId
=
s
.
ClubId
model
.
TeamId
=
s
.
TeamId
model
.
TeamId
=
s
.
TeamId
model
.
PlayerId
=
s
.
PlayerId
model
.
PlayerName
=
s
.
PlayerName
model
.
PlayerName
=
s
.
PlayerName
model
.
PlayerNumber
=
s
.
PlayerNumber
model
.
PlayerNumber
=
s
.
PlayerNumber
model
.
Position
=
s
.
Position
model
.
Position
=
s
.
Position
...
...
app/operate/service/org_match_evaluate.go
View file @
4691a15e
...
@@ -2,35 +2,62 @@ package service
...
@@ -2,35 +2,62 @@ package service
import
(
import
(
"errors"
"errors"
"github.com/go-admin-team/go-admin-core/sdk/service"
"github.com/go-admin-team/go-admin-core/sdk/service"
cDto
"go-admin/common/dto"
"gorm.io/gorm"
"gorm.io/gorm"
"go-admin/app/operate/models"
"go-admin/app/operate/models"
"go-admin/app/operate/service/dto"
"go-admin/app/operate/service/dto"
"go-admin/common/actions"
"go-admin/common/actions"
cDto
"go-admin/common/dto"
)
)
type
OrgMatchEvaluate
struct
{
type
OrgMatchEvaluate
struct
{
service
.
Service
service
.
Service
}
}
func
CreateSearch
(
key
string
,
act
string
,
value
string
)
func
(
db
*
gorm
.
DB
)
*
gorm
.
DB
{
return
func
(
db
*
gorm
.
DB
)
*
gorm
.
DB
{
if
value
!=
""
{
switch
act
{
case
"="
:
return
db
.
Where
(
key
+
" = ?"
,
value
)
case
"like"
:
return
db
.
Where
(
key
+
" like '%?%'"
,
value
)
case
">"
:
return
db
.
Where
(
key
+
" > ?"
,
value
)
case
"<"
:
return
db
.
Where
(
key
+
" > ?"
,
value
)
case
"<>"
:
return
db
.
Where
(
key
+
" <> ?"
,
value
)
default
:
return
db
}
}
else
{
return
db
}
}
}
// GetPage 获取OrgMatchEvaluate列表
// GetPage 获取OrgMatchEvaluate列表
func
(
e
*
OrgMatchEvaluate
)
GetPage
(
c
*
dto
.
OrgMatchEvaluateGetPageReq
,
p
*
actions
.
DataPermission
,
list
*
[]
models
.
OrgMatchEvaluate
,
count
*
int64
)
error
{
func
(
e
*
OrgMatchEvaluate
)
GetPage
(
c
*
dto
.
OrgMatchEvaluateGetPageReq
,
p
*
actions
.
DataPermission
,
list
*
[]
dto
.
OrgMatchEvaluateGetPageReply
,
count
*
int64
)
error
{
var
err
error
var
err
error
var
data
models
.
OrgMatchEvaluate
err
=
e
.
Orm
.
Model
(
&
data
)
.
err
=
e
.
Orm
.
Table
(
"org_match_team_player as omtp"
)
.
Select
(
"omtp.id, ol.league_name, od.division_name, os.season_name, om.rounds, omtp.player_name, om.match_start_time, om.match_end_time, ome.mv_status, ome.status, ome.remark"
)
.
Joins
(
"left join org_match_evaluate as ome on omtp.player_id = ome.player_id"
)
.
Joins
(
"left join org_match as om on omtp.match_id = om.id"
)
.
Joins
(
"left join org_league as ol on ol.id = om.league_id"
)
.
Joins
(
"left join org_division as od on od.id = om.division_id"
)
.
Joins
(
"left join org_season as os on os.id = om.season_id"
)
.
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
(
"omtp"
,
p
),
)
.
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
Count
(
count
)
.
Error
if
err
!=
nil
{
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatch
Evaluate
Service GetPage error:%s
\r\n
"
,
err
)
e
.
Log
.
Errorf
(
"OrgMatchService GetPage error:%s
\r\n
"
,
err
)
return
err
return
err
}
}
return
nil
return
nil
...
...
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