Commit 7606c505 authored by haoyanbin's avatar haoyanbin

Org club

parent 73645988
......@@ -159,12 +159,34 @@ func (e OrgMatch) GetInfo(c *gin.Context) {
return
}
sOrgClubUser := service.OrgClubUser{}
e.MakeContext(c).MakeOrm().MakeService(&sOrgClubUser.Service)
_, clubId := sOrgClubUser.GetClubId(user.GetUserId(c))
sOrgClub := service.OrgClub{}
var objectOrgClub models.OrgClub
err = e.MakeContext(c).MakeOrm().MakeService(&sOrgClub.Service).Errors
if clubId != "" {
reqOrgClub := dto.OrgClubGetReq{}
reqOrgClub.Id, _ = strconv.Atoi(clubId)
err = sOrgClub.Get(&reqOrgClub, p, &objectOrgClub)
if err != nil {
e.Error(500, err, fmt.Sprintf("获取联赛 失败,\r\n失败信息 %s", err.Error()))
return
}
}
reply := dto.OrgMatchGetInfoReply{
OrgMatch: match,
OrgLeagueList: listOrgLeague,
OrgSeasonList: listOrgSeason,
OrgDivisionList: listOrgDivision,
OrgTeamList: listOrgTeam,
OrgClub: objectOrgClub,
}
e.OK(reply, "查询成功")
......
......@@ -45,6 +45,7 @@ type OrgMatchGetInfoReply struct {
OrgSeasonList []OrgSeasonGetPageReply `form:"orgSeasonList"`
OrgDivisionList []models.OrgDivision `form:"orgDivisionList"`
OrgTeamList []OrgTeamGetPageReply `form:"orgTeamList"`
OrgClub models.OrgClub `form:"orgClub"`
}
type OrgMatchOrder struct {
......
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