Commit b99b8b34 authored by haoyanbin's avatar haoyanbin

1

parent 110d5c47
...@@ -27,6 +27,13 @@ func (e OrgTeamMatchEvaluate) getTeamId(c *gin.Context) string { ...@@ -27,6 +27,13 @@ func (e OrgTeamMatchEvaluate) getTeamId(c *gin.Context) string {
return teamId return teamId
} }
func (e OrgTeamMatchEvaluate) getClubId(c *gin.Context) string {
sOrgTeamUser := service.OrgClubUser{}
e.MakeContext(c).MakeOrm().MakeService(&sOrgTeamUser.Service)
_, teamId := sOrgTeamUser.GetClubId(user.GetUserId(c))
return teamId
}
// GetPage <球队>教练评价列表 // GetPage <球队>教练评价列表
// @Summary <球队>教练评价列表 // @Summary <球队>教练评价列表
// @Description <球队>教练评价列表 // @Description <球队>教练评价列表
...@@ -55,6 +62,7 @@ func (e OrgTeamMatchEvaluate) GetPage(c *gin.Context) { ...@@ -55,6 +62,7 @@ func (e OrgTeamMatchEvaluate) GetPage(c *gin.Context) {
var count int64 var count int64
req.TeamId = e.getTeamId(c) req.TeamId = e.getTeamId(c)
req.ClubId = e.getClubId(c)
err = s.GetPage(&req, p, &list, &count) err = s.GetPage(&req, p, &list, &count)
if err != nil { if err != nil {
......
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
type OrgTeamMatchEvaluateGetPageReq struct { type OrgTeamMatchEvaluateGetPageReq struct {
dto.Pagination `search:"-"` dto.Pagination `search:"-"`
ClubId string `form:"clubId" search:"-"` //联赛级别id
TeamId string `form:"teamId" search:"-"` //联赛级别id TeamId string `form:"teamId" search:"-"` //联赛级别id
LeagueId string `form:"leagueId" search:"type:exact;column:league_id;table:om" comment:"联赛级别id"` //联赛级别id LeagueId string `form:"leagueId" search:"type:exact;column:league_id;table:om" comment:"联赛级别id"` //联赛级别id
DivisionId string `form:"divisionId" search:"type:exact;column:division_id;table:om" comment:"赛区id"` //赛区id DivisionId string `form:"divisionId" search:"type:exact;column:division_id;table:om" comment:"赛区id"` //赛区id
......
...@@ -37,9 +37,10 @@ func (e *OrgTeamMatchEvaluate) GetPage(c *dto.OrgTeamMatchEvaluateGetPageReq, p ...@@ -37,9 +37,10 @@ func (e *OrgTeamMatchEvaluate) GetPage(c *dto.OrgTeamMatchEvaluateGetPageReq, p
cDto.Paginate(c.GetPageSize(), c.GetPageIndex()), cDto.Paginate(c.GetPageSize(), c.GetPageIndex()),
actions.Permission("omtp", p), actions.Permission("omtp", p),
cDto.PassDel("omtp"), cDto.PassDel("omtp"),
cDto.SetWhere("omtp", "team_id", c.TeamId),
cDto.SetWhere("omtp", "club_id", c.ClubId),
). ).
Where("om.status=?", 3). Where("om.status=?", 3).
Where("omtp.team_id=?", c.TeamId).
Find(list).Limit(-1).Offset(-1). Find(list).Limit(-1).Offset(-1).
Count(count).Error Count(count).Error
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment