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
99d7680f
Commit
99d7680f
authored
Jan 17, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Player name
parent
326c2a76
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
983 additions
and
109 deletions
+983
-109
org_news.go
app/mobile/apis/org_news.go
+107
-0
org_player_rank.go
app/mobile/apis/org_player_rank.go
+54
-0
org_news.go
app/mobile/router/org_news.go
+23
-0
org_player_rank.go
app/mobile/router/org_player_rank.go
+22
-0
org_index.go
app/mobile/service/dto/org_index.go
+0
-30
org_news.go
app/mobile/service/dto/org_news.go
+61
-0
org_player_rank.go
app/mobile/service/dto/org_player_rank.go
+50
-0
org_news.go
app/mobile/service/org_news.go
+60
-0
org_player_rank.go
app/mobile/service/org_player_rank.go
+304
-0
org_player.go
app/operate/apis/org_player.go
+1
-0
org_news.go
app/operate/models/org_news.go
+12
-11
org_player.go
app/operate/models/org_player.go
+3
-2
org_news.go
app/operate/service/dto/org_news.go
+4
-14
org_player.go
app/operate/service/dto/org_player.go
+5
-3
org_team_user.go
app/operate/service/dto/org_team_user.go
+1
-1
org_ad.go
app/operate/service/org_ad.go
+1
-0
docs.go
docs/docs.go
+102
-16
swagger.json
docs/swagger.json
+102
-16
swagger.yaml
docs/swagger.yaml
+71
-16
No files found.
app/mobile/apis/org_
index
.go
→
app/mobile/apis/org_
news
.go
View file @
99d7680f
...
...
@@ -2,33 +2,36 @@ package apis
import
(
"fmt"
oDto
"go-admin/app/operate/service/dto"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/mobile/service"
"go-admin/app/mobile/service/dto"
"go-admin/app/operate/models"
"go-admin/app/operate/service"
"go-admin/app/operate/service/dto"
oService
"go-admin/app/operate/service"
"go-admin/common/actions"
)
type
Org
Index
struct
{
type
Org
News
struct
{
api
.
Api
}
// GetPage
首页
// @Summary
首页
// @Description
首页
// @Tags
联赛
// GetPage
获取新闻列表
// @Summary
获取新闻列表
// @Description
获取新闻列表
// @Tags
新闻
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgNewsGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /
api/v1/org-index
[get]
// @Router /
mobile/v1/org-news
[get]
// @Security Bearer
func
(
e
Org
Index
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
Org
League
GetPageReq
{}
s
:=
service
.
Org
League
{}
func
(
e
Org
News
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
Org
News
GetPageReq
{}
s
:=
service
.
Org
News
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
...
...
@@ -41,29 +44,46 @@ func (e OrgIndex) GetPage(c *gin.Context) {
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
models
.
OrgLeague
,
0
)
reqOrgAd
:=
oDto
.
OrgAdGetPageReq
{}
sOrgAd
:=
oService
.
OrgAd
{}
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sOrgAd
.
Service
)
reqOrgAd
.
Status
=
"1"
listOrgAd
:=
make
([]
models
.
OrgAd
,
0
)
var
countOrgAd
int64
err
=
sOrgAd
.
GetPage
(
&
reqOrgAd
,
p
,
&
listOrgAd
,
&
countOrgAd
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取广告 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
list
:=
make
([]
dto
.
OrgNews
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取
联赛
失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取
新闻
失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
var
reply
dto
.
OrgNewsGetPageReply
reply
.
OrgAd
=
listOrgAd
reply
.
OrgNews
=
list
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
e
.
PageOK
(
reply
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
// Get 获取
联赛
// @Summary 获取
联赛
// @Description 获取
联赛
// @Tags
联赛
// Get 获取
新闻
// @Summary 获取
新闻
// @Description 获取
新闻
// @Tags
新闻
// @Param id path string false "id"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-
index
/{id} [get]
// @Router /api/v1/org-
news
/{id} [get]
// @Security Bearer
func
(
e
Org
Index
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
Org
League
GetReq
{}
s
:=
service
.
Org
League
{}
func
(
e
Org
News
)
Get
(
c
*
gin
.
Context
)
{
req
:=
dto
.
Org
News
GetReq
{}
s
:=
service
.
Org
News
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
...
...
@@ -74,12 +94,12 @@ func (e OrgIndex) Get(c *gin.Context) {
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
var
object
models
.
Org
League
var
object
models
.
Org
News
p
:=
actions
.
GetPermissionFromContext
(
c
)
err
=
s
.
Get
(
&
req
,
p
,
&
object
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取
联赛
失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取
新闻
失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
...
...
app/mobile/apis/org_player_rank.go
0 → 100644
View file @
99d7680f
package
apis
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
_
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
"go-admin/app/mobile/service"
"go-admin/app/mobile/service/dto"
"go-admin/common/actions"
)
type
OrgPlayerRank
struct
{
api
.
Api
}
// GetPage <手机端>获取球员排名
// @Summary <手机端>获取球员排名
// @Description <手机端>获取球员排名
// @Tags <手机端>比赛排名
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgTeamPlayerGetPageReq true "data"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-player-rank [get]
// @Security Bearer
func
(
e
OrgPlayerRank
)
GetPage
(
c
*
gin
.
Context
)
{
req
:=
dto
.
OrgPlayerRankGetPageReq
{}
s
:=
service
.
OrgPlayerRank
{}
err
:=
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
Bind
(
&
req
)
.
MakeService
(
&
s
.
Service
)
.
Errors
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
dto
.
OrgPlayerRankGetPageReply
,
0
)
var
count
int64
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球队 失败,
\r\n
失败信息 %s"
,
err
.
Error
()))
return
}
e
.
PageOK
(
list
,
int
(
count
),
req
.
GetPageIndex
(),
req
.
GetPageSize
(),
"查询成功"
)
}
app/mobile/router/org_
index
.go
→
app/mobile/router/org_
news
.go
View file @
99d7680f
...
...
@@ -5,16 +5,17 @@ import (
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/mobile/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrg
Index
Router
)
routerCheckRole
=
append
(
routerCheckRole
,
registerOrg
News
Router
)
}
// registerOrg
League
Router
func
registerOrg
Index
Router
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
Org
Index
{}
r
:=
v1
.
Group
(
"/org-
index"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
// registerOrg
News
Router
func
registerOrg
News
Router
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
Org
News
{}
r
:=
v1
.
Group
(
"/org-
news"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
r
.
GET
(
"/:id"
,
api
.
Get
)
...
...
app/mobile/router/org_player_rank.go
0 → 100644
View file @
99d7680f
package
router
import
(
"github.com/gin-gonic/gin"
jwt
"github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
"go-admin/app/mobile/apis"
"go-admin/common/middleware"
)
func
init
()
{
routerCheckRole
=
append
(
routerCheckRole
,
registerOrgPlayerRankRouter
)
}
// registerOrgTeamPlayerRouter
func
registerOrgPlayerRankRouter
(
v1
*
gin
.
RouterGroup
,
authMiddleware
*
jwt
.
GinJWTMiddleware
)
{
api
:=
apis
.
OrgPlayerRank
{}
r
:=
v1
.
Group
(
"/org-player-rank"
)
.
Use
(
authMiddleware
.
MiddlewareFunc
())
.
Use
(
middleware
.
AuthCheckRole
())
{
r
.
GET
(
""
,
api
.
GetPage
)
}
}
app/mobile/service/dto/org_index.go
deleted
100644 → 0
View file @
326c2a76
package
dto
import
(
oModels
"go-admin/app/operate/models"
oDto
"go-admin/app/operate/service/dto"
"go-admin/common/dto"
)
type
OrgIndexGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
}
type
OrgIndexGetPageReply
struct
{
OrgAd
oModels
.
OrgAd
`json:"orgAd"`
OrgAd1
oDto
.
OrgAdGetReq
`json:"orgAd"`
OrgNews
[]
OrgNews
`json:"orgNews"`
}
type
OrgNews
struct
{
Id
int
`json:"id"`
}
// OrgLeagueGetReq 功能获取请求参数
type
OrgIndexGetReq
struct
{
Id
int
`uri:"id"`
}
func
(
s
*
OrgIndexGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
}
app/mobile/service/dto/org_news.go
0 → 100644
View file @
99d7680f
package
dto
import
(
oModels
"go-admin/app/operate/models"
"go-admin/common/dto"
)
type
OrgNewsGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
}
type
OrgNewsGetPageReply
struct
{
OrgAd
[]
oModels
.
OrgAd
`json:"orgAd"`
OrgNews
[]
OrgNews
`json:"orgNews"`
}
type
OrgNews
struct
{
Id
int
`json:"id"`
NewsImg
string
`json:"newsImg"`
NewsTitle
string
`json:"newsTitle"`
NewsContent
string
`json:"newsContent"`
CreatedAt
string
`json:"createdAt"`
CommentCount
string
`json:"commentCount"`
}
type
OrgNewsComment
struct
{
Id
int
`json:"id"`
NewsId
string
`json:"newsId"`
PlayerId
string
`json:"playerId"`
PlayerUserId
string
`json:"playerUserId"`
Comment
string
`json:"comment"`
Likes
string
`json:"likes"`
CreatedAt
string
`json:"createdAt"`
}
func
(
m
*
OrgNewsGetPageReq
)
GetNeedSearch
()
interface
{}
{
return
*
m
}
// OrgNewsGetReq 功能获取请求参数
type
OrgNewsGetReq
struct
{
Id
int
`uri:"id"`
}
type
OrgNewsGetReply
struct
{
OrgNews
OrgNews
`json:"orgNews"`
CommentList
[]
OrgNewsComment
`json:"commentList"`
}
func
(
s
*
OrgNewsGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
}
// OrgNewsDeleteReq 功能删除请求参数
type
OrgNewsDeleteReq
struct
{
Ids
[]
int
`json:"ids"`
}
func
(
s
*
OrgNewsDeleteReq
)
GetId
()
interface
{}
{
return
s
.
Ids
}
app/mobile/service/dto/org_player_rank.go
0 → 100644
View file @
99d7680f
package
dto
import
(
"go-admin/common/dto"
)
type
OrgPlayerRankGetPageReq
struct
{
dto
.
Pagination
`search:"-"`
LeagueId
string
`form:"leagueId" search:"type:exact;column:league_id;table:om" comment:"联赛级别id"`
//联赛级别id
TypeName
string
`form:"typeName" search:"type:exact;column:rounds;table:omtp" comment:"轮次"`
//轮次
}
type
OrgPlayerRankGetPageReply
struct
{
Id
string
`json:"id"`
Rank
string
`json:"rank"`
LeagueName
string
`json:"leagueName"`
TeamName
string
`json:"leagueName"`
PlayerName
string
`json:"playerName"`
PlayerNumber
string
`json:"playerNumber" comment:"球衣号码"`
PlayerImg
string
`json:"playerImg"`
Position
string
`json:"position" comment:"场上位置"`
dto
.
TotalScoring
}
type
GetPageMatchPlayerRankReq
struct
{
Id
string
`form:"id" json:"id"`
}
type
GetPageMatchPlayerRankReply
struct
{
MatchInfo
dto
.
PageMatchInfo
`json:"matchInfo"`
TotalScoring
[]
dto
.
TotalScoring
`json:"totalScoring"`
RoundsScoring
[]
dto
.
RoundsScoring
`json:"roundsScoring"`
}
func
(
m
*
OrgPlayerRankGetPageReq
)
GetNeedSearch
()
interface
{}
{
return
*
m
}
// OrgMatchEvaluateGetReq 功能获取请求参数
type
OrgTeamPlayerGetReq
struct
{
Id
int
`uri:"id"`
}
type
OrgTeamPlayerGetReply
struct
{
MatchInfo
dto
.
PageMatchInfo
`json:"matchInfo"`
RoundsScoring
[]
dto
.
RoundsScoring
`json:"roundsScoring"`
}
func
(
s
*
OrgTeamPlayerGetReq
)
GetId
()
interface
{}
{
return
s
.
Id
}
app/mobile/service/org_news.go
0 → 100644
View file @
99d7680f
package
service
import
(
"errors"
"github.com/go-admin-team/go-admin-core/sdk/service"
"gorm.io/gorm"
"go-admin/app/mobile/service/dto"
"go-admin/app/operate/models"
"go-admin/common/actions"
cDto
"go-admin/common/dto"
)
type
OrgNews
struct
{
service
.
Service
}
// GetPage 获取OrgNews列表
func
(
e
*
OrgNews
)
GetPage
(
c
*
dto
.
OrgNewsGetPageReq
,
p
*
actions
.
DataPermission
,
list
*
[]
dto
.
OrgNews
,
count
*
int64
)
error
{
var
err
error
var
data
models
.
OrgNews
err
=
e
.
Orm
.
Table
(
"org_news as on1"
)
.
Select
(
"on1.id, on1.news_title, on1.news_img, on1.created_at, onc.comment_count"
)
.
Joins
(
"left join (select count(id) as comment_count,news_id from org_news_comment group by news_id)onc on on1.id=onc.news_id"
)
.
Scopes
(
cDto
.
MakeCondition
(
c
.
GetNeedSearch
()),
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
actions
.
Permission
(
data
.
TableName
(),
p
),
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"OrgNewsService GetPage error:%s
\r\n
"
,
err
)
return
err
}
return
nil
}
// Get 获取OrgNews对象
func
(
e
*
OrgNews
)
Get
(
d
*
dto
.
OrgNewsGetReq
,
p
*
actions
.
DataPermission
,
model
*
models
.
OrgNews
)
error
{
var
data
models
.
OrgNews
err
:=
e
.
Orm
.
Model
(
&
data
)
.
Scopes
(
actions
.
Permission
(
data
.
TableName
(),
p
),
)
.
First
(
model
,
d
.
GetId
())
.
Error
if
err
!=
nil
&&
errors
.
Is
(
err
,
gorm
.
ErrRecordNotFound
)
{
err
=
errors
.
New
(
"查看对象不存在或无权查看"
)
e
.
Log
.
Errorf
(
"Service GetOrgNews error:%s
\r\n
"
,
err
)
return
err
}
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"db error:%s"
,
err
)
return
err
}
return
nil
}
app/mobile/service/org_player_rank.go
0 → 100644
View file @
99d7680f
This diff is collapsed.
Click to expand it.
app/operate/apis/org_player.go
View file @
99d7680f
...
...
@@ -23,6 +23,7 @@ type OrgPlayer struct {
// @Tags <球队>球员
// @Param pageSize query int false "页条数"
// @Param pageIndex query int false "页码"
// @Param data body dto.OrgPlayerGetPageReq true "body"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-player [get]
// @Security Bearer
...
...
app/operate/models/org_news.go
View file @
99d7680f
...
...
@@ -12,6 +12,7 @@ type OrgNews struct {
NewsName
string
`json:"newsName" gorm:"type:varchar(20);comment:NewsName"`
NewsTitle
string
`json:"newsTitle" gorm:"type:varchar(20);comment:NewsTitle"`
NewsContent
string
`json:"newsContent" gorm:"type:text;comment:NewsContent"`
NewsImg
string
`json:"newsImg" gorm:"type:varchar(255);comment:NewsImg"`
Status
string
`json:"status" gorm:"type:tinyint(1);comment:Status"`
models
.
ModelTime
models
.
ControlBy
...
...
app/operate/models/org_player.go
View file @
99d7680f
...
...
@@ -11,14 +11,15 @@ type OrgPlayer struct {
ClubId
string
`json:"clubId" gorm:"type:bigint(20);comment:org_club表id"`
TeamId
string
`json:"teamId" gorm:"type:bigint(20);comment:org_team表id"`
PlayerName
string
`json:"playerName" gorm:"type:varchar(60);comment:球员姓名"`
PlayerNameEn
string
`json:"playerNameEn" gorm:"type:varchar(60);comment:球员姓名"`
IdCard
string
`json:"idCard" gorm:"type:varchar(60);comment:身份证号"`
Sex
string
`json:"sex" gorm:"type:varchar(20);comment:性别"`
PlayerNumber
string
`json:"playerNumber" gorm:"type:varchar(20);comment:球衣号码"`
Position
string
`json:"position" gorm:"type:varchar(60);comment:场上位置"`
PlayerImg
string
`json:"playerImg" gorm:"type:varchar(255);comment:球员照片"`
PlayerUserId
string
`json:"playerUserId" gorm:"type:bigint(20);comment:org_player_user表id"`
ShareConf
string
`json:"shareConf" gorm:"type:tinyint(1);comment:分享功能 1 开启 2 关闭"`
Status
string
`json:"status" gorm:"type:tinyint(1);comment:状态 1 离队 2 在队"`
ShareConf
string
`json:"shareConf" gorm:"type:tinyint(1);comment:分享功能 1 开启 2 关闭"
default:"1"
`
Status
string
`json:"status" gorm:"type:tinyint(1);comment:状态 1 离队 2 在队"
default:"2"
`
models
.
ModelTime
models
.
ControlBy
}
...
...
app/operate/service/dto/org_news.go
View file @
99d7680f
...
...
@@ -4,7 +4,6 @@ import (
"go-admin/app/operate/models"
"go-admin/common/dto"
common
"go-admin/common/models"
"time"
)
type
OrgNewsGetPageReq
struct
{
...
...
@@ -15,19 +14,6 @@ type OrgNewsGetPageReq struct {
Status
string
`form:"status" search:"type:exact;column:status;table:org_news"`
//新闻状态
}
type
OrgNewsOrder
struct
{
Id
int
`form:"idOrder" search:"type:order;column:id;table:org_news"`
NewsName
string
`form:"newsNameOrder" search:"type:order;column:news_name;table:org_news"`
NewsTitle
string
`form:"newsTitleOrder" search:"type:order;column:news_title;table:org_news"`
NewsContent
string
`form:"newsContentOrder" search:"type:order;column:news_content;table:org_news"`
Status
string
`form:"statusOrder" search:"type:order;column:status;table:org_news"`
CreateBy
string
`form:"createByOrder" search:"type:order;column:create_by;table:org_news"`
UpdateBy
string
`form:"updateByOrder" search:"type:order;column:update_by;table:org_news"`
CreatedAt
time
.
Time
`form:"createdAtOrder" search:"type:order;column:created_at;table:org_news"`
UpdatedAt
time
.
Time
`form:"updatedAtOrder" search:"type:order;column:updated_at;table:org_news"`
DeletedAt
time
.
Time
`form:"deletedAtOrder" search:"type:order;column:deleted_at;table:org_news"`
}
func
(
m
*
OrgNewsGetPageReq
)
GetNeedSearch
()
interface
{}
{
return
*
m
}
...
...
@@ -37,6 +23,7 @@ type OrgNewsInsertReq struct {
NewsName
string
`json:"newsName" comment:""`
NewsTitle
string
`json:"newsTitle" comment:""`
NewsContent
string
`json:"newsContent" comment:""`
NewsImg
string
`json:"newsImg" comment:""`
Status
string
`json:"status" comment:""`
common
.
ControlBy
}
...
...
@@ -48,6 +35,7 @@ func (s *OrgNewsInsertReq) Generate(model *models.OrgNews) {
model
.
NewsName
=
s
.
NewsName
model
.
NewsTitle
=
s
.
NewsTitle
model
.
NewsContent
=
s
.
NewsContent
model
.
NewsImg
=
s
.
NewsImg
model
.
Status
=
s
.
Status
}
...
...
@@ -60,6 +48,7 @@ type OrgNewsUpdateReq struct {
NewsName
string
`json:"newsName" comment:""`
NewsTitle
string
`json:"newsTitle" comment:""`
NewsContent
string
`json:"newsContent" comment:""`
NewsImg
string
`json:"newsImg" comment:""`
Status
string
`json:"status" comment:""`
common
.
ControlBy
}
...
...
@@ -71,6 +60,7 @@ func (s *OrgNewsUpdateReq) Generate(model *models.OrgNews) {
model
.
NewsName
=
s
.
NewsName
model
.
NewsTitle
=
s
.
NewsTitle
model
.
NewsContent
=
s
.
NewsContent
model
.
NewsImg
=
s
.
NewsImg
model
.
Status
=
s
.
Status
}
...
...
app/operate/service/dto/org_player.go
View file @
99d7680f
...
...
@@ -63,7 +63,7 @@ type OrgPlayerInsertReq struct {
Position
string
`json:"position" comment:"场上位置"`
PlayerImg
string
`json:"playerImg" comment:"球员照片"`
PlayerUserId
string
`json:"playerUserId" comment:"org_player_user表id"`
ShareConf
string
`json:"shareConf" comment:"分享功能 1 开启 2 关闭"`
ShareConf
string
`json:"shareConf" comment:"分享功能 1 开启 2 关闭"
default:"1"
`
PlayerNameEn
string
`json:"playerNameEn" comment:"球员名称英文"`
Username
string
`json:"username" comment:"账号"`
common
.
ControlBy
...
...
@@ -76,6 +76,7 @@ func (s *OrgPlayerInsertReq) Generate(model *models.OrgPlayer) {
model
.
ClubId
=
s
.
ClubId
model
.
TeamId
=
s
.
TeamId
model
.
PlayerName
=
s
.
PlayerName
model
.
PlayerNameEn
=
s
.
PlayerNameEn
model
.
IdCard
=
s
.
IdCard
model
.
Sex
=
s
.
Sex
model
.
PlayerNumber
=
s
.
PlayerNumber
...
...
@@ -100,10 +101,10 @@ type OrgPlayerUpdateReq struct {
Position
string
`json:"position" comment:"场上位置"`
PlayerImg
string
`json:"playerImg" comment:"球员照片"`
PlayerUserId
string
`json:"playerUserId" comment:"org_player_user表id"`
ShareConf
string
`json:"shareConf" comment:"分享功能 1 开启 2 关闭"`
ShareConf
string
`json:"shareConf" comment:"分享功能 1 开启 2 关闭"
default:"1"
`
PlayerNameEn
string
`json:"playerNameEn" comment:"球员名称英文"`
Username
string
`json:"username" comment:"账号"`
Status
string
`json:"status" comment:"状态 1 离队 2 在队"`
//状态 1 离队 2 在队
Status
string
`json:"status" comment:"状态 1 离队 2 在队"
default:"2"
`
//状态 1 离队 2 在队
common
.
ControlBy
}
type
OrgPlayerUpdateStatusReq
struct
{
...
...
@@ -119,6 +120,7 @@ func (s *OrgPlayerUpdateReq) Generate(model *models.OrgPlayer) {
model
.
ClubId
=
s
.
ClubId
model
.
TeamId
=
s
.
TeamId
model
.
PlayerName
=
s
.
PlayerName
model
.
PlayerNameEn
=
s
.
PlayerNameEn
model
.
IdCard
=
s
.
IdCard
model
.
Sex
=
s
.
Sex
model
.
PlayerNumber
=
s
.
PlayerNumber
...
...
app/operate/service/dto/org_team_user.go
View file @
99d7680f
...
...
@@ -71,7 +71,7 @@ type OrgTeamUserUpdateReq struct {
UserImg
string
`json:"userImg" comment:"用户照片"`
SignImg
string
`json:"signImg" comment:"签名照片"`
UserName
string
`json:"userName" comment:"账号"`
Status
string
`json:"status" comment:"状态 1 离职 2 在职"`
//状态 1 离职 2 在职
Status
string
`json:"status" comment:"状态 1 离职 2 在职"
default:"2"
`
//状态 1 离职 2 在职
common
.
ControlBy
}
...
...
app/operate/service/org_ad.go
View file @
99d7680f
...
...
@@ -26,6 +26,7 @@ func (e *OrgAd) GetPage(c *dto.OrgAdGetPageReq, p *actions.DataPermission, list
cDto
.
MakeCondition
(
c
.
GetNeedSearch
()),
cDto
.
Paginate
(
c
.
GetPageSize
(),
c
.
GetPageIndex
()),
actions
.
Permission
(
data
.
TableName
(),
p
),
cDto
.
SetWhere
(
""
,
"status"
,
c
.
Status
),
)
.
Find
(
list
)
.
Limit
(
-
1
)
.
Offset
(
-
1
)
.
Count
(
count
)
.
Error
...
...
docs/docs.go
View file @
99d7680f
...
...
@@ -1984,11 +1984,11 @@ var doc = `{
"Bearer": []
}
],
"description": "获取联赛列表",
"description": "
\u003c赛事\u003e
获取联赛列表",
"tags": [
"联赛"
"
\u003c赛事\u003e
联赛"
],
"summary": "获取联赛列表",
"summary": "
\u003c赛事\u003e
获取联赛列表",
"parameters": [
{
"type": "integer",
...
...
@@ -2001,6 +2001,15 @@ var doc = `{
"description": "页码",
"name": "pageIndex",
"in": "query"
},
{
"description": "data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.OrgLeagueGetPageReq"
}
}
],
"responses": {
...
...
@@ -2018,14 +2027,14 @@ var doc = `{
"Bearer": []
}
],
"description": "创建联赛",
"description": "
\u003c赛事\u003e
创建联赛",
"consumes": [
"application/json"
],
"tags": [
"联赛"
"
\u003c赛事\u003e
联赛"
],
"summary": "创建联赛",
"summary": "
\u003c赛事\u003e
创建联赛",
"parameters": [
{
"description": "data",
...
...
@@ -2052,11 +2061,11 @@ var doc = `{
"Bearer": []
}
],
"description": "删除联赛",
"description": "
\u003c赛事\u003e
删除联赛",
"tags": [
"联赛"
"
\u003c赛事\u003e
联赛"
],
"summary": "删除联赛",
"summary": "
\u003c赛事\u003e
删除联赛",
"parameters": [
{
"description": "ids",
...
...
@@ -2087,11 +2096,11 @@ var doc = `{
"Bearer": []
}
],
"description": "获取联赛",
"description": "
\u003c赛事\u003e
获取联赛",
"tags": [
"联赛"
"
\u003c赛事\u003e
联赛"
],
"summary": "获取联赛",
"summary": "
\u003c赛事\u003e
获取联赛",
"parameters": [
{
"type": "string",
...
...
@@ -2115,14 +2124,14 @@ var doc = `{
"Bearer": []
}
],
"description": "修改联赛",
"description": "
\u003c赛事\u003e
修改联赛",
"consumes": [
"application/json"
],
"tags": [
"联赛"
"
\u003c赛事\u003e
联赛"
],
"summary": "修改联赛",
"summary": "
\u003c赛事\u003e
修改联赛",
"parameters": [
{
"description": "body",
...
...
@@ -3018,6 +3027,15 @@ var doc = `{
"description": "页码",
"name": "pageIndex",
"in": "query"
},
{
"description": "body",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.OrgPlayerGetPageReq"
}
}
],
"responses": {
...
...
@@ -6491,6 +6509,51 @@ var doc = `{
}
}
}
},
"/mobile/v1/org-news": {
"get": {
"security": [
{
"Bearer": []
}
],
"description": "获取新闻列表",
"tags": [
"新闻"
],
"summary": "获取新闻列表",
"parameters": [
{
"type": "integer",
"description": "页条数",
"name": "pageSize",
"in": "query"
},
{
"type": "integer",
"description": "页码",
"name": "pageIndex",
"in": "query"
},
{
"description": "data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.OrgNewsGetPageReq"
}
}
],
"responses": {
"200": {
"description": "{\"code\": 200, \"data\": [...]}",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
...
...
@@ -7378,6 +7441,29 @@ var doc = `{
}
}
},
"dto.OrgPlayerGetPageReq": {
"type": "object",
"properties": {
"pageIndex": {
"type": "integer"
},
"pageSize": {
"type": "integer"
},
"playerName": {
"type": "string"
},
"status": {
"type": "string"
},
"teamId": {
"type": "string"
},
"teamName": {
"type": "string"
}
}
},
"dto.OrgPlayerInsertReq": {
"type": "object",
"properties": {
...
...
@@ -7882,7 +7968,7 @@ var doc = `{
"userImg": {
"type": "string"
},
"user
N
ame": {
"user
n
ame": {
"type": "string"
}
}
...
...
docs/swagger.json
View file @
99d7680f
...
...
@@ -1967,11 +1967,11 @@
"Bearer"
:
[]
}
],
"description"
:
"获取联赛列表"
,
"description"
:
"
\u
003c赛事
\u
003e
获取联赛列表"
,
"tags"
:
[
"联赛"
"
\u
003c赛事
\u
003e
联赛"
],
"summary"
:
"获取联赛列表"
,
"summary"
:
"
\u
003c赛事
\u
003e
获取联赛列表"
,
"parameters"
:
[
{
"type"
:
"integer"
,
...
...
@@ -1984,6 +1984,15 @@
"description"
:
"页码"
,
"name"
:
"pageIndex"
,
"in"
:
"query"
},
{
"description"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/dto.OrgLeagueGetPageReq"
}
}
],
"responses"
:
{
...
...
@@ -2001,14 +2010,14 @@
"Bearer"
:
[]
}
],
"description"
:
"创建联赛"
,
"description"
:
"
\u
003c赛事
\u
003e
创建联赛"
,
"consumes"
:
[
"application/json"
],
"tags"
:
[
"联赛"
"
\u
003c赛事
\u
003e
联赛"
],
"summary"
:
"创建联赛"
,
"summary"
:
"
\u
003c赛事
\u
003e
创建联赛"
,
"parameters"
:
[
{
"description"
:
"data"
,
...
...
@@ -2035,11 +2044,11 @@
"Bearer"
:
[]
}
],
"description"
:
"删除联赛"
,
"description"
:
"
\u
003c赛事
\u
003e
删除联赛"
,
"tags"
:
[
"联赛"
"
\u
003c赛事
\u
003e
联赛"
],
"summary"
:
"删除联赛"
,
"summary"
:
"
\u
003c赛事
\u
003e
删除联赛"
,
"parameters"
:
[
{
"description"
:
"ids"
,
...
...
@@ -2070,11 +2079,11 @@
"Bearer"
:
[]
}
],
"description"
:
"获取联赛"
,
"description"
:
"
\u
003c赛事
\u
003e
获取联赛"
,
"tags"
:
[
"联赛"
"
\u
003c赛事
\u
003e
联赛"
],
"summary"
:
"获取联赛"
,
"summary"
:
"
\u
003c赛事
\u
003e
获取联赛"
,
"parameters"
:
[
{
"type"
:
"string"
,
...
...
@@ -2098,14 +2107,14 @@
"Bearer"
:
[]
}
],
"description"
:
"修改联赛"
,
"description"
:
"
\u
003c赛事
\u
003e
修改联赛"
,
"consumes"
:
[
"application/json"
],
"tags"
:
[
"联赛"
"
\u
003c赛事
\u
003e
联赛"
],
"summary"
:
"修改联赛"
,
"summary"
:
"
\u
003c赛事
\u
003e
修改联赛"
,
"parameters"
:
[
{
"description"
:
"body"
,
...
...
@@ -3001,6 +3010,15 @@
"description"
:
"页码"
,
"name"
:
"pageIndex"
,
"in"
:
"query"
},
{
"description"
:
"body"
,
"name"
:
"data"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/dto.OrgPlayerGetPageReq"
}
}
],
"responses"
:
{
...
...
@@ -6474,6 +6492,51 @@
}
}
}
},
"/mobile/v1/org-news"
:
{
"get"
:
{
"security"
:
[
{
"Bearer"
:
[]
}
],
"description"
:
"获取新闻列表"
,
"tags"
:
[
"新闻"
],
"summary"
:
"获取新闻列表"
,
"parameters"
:
[
{
"type"
:
"integer"
,
"description"
:
"页条数"
,
"name"
:
"pageSize"
,
"in"
:
"query"
},
{
"type"
:
"integer"
,
"description"
:
"页码"
,
"name"
:
"pageIndex"
,
"in"
:
"query"
},
{
"description"
:
"data"
,
"name"
:
"data"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/dto.OrgNewsGetPageReq"
}
}
],
"responses"
:
{
"200"
:
{
"description"
:
"{
\"
code
\"
: 200,
\"
data
\"
: [...]}"
,
"schema"
:
{
"type"
:
"string"
}
}
}
}
}
},
"definitions"
:
{
...
...
@@ -7361,6 +7424,29 @@
}
}
},
"dto.OrgPlayerGetPageReq"
:
{
"type"
:
"object"
,
"properties"
:
{
"pageIndex"
:
{
"type"
:
"integer"
},
"pageSize"
:
{
"type"
:
"integer"
},
"playerName"
:
{
"type"
:
"string"
},
"status"
:
{
"type"
:
"string"
},
"teamId"
:
{
"type"
:
"string"
},
"teamName"
:
{
"type"
:
"string"
}
}
},
"dto.OrgPlayerInsertReq"
:
{
"type"
:
"object"
,
"properties"
:
{
...
...
@@ -7865,7 +7951,7 @@
"userImg"
:
{
"type"
:
"string"
},
"user
N
ame"
:
{
"user
n
ame"
:
{
"type"
:
"string"
}
}
...
...
docs/swagger.yaml
View file @
99d7680f
...
...
@@ -588,6 +588,21 @@ definitions:
updateBy
:
type
:
integer
type
:
object
dto.OrgPlayerGetPageReq
:
properties
:
pageIndex
:
type
:
integer
pageSize
:
type
:
integer
playerName
:
type
:
string
status
:
type
:
string
teamId
:
type
:
string
teamName
:
type
:
string
type
:
object
dto.OrgPlayerInsertReq
:
properties
:
clubId
:
...
...
@@ -923,7 +938,7 @@ definitions:
type
:
string
userImg
:
type
:
string
user
N
ame
:
user
n
ame
:
type
:
string
type
:
object
dto.OrgTeamUserUpdateReq
:
...
...
@@ -3173,7 +3188,7 @@ paths:
-
<赛事>赛区
/api/v1/org-league
:
delete
:
description
:
删除联赛
description
:
<赛事>
删除联赛
parameters
:
-
description
:
ids
in
:
body
...
...
@@ -3189,11 +3204,11 @@ paths:
type
:
string
security
:
-
Bearer
:
[]
summary
:
删除联赛
summary
:
<赛事>
删除联赛
tags
:
-
联赛
-
<赛事>
联赛
get
:
description
:
获取联赛列表
description
:
<赛事>
获取联赛列表
parameters
:
-
description
:
页条数
in
:
query
...
...
@@ -3203,6 +3218,12 @@ paths:
in
:
query
name
:
pageIndex
type
:
integer
-
description
:
data
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/dto.OrgLeagueGetPageReq'
responses
:
"
200"
:
description
:
'
{"code":
200,
"data":
[...]}'
...
...
@@ -3210,13 +3231,13 @@ paths:
type
:
string
security
:
-
Bearer
:
[]
summary
:
获取联赛列表
summary
:
<赛事>
获取联赛列表
tags
:
-
联赛
-
<赛事>
联赛
post
:
consumes
:
-
application/json
description
:
创建联赛
description
:
<赛事>
创建联赛
parameters
:
-
description
:
data
in
:
body
...
...
@@ -3231,12 +3252,12 @@ paths:
type
:
string
security
:
-
Bearer
:
[]
summary
:
创建联赛
summary
:
<赛事>
创建联赛
tags
:
-
联赛
-
<赛事>
联赛
/api/v1/org-league/{id}
:
get
:
description
:
获取联赛
description
:
<赛事>
获取联赛
parameters
:
-
description
:
id
in
:
path
...
...
@@ -3249,13 +3270,13 @@ paths:
type
:
string
security
:
-
Bearer
:
[]
summary
:
获取联赛
summary
:
<赛事>
获取联赛
tags
:
-
联赛
-
<赛事>
联赛
put
:
consumes
:
-
application/json
description
:
修改联赛
description
:
<赛事>
修改联赛
parameters
:
-
description
:
body
in
:
body
...
...
@@ -3270,9 +3291,9 @@ paths:
type
:
string
security
:
-
Bearer
:
[]
summary
:
修改联赛
summary
:
<赛事>
修改联赛
tags
:
-
联赛
-
<赛事>
联赛
/api/v1/org-match
:
delete
:
description
:
<赛事>删除比赛
...
...
@@ -3826,6 +3847,12 @@ paths:
in
:
query
name
:
pageIndex
type
:
integer
-
description
:
body
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/dto.OrgPlayerGetPageReq'
responses
:
"
200"
:
description
:
'
{"code":
200,
"data":
[...]}'
...
...
@@ -5943,6 +5970,34 @@ paths:
security
:
-
Bearer
:
[]
summary
:
退出登录
/mobile/v1/org-news
:
get
:
description
:
获取新闻列表
parameters
:
-
description
:
页条数
in
:
query
name
:
pageSize
type
:
integer
-
description
:
页码
in
:
query
name
:
pageIndex
type
:
integer
-
description
:
data
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/dto.OrgNewsGetPageReq'
responses
:
"
200"
:
description
:
'
{"code":
200,
"data":
[...]}'
schema
:
type
:
string
security
:
-
Bearer
:
[]
summary
:
获取新闻列表
tags
:
-
新闻
securityDefinitions
:
Bearer
:
in
:
header
...
...
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