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
a17805e7
Commit
a17805e7
authored
Jan 20, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bd5db330
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
11 deletions
+21
-11
org_player_user.go
app/mobile/apis/org_player_user.go
+3
-3
org_match_evaluate.go
app/operate/apis/org_match_evaluate.go
+14
-4
org_match_evaluate_wonderful.go
app/operate/service/org_match_evaluate_wonderful.go
+4
-4
No files found.
app/mobile/apis/org_player_user.go
View file @
a17805e7
...
@@ -46,7 +46,7 @@ func (e OrgPlayerUser) GetMsg(c *gin.Context) {
...
@@ -46,7 +46,7 @@ func (e OrgPlayerUser) GetMsg(c *gin.Context) {
return
return
}
}
if
userId
==
0
{
if
userId
==
0
{
e
.
Error
(
500
,
err
,
"账号未找到"
)
e
.
Error
(
101
,
err
,
"账号未找到"
)
return
return
}
}
...
@@ -110,7 +110,7 @@ func (e OrgPlayerUser) Login(c *gin.Context) {
...
@@ -110,7 +110,7 @@ func (e OrgPlayerUser) Login(c *gin.Context) {
err
=
s
.
Login
(
&
req
,
p
,
data
)
err
=
s
.
Login
(
&
req
,
p
,
data
)
if
err
!=
nil
{
if
err
!=
nil
{
e
.
Error
(
500
,
err
,
fmt
.
Sprintf
(
"获取球员账户信息 失败,
\r\n
失败信息 %s"
,
err
.
Error
())
)
e
.
Error
(
101
,
err
,
"账号未找到"
)
return
return
}
}
...
@@ -130,7 +130,7 @@ func (e OrgPlayerUser) Login(c *gin.Context) {
...
@@ -130,7 +130,7 @@ func (e OrgPlayerUser) Login(c *gin.Context) {
err
=
sMsg
.
Get
(
&
reqMsg
)
err
=
sMsg
.
Get
(
&
reqMsg
)
if
err
!=
nil
{
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
"验证码不正确"
)
e
.
Error
(
102
,
err
,
"验证码不正确"
)
return
return
}
}
...
...
app/operate/apis/org_match_evaluate.go
View file @
a17805e7
...
@@ -227,15 +227,17 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
...
@@ -227,15 +227,17 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
e
.
Error
(
500
,
err
,
err
.
Error
())
e
.
Error
(
500
,
err
,
err
.
Error
())
return
return
}
}
delIds
:=
make
([]
int
,
0
)
for
_
,
v
:=
range
req
.
MatchImg
{
for
_
,
v
:=
range
req
.
MatchImg
{
if
v
.
Id
!=
""
{
if
v
.
Id
!=
""
{
reqWonderfulUpdate
.
Id
,
_
=
strconv
.
Atoi
(
v
.
Id
)
upId
,
_
:=
strconv
.
Atoi
(
v
.
Id
)
reqWonderfulUpdate
.
Id
=
upId
reqWonderfulUpdate
.
WonderfulUrl
=
v
.
WonderfulUrl
reqWonderfulUpdate
.
WonderfulUrl
=
v
.
WonderfulUrl
reqWonderfulUpdate
.
WonderfulTitle
=
v
.
WonderfulTitle
reqWonderfulUpdate
.
WonderfulTitle
=
v
.
WonderfulTitle
reqWonderfulUpdate
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
reqWonderfulUpdate
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Update
(
&
reqWonderfulUpdate
)
sWonderful
.
Update
(
&
reqWonderfulUpdate
)
delIds
=
append
(
delIds
,
upId
)
}
else
{
}
else
{
reqWonderfulInsert
.
Type
=
"1"
reqWonderfulInsert
.
Type
=
"1"
reqWonderfulInsert
.
MatchEvaluateId
=
strconv
.
Itoa
(
eId
)
reqWonderfulInsert
.
MatchEvaluateId
=
strconv
.
Itoa
(
eId
)
...
@@ -244,25 +246,33 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
...
@@ -244,25 +246,33 @@ func (e OrgMatchEvaluate) Update(c *gin.Context) {
reqWonderfulInsert
.
SetCreateBy
(
user
.
GetUserId
(
c
))
reqWonderfulInsert
.
SetCreateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Insert
(
&
reqWonderfulInsert
)
sWonderful
.
Insert
(
&
reqWonderfulInsert
)
delIds
=
append
(
delIds
,
reqWonderfulInsert
.
Id
)
}
}
}
}
for
_
,
vMv
:=
range
req
.
MatchMv
{
for
_
,
vMv
:=
range
req
.
MatchMv
{
if
vMv
.
Id
!=
""
{
if
vMv
.
Id
!=
""
{
reqWonderfulUpdate
.
Id
,
_
=
strconv
.
Atoi
(
vMv
.
Id
)
upId
,
_
:=
strconv
.
Atoi
(
vMv
.
Id
)
reqWonderfulUpdate
.
Id
=
upId
reqWonderfulUpdate
.
WonderfulUrl
=
vMv
.
WonderfulUrl
reqWonderfulUpdate
.
WonderfulUrl
=
vMv
.
WonderfulUrl
reqWonderfulUpdate
.
WonderfulTitle
=
vMv
.
WonderfulTitle
reqWonderfulUpdate
.
WonderfulTitle
=
vMv
.
WonderfulTitle
reqWonderfulUpdate
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
reqWonderfulUpdate
.
SetUpdateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Update
(
&
reqWonderfulUpdate
)
sWonderful
.
Update
(
&
reqWonderfulUpdate
)
delIds
=
append
(
delIds
,
upId
)
}
else
{
}
else
{
reqWonderfulInsert
.
Type
=
"
1
"
reqWonderfulInsert
.
Type
=
"
2
"
reqWonderfulInsert
.
MatchEvaluateId
=
strconv
.
Itoa
(
eId
)
reqWonderfulInsert
.
MatchEvaluateId
=
strconv
.
Itoa
(
eId
)
reqWonderfulInsert
.
WonderfulUrl
=
vMv
.
WonderfulUrl
reqWonderfulInsert
.
WonderfulUrl
=
vMv
.
WonderfulUrl
reqWonderfulInsert
.
WonderfulTitle
=
vMv
.
WonderfulTitle
reqWonderfulInsert
.
WonderfulTitle
=
vMv
.
WonderfulTitle
reqWonderfulInsert
.
SetCreateBy
(
user
.
GetUserId
(
c
))
reqWonderfulInsert
.
SetCreateBy
(
user
.
GetUserId
(
c
))
sWonderful
.
Insert
(
&
reqWonderfulInsert
)
sWonderful
.
Insert
(
&
reqWonderfulInsert
)
delIds
=
append
(
delIds
,
reqWonderfulInsert
.
Id
)
}
}
}
}
reqWonderfulDelete
:=
dto
.
OrgMatchEvaluateWonderfulDeleteReq
{}
reqWonderfulDelete
.
Ids
=
delIds
sWonderful
.
Remove
(
&
reqWonderfulDelete
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
e
.
OK
(
req
.
GetId
(),
"修改成功"
)
}
}
app/operate/service/org_match_evaluate_wonderful.go
View file @
a17805e7
...
@@ -67,6 +67,7 @@ func (e *OrgMatchEvaluateWonderful) Insert(c *dto.OrgMatchEvaluateWonderfulInser
...
@@ -67,6 +67,7 @@ func (e *OrgMatchEvaluateWonderful) Insert(c *dto.OrgMatchEvaluateWonderfulInser
e
.
Log
.
Errorf
(
"OrgMatchEvaluateWonderfulService Insert error:%s
\r\n
"
,
err
)
e
.
Log
.
Errorf
(
"OrgMatchEvaluateWonderfulService Insert error:%s
\r\n
"
,
err
)
return
err
return
err
}
}
c
.
Id
=
data
.
Id
return
nil
return
nil
}
}
...
@@ -89,13 +90,12 @@ func (e *OrgMatchEvaluateWonderful) Update(c *dto.OrgMatchEvaluateWonderfulUpdat
...
@@ -89,13 +90,12 @@ func (e *OrgMatchEvaluateWonderful) Update(c *dto.OrgMatchEvaluateWonderfulUpdat
}
}
// Remove 删除OrgMatchEvaluateWonderful
// Remove 删除OrgMatchEvaluateWonderful
func
(
e
*
OrgMatchEvaluateWonderful
)
Remove
(
d
*
dto
.
OrgMatchEvaluateWonderfulDeleteReq
,
p
*
actions
.
DataPermission
)
error
{
func
(
e
*
OrgMatchEvaluateWonderful
)
Remove
(
d
*
dto
.
OrgMatchEvaluateWonderfulDeleteReq
)
error
{
var
data
models
.
OrgMatchEvaluateWonderful
var
data
models
.
OrgMatchEvaluateWonderful
db
:=
e
.
Orm
.
Model
(
&
data
)
.
db
:=
e
.
Orm
.
Model
(
&
data
)
.
Scopes
(
Where
(
"id not in (?)"
,
d
.
GetId
())
.
actions
.
Permission
(
data
.
TableName
(),
p
),
Delete
(
&
data
)
)
.
Delete
(
&
data
,
d
.
GetId
())
if
err
:=
db
.
Error
;
err
!=
nil
{
if
err
:=
db
.
Error
;
err
!=
nil
{
e
.
Log
.
Errorf
(
"Service RemoveOrgMatchEvaluateWonderful error:%s
\r\n
"
,
err
)
e
.
Log
.
Errorf
(
"Service RemoveOrgMatchEvaluateWonderful error:%s
\r\n
"
,
err
)
return
err
return
err
...
...
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