1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
package dto
import (
"go-admin/app/operate/models"
"go-admin/common/dto"
common "go-admin/common/models"
"time"
)
type OrgMatchGetPageReq struct {
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:om" comment:""`
Grouping string `form:"grouping" search:"type:exact;column:grouping;table:om" comment:""`
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:"比赛开始时间"`
MatchEndTime string `form:"matchEndTime" search:"type:lte;column:match_end_time;table:om" comment:"比赛结束时间"`
}
type OrgMatchGetPageReply struct {
Id string `json:"id"`
LeagueName string `json:"leagueName"`
DivisionName string `json:"divisionName"`
SeasonName string `json:"seasonName"`
Rounds string `json:"rounds"`
Grouping string `json:"grouping"`
TeamAName string `json:"team_a_name"`
TeamBName string `json:"team_b_name"`
TeamAId string `json:"teamAId"`
TeamBId string `json:"teamBId"`
MatchStartTime time.Time `json:"matchStartTime"`
MatchEndTime time.Time `json:"matchEndTime"`
Status string `json:"status"`
}
type OrgMatchGetInfoReq struct {
Id int `form:"id" json:"id"`
}
type OrgMatchGetInfoReply struct {
OrgMatch models.OrgMatch `form:"orgMatch"`
OrgLeagueList []models.OrgLeague `form:"orgLeagueList"`
OrgSeasonList []OrgSeasonGetPageReply `form:"orgSeasonList"`
OrgDivisionList []models.OrgDivision `form:"orgDivisionList"`
OrgTeamList []OrgTeamGetPageReply `form:"orgTeamList"`
}
type OrgMatchOrder struct {
Id int `form:"idOrder" search:"type:order;column:id;table:org_match"`
LeagueId string `form:"leagueIdOrder" search:"type:order;column:league_id;table:org_match"`
DivisionId string `form:"divisionIdOrder" search:"type:order;column:division_id;table:org_match"`
SeasonId string `form:"seasonIdOrder" search:"type:order;column:season_id;table:org_match"`
ClubId string `form:"clubIdOrder" search:"type:order;column:club_id;table:org_match"`
TeamId string `form:"teamIdOrder" search:"type:order;column:team_id;table:org_match"`
Status string `form:"statusOrder" search:"type:order;column:status;table:org_match"`
Rounds string `form:"roundsOrder" search:"type:order;column:rounds;table:org_match"`
Grouping string `form:"groupingOrder" search:"type:order;column:grouping;table:org_match"`
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"`
TeamAId string `form:"teamAIdOrder" search:"type:order;column:team_a_id;table:org_match"`
TeamBId string `form:"teamBIdOrder" search:"type:order;column:team_b_id;table:org_match"`
TeamAScore string `form:"teamAScoreOrder" search:"type:order;column:team_a_score;table:org_match"`
TeamBScore string `form:"teamBScoreOrder" search:"type:order;column:team_b_score;table:org_match"`
TeamAIntegral string `form:"teamAIntegralOrder" search:"type:order;column:team_a_integral;table:org_match"`
TeamBIntegral string `form:"teamBIntegralOrder" search:"type:order;column:team_b_integral;table:org_match"`
CreateBy string `form:"createByOrder" search:"type:order;column:create_by;table:org_match"`
UpdateBy string `form:"updateByOrder" search:"type:order;column:update_by;table:org_match"`
CreatedAt time.Time `form:"createdAtOrder" search:"type:order;column:created_at;table:org_match"`
UpdatedAt time.Time `form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_match"`
DeletedAt time.Time `form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_match"`
}
func (m *OrgMatchGetPageReq) GetNeedSearch() interface{} {
return *m
}
type OrgMatchInsertReq struct {
Id int `json:"-" comment:""` //
LeagueId string `json:"leagueId" comment:""`
DivisionId string `json:"divisionId" comment:""`
SeasonId string `json:"seasonId" comment:""`
ClubId string `json:"clubId" comment:""`
TeamId string `json:"teamId" comment:""`
Status string `json:"status" comment:"比赛状态 1 未开始 2 比赛中 3 已结束"`
Rounds string `json:"rounds" comment:"轮次"`
Grouping string `json:"grouping" comment:"分组"`
MatchStartTime string `json:"matchStartTime" comment:"比赛开始时间"`
MatchEndTime string `json:"matchEndTime" comment:"比赛结束时间"`
TeamAId string `json:"teamAId" comment:"a队id"`
TeamBId string `json:"teamBId" comment:"b队id"`
TeamAScore string `json:"teamAScore" comment:"a队比分"`
TeamBScore string `json:"teamBScore" comment:"b队比分"`
TeamAIntegral string `json:"teamAIntegral" comment:"a队积分"`
TeamBIntegral string `json:"teamBIntegral" comment:"a队积分"`
common.ControlBy
}
func (s *OrgMatchInsertReq) Generate(model *models.OrgMatch) {
if s.Id == 0 {
model.Model = common.Model{Id: s.Id}
}
model.LeagueId = s.LeagueId
model.DivisionId = s.DivisionId
model.SeasonId = s.SeasonId
model.ClubId = s.ClubId
model.TeamId = s.TeamId
model.Status = s.Status
model.Rounds = s.Rounds
model.Grouping = s.Grouping
model.MatchStartTime, _ = time.Parse("2006-01-02 15:04:05", s.MatchStartTime)
model.MatchEndTime, _ = time.Parse("2006-01-02 15:04:05", s.MatchEndTime)
model.TeamAId = s.TeamAId
model.TeamBId = s.TeamBId
model.TeamAScore = s.TeamAScore
model.TeamBScore = s.TeamBScore
model.TeamAIntegral = s.TeamAIntegral
model.TeamBIntegral = s.TeamBIntegral
}
func (s *OrgMatchInsertReq) GetId() interface{} {
return s.Id
}
type OrgMatchUpdateReq struct {
Id int `uri:"id" comment:""` //
LeagueId string `json:"leagueId" comment:""`
DivisionId string `json:"divisionId" comment:""`
SeasonId string `json:"seasonId" comment:""`
ClubId string `json:"clubId" comment:""`
TeamId string `json:"teamId" comment:""`
Status string `json:"status" comment:"比赛状态 1 未开始 2 比赛中 3 已结束"`
Rounds string `json:"rounds" comment:"轮次"`
Grouping string `json:"grouping" comment:"分组"`
MatchStartTime string `json:"matchStartTime" comment:"比赛开始时间"`
MatchEndTime string `json:"matchEndTime" comment:"比赛结束时间"`
TeamAId string `json:"teamAId" comment:"a队id"`
TeamBId string `json:"teamBId" comment:"b队id"`
TeamAScore string `json:"teamAScore" comment:"a队比分"`
TeamBScore string `json:"teamBScore" comment:"b队比分"`
TeamAIntegral string `json:"teamAIntegral" comment:"a队积分"`
TeamBIntegral string `json:"teamBIntegral" comment:"a队积分"`
common.ControlBy
}
func (s *OrgMatchUpdateReq) Generate(model *models.OrgMatch) {
if s.Id == 0 {
model.Model = common.Model{Id: s.Id}
}
model.LeagueId = s.LeagueId
model.DivisionId = s.DivisionId
model.SeasonId = s.SeasonId
model.ClubId = s.ClubId
model.TeamId = s.TeamId
model.Status = s.Status
model.Rounds = s.Rounds
model.Grouping = s.Grouping
model.MatchStartTime, _ = time.Parse("2006-01-02 15:04:05", s.MatchStartTime)
model.MatchEndTime, _ = time.Parse("2006-01-02 15:04:05", s.MatchEndTime)
model.TeamAId = s.TeamAId
model.TeamBId = s.TeamBId
model.TeamAScore = s.TeamAScore
model.TeamBScore = s.TeamBScore
model.TeamAIntegral = s.TeamAIntegral
model.TeamBIntegral = s.TeamBIntegral
}
func (s *OrgMatchUpdateReq) GetId() interface{} {
return s.Id
}
// OrgMatchGetReq 功能获取请求参数
type OrgMatchGetReq struct {
Id int `uri:"id"`
}
type OrgMatchGetReply struct {
OrgMatch models.OrgMatch `form:"orgMatch" json:"orgMatch"`
OrgMatchTeamAPlayer []models.OrgMatchTeamPlayer `form:"orgMatchTeamAPlayer" json:"orgMatchTeamAPlayer"`
OrgMatchTeamBPlayer []models.OrgMatchTeamPlayer `form:"orgMatchTeamBPlayer" json:"orgMatchTeamBPlayer"`
}
func (s *OrgMatchGetReq) GetId() interface{} {
return s.Id
}
// OrgMatchDeleteReq 功能删除请求参数
type OrgMatchDeleteReq struct {
Ids []int `json:"ids"`
}
func (s *OrgMatchDeleteReq) GetId() interface{} {
return s.Ids
}