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
c00a1323
Commit
c00a1323
authored
Jan 20, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msg
parent
70e23168
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
186 additions
and
104 deletions
+186
-104
org_player_user.go
app/mobile/apis/org_player_user.go
+7
-2
org_match_evaluate.go
app/operate/apis/org_match_evaluate.go
+75
-12
org_match_evaluate.go
app/operate/service/dto/org_match_evaluate.go
+15
-19
org_match_evaluate.go
app/operate/service/org_match_evaluate.go
+40
-23
org_match_evaluate_wonderful.go
app/operate/service/org_match_evaluate_wonderful.go
+25
-27
match.go
common/dto/match.go
+24
-21
No files found.
app/mobile/apis/org_player_user.go
View file @
c00a1323
...
...
@@ -70,10 +70,15 @@ func (e OrgPlayerUser) GetMsg(c *gin.Context) {
smsText
:=
"您的验证码为:"
+
code
if
result
:=
utils
.
SendMobileMsg
(
req
.
Username
,
smsText
);
result
.
Status
==
0
{
reply
:=
new
(
dto
.
GetMsgReply
)
e
.
OK
(
reply
,
"发送成功"
)
return
}
else
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
"发送失败"
)
return
}
reply
:=
new
(
dto
.
GetMsgReply
)
e
.
OK
(
reply
,
"查询成功"
)
}
// GetPage 获取球员账户信息列表
...
...
app/operate/apis/org_match_evaluate.go
View file @
c00a1323
...
...
@@ -83,13 +83,29 @@ func (e OrgMatchEvaluate) GetPageMatch(c *gin.Context) {
reply
:=
new
(
dto
.
GetPageMatchReply
)
replyGetMatchInfo
:=
new
(
cDto
.
PageMatchInfo
)
err
=
s
.
GetMatchInfo
(
req
.
Id
,
p
,
replyGetMatchInfo
)
err
=
s
.
GetMatchInfo
(
strconv
.
Itoa
(
req
.
Id
)
,
p
,
replyGetMatchInfo
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
reply
.
MatchInfo
=
*
replyGetMatchInfo
imgList
:=
make
([]
cDto
.
Wonderful
,
0
)
err
=
s
.
GetPageWonderful
(
replyGetMatchInfo
.
EvaluateId
,
&
imgList
,
1
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
reply
.
MatchImg
=
imgList
mvList
:=
make
([]
cDto
.
Wonderful
,
0
)
err
=
s
.
GetPageWonderful
(
replyGetMatchInfo
.
EvaluateId
,
&
imgList
,
2
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
reply
.
MatchMv
=
mvList
replyGetRoundsScoring
:=
make
([]
cDto
.
RoundsScoring
,
0
)
err
=
s
.
GetRoundsScoring
(
replyGetMatchInfo
.
PlayerId
,
replyGetMatchInfo
.
Rounds
,
"0"
,
&
replyGetRoundsScoring
)
if
err
!=
nil
{
...
...
@@ -181,25 +197,72 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
,
playerId
:=
s
.
IsBeing
(
req
.
MatchId
,
req
.
Rounds
,
req
.
PlayerId
)
eId
:=
0
if
playerId
==
0
{
reqInsertData
:=
dto
.
OrgMatchEvaluateInsertReq
{
MatchId
:
req
.
MatchId
,
Rounds
:
req
.
Rounds
,
PlayerId
:
req
.
PlayerId
,
WonderfulMomentImg
:
req
.
WonderfulMomentImg
,
WonderfulMomentMv
:
req
.
WonderfulMomentMv
,
WonderfulMomentImgTitle
:
req
.
WonderfulMomentImgTitle
,
WonderfulMomentMvTitle
:
req
.
WonderfulMomentMvTitle
,
MvStatus
:
req
.
MvStatus
,
Status
:
req
.
Status
,
MatchId
:
req
.
MatchId
,
Rounds
:
req
.
Rounds
,
PlayerId
:
req
.
PlayerId
,
MvStatus
:
req
.
MvStatus
,
Status
:
req
.
Status
,
}
err
=
s
.
Insert
(
&
reqInsertData
)
err
,
eId
=
s
.
Insert
(
&
reqInsertData
)
}
else
{
err
=
s
.
Update
(
&
req
,
p
)
err
,
eId
=
s
.
Update
(
&
req
,
p
)
}
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"修改比赛球员信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
reqWonderfulInsert
:=
dto
.
OrgMatchEvaluateWonderfulInsertReq
{}
reqWonderfulUpdate
:=
dto
.
OrgMatchEvaluateWonderfulUpdateReq
{}
sWonderful
:=
service
.
OrgMatchEvaluateWonderful
{}
err
=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sWonderful
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
for
_
,
v
:=
range
req
.
MatchImg
{
if
v
.
Id
!=
""
{
reqWonderfulUpdate
.
Id
,
_
=
strconv
.
Atoi
(
v
.
Id
)
reqWonderfulUpdate
.
WonderfulUrl
=
v
.
WonderfulUrl
reqWonderfulUpdate
.
WonderfulTitle
=
v
.
WonderfulTitle
reqWonderfulUpdate
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Update
(
&
reqWonderfulUpdate
)
}
else
{
reqWonderfulInsert
.
Type
=
"1"
reqWonderfulInsert
.
MatchEvaluateId
=
strconv
.
Itoa
(
eId
)
reqWonderfulInsert
.
WonderfulUrl
=
v
.
WonderfulUrl
reqWonderfulInsert
.
WonderfulTitle
=
v
.
WonderfulTitle
reqWonderfulInsert
.
SetCreateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Insert
(
&
reqWonderfulInsert
)
}
}
for
_
,
vMv
:=
range
req
.
MatchMv
{
if
vMv
.
Id
!=
""
{
reqWonderfulUpdate
.
Id
,
_
=
strconv
.
Atoi
(
vMv
.
Id
)
reqWonderfulUpdate
.
WonderfulUrl
=
vMv
.
WonderfulUrl
reqWonderfulUpdate
.
WonderfulTitle
=
vMv
.
WonderfulTitle
reqWonderfulUpdate
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Update
(
&
reqWonderfulUpdate
)
}
else
{
reqWonderfulInsert
.
Type
=
"1"
reqWonderfulInsert
.
MatchEvaluateId
=
strconv
.
Itoa
(
eId
)
reqWonderfulInsert
.
WonderfulUrl
=
vMv
.
WonderfulUrl
reqWonderfulInsert
.
WonderfulTitle
=
vMv
.
WonderfulTitle
reqWonderfulInsert
.
SetCreateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Insert
(
&
reqWonderfulInsert
)
}
}
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
app/operate/service/dto/org_match_evaluate.go
View file @
c00a1323
...
...
@@ -35,10 +35,12 @@ type OrgMatchEvaluateGetPageReply struct {
}
type
GetPageMatchReq
struct
{
Id
string
`form:"id" json:"id"`
Id
int
`form:"id" json:"id"`
}
type
GetPageMatchReply
struct
{
MatchInfo
dto
.
PageMatchInfo
`json:"matchInfo"`
MatchImg
[]
dto
.
Wonderful
`json:"matchImg"`
MatchMv
[]
dto
.
Wonderful
`json:"matchMv"`
TotalScoring
[]
dto
.
TotalScoring
`json:"totalScoring"`
RoundsScoring
[]
dto
.
RoundsScoring
`json:"roundsScoring"`
}
...
...
@@ -88,21 +90,19 @@ func (s *OrgMatchEvaluateInsertReq) GetId() interface{} {
}
type
OrgMatchEvaluateUpdateReq
struct
{
Id
int
`uri:"id" comment:""`
//
MatchId
string
`json:"matchId" comment:""`
Rounds
string
`json:"rounds" comment:""`
TeamUserId
string
`json:"teamUserId" comment:"org_team_user表id(教练id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
Content
string
`json:"content" comment:"教练评价内容"`
ContentStatus
string
`json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" comment:"精彩时刻图"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" comment:"精彩时刻视频"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" 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:"驳回原因"`
Id
int
`uri:"id" comment:""`
//
MatchId
string
`json:"matchId" comment:""`
Rounds
string
`json:"rounds" comment:""`
TeamUserId
string
`json:"teamUserId" comment:"org_team_user表id(教练id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
Content
string
`json:"content" comment:"教练评价内容"`
ContentStatus
string
`json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
MvStatus
string
`json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
Remark
string
`json:"remark" comment:"驳回原因"`
common
.
ControlBy
MatchImg
[]
dto
.
Wonderful
`json:"matchImg"`
MatchMv
[]
dto
.
Wonderful
`json:"matchMv"`
}
func
(
s
*
OrgMatchEvaluateUpdateReq
)
Generate
(
model
*
models
.
OrgMatchEvaluate
)
{
...
...
@@ -115,10 +115,6 @@ func (s *OrgMatchEvaluateUpdateReq) Generate(model *models.OrgMatchEvaluate) {
model
.
PlayerId
=
s
.
PlayerId
model
.
Content
=
s
.
Content
model
.
ContentStatus
=
s
.
ContentStatus
model
.
WonderfulMomentImg
=
s
.
WonderfulMomentImg
model
.
WonderfulMomentMv
=
s
.
WonderfulMomentMv
model
.
WonderfulMomentImgTitle
=
s
.
WonderfulMomentImgTitle
model
.
WonderfulMomentMvTitle
=
s
.
WonderfulMomentMvTitle
model
.
MvStatus
=
s
.
MvStatus
model
.
Status
=
s
.
Status
model
.
Remark
=
s
.
Remark
...
...
app/operate/service/org_match_evaluate.go
View file @
c00a1323
...
...
@@ -50,8 +50,9 @@ func (e *OrgMatchEvaluate) GetMatchInfo(id string, p *actions.DataPermission, da
err
=
e
.
Orm
.
Table
(
"org_match_team_player as omtp"
)
.
Select
(
"omtp.id, omtp.match_id, omtp.team_id, ol.league_name, od.division_name, os.season_name, om.rounds,"
+
"oc.club_name, ot.team_name, omtp.player_name, omtp.player_number, omtp.position,"
+
"omtp.player_id, om.season_id,"
+
"om
e.id as evaluate_id, om
tp.player_id, om.season_id,"
+
"ota.team_name as team_a_name, otb.team_name as team_b_name"
)
.
Joins
(
"left join org_match_evaluate as ome on omtp.match_id = ome.match_id and omtp.rounds=ome.rounds"
)
.
Joins
(
"left join org_club as oc on omtp.club_id = oc.id"
)
.
Joins
(
"left join org_team as ot on omtp.team_id = ot.id"
)
.
Joins
(
"left join org_match as om on omtp.match_id = om.id and omtp.rounds = om.rounds"
)
.
...
...
@@ -63,7 +64,8 @@ func (e *OrgMatchEvaluate) GetMatchInfo(id string, p *actions.DataPermission, da
Scopes
(
actions
.
Permission
(
"omtp"
,
p
),
)
.
First
(
data
,
id
)
.
Error
Where
(
"omtp.id=?"
,
id
)
.
First
(
data
)
.
Error
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchService GetMatchInfo error:%s
\r\n
"
,
err
)
return
err
...
...
@@ -71,24 +73,17 @@ func (e *OrgMatchEvaluate) GetMatchInfo(id string, p *actions.DataPermission, da
return
nil
}
func
(
e
*
OrgMatchEvaluate
)
GetPageWonderful
(
c
*
dto
.
OrgMatchEvaluateGetPageReq
,
p
*
actions
.
DataPermission
,
list
*
[]
dto
.
OrgMatchEvaluateGetPageReply
,
count
*
int64
)
error
{
func
(
e
*
OrgMatchEvaluate
)
GetPageWonderful
(
evaluateId
string
,
list
*
[]
cDto
.
Wonderful
,
wType
int
)
error
{
var
err
error
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.content_status, 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 and omtp.rounds = om.rounds"
)
.
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"
)
.
err
=
e
.
Orm
.
Table
(
"org_match_evaluate_wonderful as omew"
)
.
Select
(
"omew.id, omew.wonderful_url, omew.wonderful_title"
)
.
Scopes
(
cDto
.
MakeCondition
(
c
.
GetNeedSearch
()),
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
actions
.
Permission
(
"omtp"
,
p
),
cDto
.
PassDel
(
"omtp"
),
cDto
.
PassDel
(
"omew"
),
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
Where
(
"match_evaluate_id=?"
,
evaluateId
)
.
Where
(
"type=?"
,
wType
)
.
Find
(
list
)
.
Error
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchService GetPage error:%s
\r\n
"
,
err
)
return
err
...
...
@@ -347,20 +342,20 @@ func (e *OrgMatchEvaluate) Get(d *dto.OrgMatchEvaluateGetReq, p *actions.DataPer
}
// Insert 创建OrgMatchEvaluate对象
func
(
e
*
OrgMatchEvaluate
)
Insert
(
c
*
dto
.
OrgMatchEvaluateInsertReq
)
error
{
func
(
e
*
OrgMatchEvaluate
)
Insert
(
c
*
dto
.
OrgMatchEvaluateInsertReq
)
(
error
,
int
)
{
var
err
error
var
data
models
.
OrgMatchEvaluate
c
.
Generate
(
&
data
)
err
=
e
.
Orm
.
Create
(
&
data
)
.
Error
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchEvaluateService Insert error:%s
\r\n
"
,
err
)
return
err
return
err
,
0
}
return
nil
return
nil
,
data
.
Id
}
// Update 修改OrgMatchEvaluate对象
func
(
e
*
OrgMatchEvaluate
)
Update
(
c
*
dto
.
OrgMatchEvaluateUpdateReq
,
p
*
actions
.
DataPermission
)
error
{
func
(
e
*
OrgMatchEvaluate
)
Update
(
c
*
dto
.
OrgMatchEvaluateUpdateReq
,
p
*
actions
.
DataPermission
)
(
error
,
int
)
{
var
err
error
var
data
=
models
.
OrgMatchEvaluate
{}
e
.
Orm
.
Scopes
(
...
...
@@ -369,6 +364,8 @@ func (e *OrgMatchEvaluate) Update(c *dto.OrgMatchEvaluateUpdateReq, p *actions.D
cDto
.
SetWhere
(
""
,
"rounds"
,
c
.
Rounds
),
cDto
.
SetWhere
(
""
,
"player_id"
,
c
.
PlayerId
),
)
.
First
(
&
data
)
id
:=
data
.
Id
c
.
Generate
(
&
data
)
db
:=
e
.
Orm
.
Scopes
(
...
...
@@ -379,12 +376,13 @@ func (e *OrgMatchEvaluate) Update(c *dto.OrgMatchEvaluateUpdateReq, p *actions.D
)
.
Updates
(
&
data
)
if
db
.
Error
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchEvaluateService Save error:%s
\r\n
"
,
err
)
return
err
return
err
,
0
}
if
db
.
RowsAffected
==
0
{
return
errors
.
New
(
"无权更新该数据"
)
return
errors
.
New
(
"无权更新该数据"
)
,
0
}
return
nil
return
nil
,
id
}
// Remove 删除OrgMatchEvaluate
...
...
@@ -425,3 +423,22 @@ func (e *OrgMatchEvaluate) IsBeing(matchId string, rounds string, playerId strin
}
return
nil
,
data
.
Id
}
// Insert 创建OrgMatchTeamPlayer对象
func
(
e
*
OrgMatchEvaluate
)
WonderfulIsBeing
(
id
string
)
(
error
,
int
)
{
var
data
models
.
OrgMatchEvaluate
err
:=
e
.
Orm
.
Table
(
"org_match_evaluate_wonderful"
)
.
Where
(
"id=?"
,
id
)
.
First
(
&
data
)
.
Error
if
err
!=
nil
&&
errors
.
Is
(
err
,
gorm
.
ErrRecordNotFound
)
{
err
=
errors
.
New
(
"查看对象不存在或无权查看"
)
e
.
Log
.
Errorf
(
"Service GetOrgMatchTeamPlayer error:%s
\r\n
"
,
err
)
return
err
,
0
}
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"db error:%s"
,
err
)
return
err
,
0
}
return
nil
,
data
.
Id
}
app/operate/service/org_match_evaluate_wonderful.go
View file @
c00a1323
...
...
@@ -3,7 +3,7 @@ package service
import
(
"errors"
"github.com/go-admin-team/go-admin-core/sdk/service"
"github.com/go-admin-team/go-admin-core/sdk/service"
"gorm.io/gorm"
"go-admin/app/operate/models"
...
...
@@ -59,9 +59,9 @@ func (e *OrgMatchEvaluateWonderful) Get(d *dto.OrgMatchEvaluateWonderfulGetReq,
// Insert 创建OrgMatchEvaluateWonderful对象
func
(
e
*
OrgMatchEvaluateWonderful
)
Insert
(
c
*
dto
.
OrgMatchEvaluateWonderfulInsertReq
)
error
{
var
err
error
var
data
models
.
OrgMatchEvaluateWonderful
c
.
Generate
(
&
data
)
var
err
error
var
data
models
.
OrgMatchEvaluateWonderful
c
.
Generate
(
&
data
)
err
=
e
.
Orm
.
Create
(
&
data
)
.
Error
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchEvaluateWonderfulService Insert error:%s
\r\n
"
,
err
)
...
...
@@ -71,23 +71,21 @@ func (e *OrgMatchEvaluateWonderful) Insert(c *dto.OrgMatchEvaluateWonderfulInser
}
// Update 修改OrgMatchEvaluateWonderful对象
func
(
e
*
OrgMatchEvaluateWonderful
)
Update
(
c
*
dto
.
OrgMatchEvaluateWonderfulUpdateReq
,
p
*
actions
.
DataPermission
)
error
{
var
err
error
var
data
=
models
.
OrgMatchEvaluateWonderful
{}
e
.
Orm
.
Scopes
(
actions
.
Permission
(
data
.
TableName
(),
p
),
)
.
First
(
&
data
,
c
.
GetId
())
c
.
Generate
(
&
data
)
func
(
e
*
OrgMatchEvaluateWonderful
)
Update
(
c
*
dto
.
OrgMatchEvaluateWonderfulUpdateReq
)
error
{
var
err
error
var
data
=
models
.
OrgMatchEvaluateWonderful
{}
e
.
Orm
.
First
(
&
data
,
c
.
GetId
())
c
.
Generate
(
&
data
)
db
:=
e
.
Orm
.
Save
(
&
data
)
if
db
.
Error
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchEvaluateWonderfulService Save error:%s
\r\n
"
,
err
)
return
err
}
if
db
.
RowsAffected
==
0
{
return
errors
.
New
(
"无权更新该数据"
)
}
return
nil
db
:=
e
.
Orm
.
Updates
(
&
data
)
if
db
.
Error
!=
nil
{
e
.
Log
.
Errorf
(
"OrgMatchEvaluateWonderfulService Save error:%s
\r\n
"
,
err
)
return
err
}
if
db
.
RowsAffected
==
0
{
return
errors
.
New
(
"无权更新该数据"
)
}
return
nil
}
// Remove 删除OrgMatchEvaluateWonderful
...
...
@@ -99,11 +97,11 @@ func (e *OrgMatchEvaluateWonderful) Remove(d *dto.OrgMatchEvaluateWonderfulDelet
actions
.
Permission
(
data
.
TableName
(),
p
),
)
.
Delete
(
&
data
,
d
.
GetId
())
if
err
:=
db
.
Error
;
err
!=
nil
{
e
.
Log
.
Errorf
(
"Service RemoveOrgMatchEvaluateWonderful error:%s
\r\n
"
,
err
)
return
err
}
if
db
.
RowsAffected
==
0
{
return
errors
.
New
(
"无权删除该数据"
)
}
e
.
Log
.
Errorf
(
"Service RemoveOrgMatchEvaluateWonderful error:%s
\r\n
"
,
err
)
return
err
}
if
db
.
RowsAffected
==
0
{
return
errors
.
New
(
"无权删除该数据"
)
}
return
nil
}
\ No newline at end of file
}
common/dto/match.go
View file @
c00a1323
...
...
@@ -3,27 +3,30 @@ package dto
import
"gorm.io/gorm"
type
PageMatchInfo
struct
{
Id
string
`json:"id"`
MatchId
string
`json:"matchId"`
LeagueName
string
`json:"leagueName"`
DivisionName
string
`json:"divisionName"`
SeasonId
string
`json:"seasonId"`
SeasonName
string
`json:"seasonName"`
Rounds
string
`json:"rounds"`
ClubName
string
`json:"clubName"`
TeamId
string
`json:"teamId"`
TeamName
string
`json:"teamName"`
PlayerId
string
`json:"playerId"`
PlayerName
string
`json:"playerName"`
PlayerNumber
string
`json:"playerNumber"`
Position
string
`json:"position"`
Content
string
`json:"content"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" comment:"精彩时刻图"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" comment:"精彩时刻视频"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" comment:"精彩时刻图标题"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" comment:"精彩时刻视频标题"`
TeamAName
string
`json:"team_a_name" comment:"a队名"`
TeamBName
string
`json:"team_b_name" comment:"b队名"`
Id
string
`json:"id"`
MatchId
string
`json:"matchId"`
LeagueName
string
`json:"leagueName"`
DivisionName
string
`json:"divisionName"`
SeasonId
string
`json:"seasonId"`
SeasonName
string
`json:"seasonName"`
Rounds
string
`json:"rounds"`
ClubName
string
`json:"clubName"`
TeamId
string
`json:"teamId"`
TeamName
string
`json:"teamName"`
PlayerId
string
`json:"playerId"`
PlayerName
string
`json:"playerName"`
PlayerNumber
string
`json:"playerNumber"`
Position
string
`json:"position"`
Content
string
`json:"content"`
EvaluateId
string
`json:"evaluateId" comment:"精彩时刻id"`
TeamAName
string
`json:"team_a_name" comment:"a队名"`
TeamBName
string
`json:"team_b_name" comment:"b队名"`
}
type
Wonderful
struct
{
Id
string
`json:"精彩时刻id"`
WonderfulUrl
string
`json:"wonderfulUrl" comment:"精彩时刻url"`
WonderfulTitle
string
`json:"wonderfulTitle" comment:"精彩时刻标题"`
}
type
TotalScoring
struct
{
...
...
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