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
d9deee2b
Commit
d9deee2b
authored
3 years ago
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User
parent
344f0a26
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
7 deletions
+33
-7
sys_user.go
app/admin/service/dto/sys_user.go
+2
-0
org_club.go
app/operate/apis/org_club.go
+2
-1
org_team_match.go
app/operate/apis/org_team_match.go
+1
-1
org_team_user.go
app/operate/apis/org_team_user.go
+2
-1
org_user.go
app/operate/apis/org_user.go
+25
-3
org_match_evaluate.go
app/operate/service/org_match_evaluate.go
+1
-1
No files found.
app/admin/service/dto/sys_user.go
View file @
d9deee2b
...
...
@@ -103,6 +103,7 @@ type SysUserInsertReq struct {
PostId
int
`json:"postId" comment:"岗位"`
Remark
string
`json:"remark" comment:"备注"`
Status
string
`json:"status" comment:"状态" vd:"len($)>0" default:"2"`
UserType
string
`json:"userType" comment:"用户类型 2 赛事 3 俱乐部 4 球队 " default:"1"`
common
.
ControlBy
}
...
...
@@ -122,6 +123,7 @@ func (s *SysUserInsertReq) Generate(model *models.SysUser) {
model
.
PostId
=
s
.
PostId
model
.
Remark
=
s
.
Remark
model
.
Status
=
s
.
Status
model
.
UserType
=
s
.
UserType
}
func
(
s
*
SysUserInsertReq
)
GetId
()
interface
{}
{
...
...
This diff is collapsed.
Click to expand it.
app/operate/apis/org_club.go
View file @
d9deee2b
...
...
@@ -131,7 +131,7 @@ func (e OrgClub) Insert(c *gin.Context) {
reqSysUser
.
NickName
=
req
.
ClubContacts
reqSysUser
.
NickNameEn
=
req
.
ClubContactsEn
reqSysUser
.
Phone
=
req
.
ClubMobile
reqSysUser
.
RoleId
=
1
reqSysUser
.
RoleId
=
8
reqSysUser
.
Avatar
=
""
reqSysUser
.
Sex
=
"0"
reqSysUser
.
Email
=
""
...
...
@@ -139,6 +139,7 @@ func (e OrgClub) Insert(c *gin.Context) {
reqSysUser
.
PostId
=
1
reqSysUser
.
Remark
=
"俱乐部"
reqSysUser
.
Status
=
"2"
reqSysUser
.
UserType
=
"3"
// 设置创建人
reqSysUser
.
SetCreateBy
(
user
.
GetUserId
(
c
))
...
...
This diff is collapsed.
Click to expand it.
app/operate/apis/org_team_match.go
View file @
d9deee2b
...
...
@@ -54,7 +54,7 @@ func (e OrgTeamMatch) GetPage(c *gin.Context) {
p
:=
actions
.
GetPermissionFromContext
(
c
)
list
:=
make
([]
dto
.
OrgTeamMatchGetPageReply
,
0
)
var
count
int64
fmt
.
Println
(
user
.
GetUserId
(
c
))
req
.
TeamId
=
e
.
getTeamId
(
c
)
err
=
s
.
GetPage
(
&
req
,
p
,
&
list
,
&
count
)
...
...
This diff is collapsed.
Click to expand it.
app/operate/apis/org_team_user.go
View file @
d9deee2b
...
...
@@ -121,7 +121,7 @@ func (e OrgTeamUser) Insert(c *gin.Context) {
reqSysUser
.
NickName
=
req
.
Name
reqSysUser
.
NickNameEn
=
req
.
NameEn
reqSysUser
.
Phone
=
req
.
Username
reqSysUser
.
RoleId
=
1
reqSysUser
.
RoleId
=
7
reqSysUser
.
Avatar
=
""
reqSysUser
.
Sex
=
req
.
Sex
reqSysUser
.
Email
=
""
...
...
@@ -129,6 +129,7 @@ func (e OrgTeamUser) Insert(c *gin.Context) {
reqSysUser
.
PostId
=
1
reqSysUser
.
Remark
=
"球队工作人员"
reqSysUser
.
Status
=
"2"
reqSysUser
.
UserType
=
"4"
// 设置创建人
reqSysUser
.
SetCreateBy
(
user
.
GetUserId
(
c
))
...
...
This diff is collapsed.
Click to expand it.
app/operate/apis/org_user.go
View file @
d9deee2b
...
...
@@ -2,7 +2,10 @@ package apis
import
(
"github.com/gin-gonic/gin/binding"
sService
"go-admin/app/admin/service"
sDto
"go-admin/app/admin/service/dto"
"net/http"
"strconv"
"github.com/gin-gonic/gin"
"github.com/go-admin-team/go-admin-core/sdk/api"
...
...
@@ -93,7 +96,7 @@ func (e OrgUser) Get(c *gin.Context) {
// @Tags 用户
// @Accept application/json
// @Product application/json
// @Param data body dto.
Sys
UserInsertReq true "用户数据"
// @Param data body dto.
Org
UserInsertReq true "用户数据"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-user [post]
// @Security Bearer
...
...
@@ -110,9 +113,28 @@ func (e OrgUser) Insert(c *gin.Context) {
e
.
Error
(
500
,
err
,
err
.
Error
())
return
}
sSysUser
:=
sService
.
SysUser
{}
reqSysUser
:=
sDto
.
SysUserInsertReq
{}
e
.
MakeContext
(
c
)
.
MakeOrm
()
.
MakeService
(
&
sSysUser
.
Service
)
reqSysUser
.
Username
=
req
.
Username
reqSysUser
.
Password
=
"123456"
reqSysUser
.
NickName
=
req
.
NickName
reqSysUser
.
NickNameEn
=
req
.
NickNameEn
reqSysUser
.
Phone
=
req
.
Username
reqSysUser
.
RoleId
,
_
=
strconv
.
Atoi
(
req
.
RoleId
)
reqSysUser
.
Avatar
=
""
reqSysUser
.
Sex
=
"0"
reqSysUser
.
Email
=
""
reqSysUser
.
DeptId
=
1
reqSysUser
.
PostId
=
1
reqSysUser
.
Remark
=
"赛事"
reqSysUser
.
Status
=
"2"
reqSysUser
.
UserType
=
"2"
// 设置创建人
req
.
SetCreateBy
(
user
.
GetUserId
(
c
))
err
=
s
.
Insert
(
&
req
)
req
SysUser
.
SetCreateBy
(
user
.
GetUserId
(
c
))
err
=
s
SysUser
.
Insert
(
&
reqSysUser
)
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
e
.
Error
(
500
,
err
,
err
.
Error
())
...
...
This diff is collapsed.
Click to expand it.
app/operate/service/org_match_evaluate.go
View file @
d9deee2b
...
...
@@ -28,7 +28,7 @@ func (e *OrgMatchEvaluate) GetPage(c *dto.OrgMatchEvaluateGetPageReq, p *actions
"ome.remark"
err
=
e
.
Orm
.
Table
(
"org_match_team_player as omtp"
)
.
Select
(
field
)
.
Joins
(
"left join org_match_evaluate as ome on omtp.
player_id = ome.player_id
"
)
.
Joins
(
"left join org_match_evaluate as ome on omtp.
match_id = ome.id and omtp.rounds = ome.rounds
"
)
.
Joins
(
"left join org_match as om on omtp.match_id = om.id and omtp.rounds = om.rounds"
)
.
Joins
(
"left join org_league as ol on ol.id = om.league_id"
)
.
Joins
(
"left join org_division as od on od.id = om.division_id"
)
.
...
...
This diff is collapsed.
Click to expand it.
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