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
d40ef1a2
Commit
d40ef1a2
authored
Jan 27, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7816ca8f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
18 deletions
+61
-18
org_team_match_evaluate.go
app/operate/apis/org_team_match_evaluate.go
+21
-0
org_match_evaluate.go
app/operate/models/org_match_evaluate.go
+2
-0
org_match_evaluate.go
app/operate/service/dto/org_match_evaluate.go
+19
-18
org_team_user.go
app/operate/service/dto/org_team_user.go
+4
-0
org_team_user.go
app/operate/service/org_team_user.go
+15
-0
No files found.
app/operate/apis/org_team_match_evaluate.go
View file @
d40ef1a2
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"fmt"
"fmt"
cDto
"go-admin/common/dto"
cDto
"go-admin/common/dto"
"strconv"
"strconv"
"time"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
"github.com/go-admin-team/go-admin-core/sdk/api"
...
@@ -193,6 +194,21 @@ func (e OrgTeamMatchEvaluate) Update(c *gin.Context) {
...
@@ -193,6 +194,21 @@ func (e OrgTeamMatchEvaluate) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
"数据有误"
)
e
.
Error
(
500
,
err
,
"数据有误"
)
return
return
}
}
userId
:=
user
.
GetUserId
(
c
)
sUser
:=
service
.
OrgTeamUser
{}
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
s
.
Service
)
err
,
userData
:=
sUser
.
GetTeamUser
(
userId
)
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
131
,
err
,
"账户信息有误"
)
return
}
timeObj
:=
time
.
Now
()
var
contentDate
=
timeObj
.
Format
(
"2006-01-02 03:04:05"
)
err
,
playerId
:=
s
.
IsBeing
(
req
.
MatchId
,
req
.
Rounds
,
req
.
PlayerId
)
err
,
playerId
:=
s
.
IsBeing
(
req
.
MatchId
,
req
.
Rounds
,
req
.
PlayerId
)
eId
:=
0
eId
:=
0
...
@@ -200,12 +216,17 @@ func (e OrgTeamMatchEvaluate) Update(c *gin.Context) {
...
@@ -200,12 +216,17 @@ func (e OrgTeamMatchEvaluate) Update(c *gin.Context) {
reqInsertData
:=
dto
.
OrgMatchEvaluateInsertReq
{
reqInsertData
:=
dto
.
OrgMatchEvaluateInsertReq
{
MatchId
:
req
.
MatchId
,
MatchId
:
req
.
MatchId
,
Rounds
:
req
.
Rounds
,
Rounds
:
req
.
Rounds
,
TeamUserId
:
strconv
.
Itoa
(
userId
),
PlayerId
:
req
.
PlayerId
,
PlayerId
:
req
.
PlayerId
,
Content
:
req
.
Content
,
Content
:
req
.
Content
,
ContentStatus
:
req
.
ContentStatus
,
ContentStatus
:
req
.
ContentStatus
,
ContentDate
:
contentDate
,
ContentImg
:
userData
.
SignImg
,
}
}
reqInsertData
.
CreateBy
=
userId
err
,
eId
=
s
.
Insert
(
&
reqInsertData
)
err
,
eId
=
s
.
Insert
(
&
reqInsertData
)
}
else
{
}
else
{
req
.
UpdateBy
=
userId
err
,
eId
=
s
.
Update
(
&
req
,
p
)
err
,
eId
=
s
.
Update
(
&
req
,
p
)
}
}
fmt
.
Println
(
eId
)
fmt
.
Println
(
eId
)
...
...
app/operate/models/org_match_evaluate.go
View file @
d40ef1a2
...
@@ -14,6 +14,8 @@ type OrgMatchEvaluate struct {
...
@@ -14,6 +14,8 @@ type OrgMatchEvaluate struct {
PlayerId
string
`json:"playerId" gorm:"type:bigint(20);comment:org_player表id(球员id)"`
PlayerId
string
`json:"playerId" gorm:"type:bigint(20);comment:org_player表id(球员id)"`
Content
string
`json:"content" gorm:"type:text;comment:教练评价内容"`
Content
string
`json:"content" gorm:"type:text;comment:教练评价内容"`
ContentStatus
string
`json:"contentStatus" gorm:"type:bigint(20);comment:教练评价状态 1 待评价 2 评价完成"`
ContentStatus
string
`json:"contentStatus" gorm:"type:bigint(20);comment:教练评价状态 1 待评价 2 评价完成"`
ContentDate
string
`json:"contentDate" gorm:"type:datetime;comment:教练评价时间"`
ContentImg
string
`json:"contentImg" gorm:"type:varchar(255);comment:教练评价签名图"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" gorm:"type:varchar(255);comment:精彩时刻图"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" gorm:"type:varchar(255);comment:精彩时刻图"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" gorm:"type:varchar(255);comment:精彩时刻视频"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" gorm:"type:varchar(255);comment:精彩时刻视频"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" gorm:"type:varchar(255);comment:精彩时刻图标题"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" gorm:"type:varchar(255);comment:精彩时刻图标题"`
...
...
app/operate/service/dto/org_match_evaluate.go
View file @
d40ef1a2
...
@@ -57,10 +57,8 @@ type OrgMatchEvaluateInsertReq struct {
...
@@ -57,10 +57,8 @@ type OrgMatchEvaluateInsertReq struct {
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
Content
string
`json:"content" comment:"教练评价内容"`
Content
string
`json:"content" comment:"教练评价内容"`
ContentStatus
string
`json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
ContentStatus
string
`json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
WonderfulMomentImg
string
`json:"wonderfulMomentImg" comment:"精彩时刻图"`
ContentDate
string
`json:"contentDate" comment:"教练评价时间"`
WonderfulMomentMv
string
`json:"wonderfulMomentMv" comment:"精彩时刻视频"`
ContentImg
string
`json:"contentImg" comment:"教练评价签名图"`
WonderfulMomentImgTitle
string
`json:"wonderfulMomentImgTitle" comment:"精彩时刻图标题"`
WonderfulMomentMvTitle
string
`json:"wonderfulMomentMvTitle" comment:"精彩时刻视频标题"`
MvStatus
string
`json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
MvStatus
string
`json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
Status
string
`json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
Remark
string
`json:"remark" comment:"驳回原因"`
Remark
string
`json:"remark" comment:"驳回原因"`
...
@@ -76,10 +74,9 @@ func (s *OrgMatchEvaluateInsertReq) Generate(model *models.OrgMatchEvaluate) {
...
@@ -76,10 +74,9 @@ func (s *OrgMatchEvaluateInsertReq) Generate(model *models.OrgMatchEvaluate) {
model
.
TeamUserId
=
s
.
TeamUserId
model
.
TeamUserId
=
s
.
TeamUserId
model
.
PlayerId
=
s
.
PlayerId
model
.
PlayerId
=
s
.
PlayerId
model
.
Content
=
s
.
Content
model
.
Content
=
s
.
Content
model
.
WonderfulMomentImg
=
s
.
WonderfulMomentImg
model
.
ContentStatus
=
s
.
ContentStatus
model
.
WonderfulMomentMv
=
s
.
WonderfulMomentMv
model
.
ContentDate
=
s
.
ContentDate
model
.
WonderfulMomentImgTitle
=
s
.
WonderfulMomentImgTitle
model
.
ContentImg
=
s
.
ContentImg
model
.
WonderfulMomentMvTitle
=
s
.
WonderfulMomentMvTitle
model
.
MvStatus
=
s
.
MvStatus
model
.
MvStatus
=
s
.
MvStatus
model
.
Status
=
s
.
Status
model
.
Status
=
s
.
Status
model
.
Remark
=
s
.
Remark
model
.
Remark
=
s
.
Remark
...
@@ -97,6 +94,8 @@ type OrgMatchEvaluateUpdateReq struct {
...
@@ -97,6 +94,8 @@ type OrgMatchEvaluateUpdateReq struct {
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
PlayerId
string
`json:"playerId" comment:"org_player表id(球员id)"`
Content
string
`json:"content" comment:"教练评价内容"`
Content
string
`json:"content" comment:"教练评价内容"`
ContentStatus
string
`json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
ContentStatus
string
`json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
ContentDate
string
`json:"contentDate" comment:"教练评价时间"`
ContentImg
string
`json:"contentImg" comment:"教练评价签名图"`
MvStatus
string
`json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
MvStatus
string
`json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
Status
string
`json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
Status
string
`json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
Remark
string
`json:"remark" comment:"驳回原因"`
Remark
string
`json:"remark" comment:"驳回原因"`
...
@@ -115,6 +114,8 @@ func (s *OrgMatchEvaluateUpdateReq) Generate(model *models.OrgMatchEvaluate) {
...
@@ -115,6 +114,8 @@ func (s *OrgMatchEvaluateUpdateReq) Generate(model *models.OrgMatchEvaluate) {
model
.
PlayerId
=
s
.
PlayerId
model
.
PlayerId
=
s
.
PlayerId
model
.
Content
=
s
.
Content
model
.
Content
=
s
.
Content
model
.
ContentStatus
=
s
.
ContentStatus
model
.
ContentStatus
=
s
.
ContentStatus
model
.
ContentDate
=
s
.
ContentDate
model
.
ContentImg
=
s
.
ContentImg
model
.
MvStatus
=
s
.
MvStatus
model
.
MvStatus
=
s
.
MvStatus
model
.
Status
=
s
.
Status
model
.
Status
=
s
.
Status
model
.
Remark
=
s
.
Remark
model
.
Remark
=
s
.
Remark
...
...
app/operate/service/dto/org_team_user.go
View file @
d40ef1a2
...
@@ -98,6 +98,10 @@ func (s *OrgTeamUserUpdateReq) GetId() interface{} {
...
@@ -98,6 +98,10 @@ func (s *OrgTeamUserUpdateReq) GetId() interface{} {
return
s
.
Id
return
s
.
Id
}
}
type
OrgTeamUserGetForUserId
struct
{
UserId
int
`json:"userId"`
}
// OrgTeamUserGetReq 功能获取请求参数
// OrgTeamUserGetReq 功能获取请求参数
type
OrgTeamUserGetReq
struct
{
type
OrgTeamUserGetReq
struct
{
Id
int
`uri:"id"`
Id
int
`uri:"id"`
...
...
app/operate/service/org_team_user.go
View file @
d40ef1a2
...
@@ -196,3 +196,18 @@ func (e *OrgTeamUser) GetParentDeptId(teamId string) (error, int) {
...
@@ -196,3 +196,18 @@ func (e *OrgTeamUser) GetParentDeptId(teamId string) (error, int) {
}
}
return
nil
,
data
.
DeptId
return
nil
,
data
.
DeptId
}
}
// 根据userId获取teamId
func
(
e
*
OrgTeamUser
)
GetTeamUser
(
userId
int
)
(
error
,
*
models
.
OrgTeamUser
)
{
data
:=
new
(
models
.
OrgTeamUser
)
err
:=
e
.
Orm
.
Table
(
"org_team_user"
)
.
Select
(
"*"
)
.
Where
(
"user_id=?"
,
userId
)
.
First
(
&
data
)
.
Error
if
err
!=
nil
{
e
.
Log
.
Errorf
(
"db error:%s"
,
err
)
return
err
,
nil
}
return
nil
,
data
}
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