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
48f8f0fd
Commit
48f8f0fd
authored
Jan 22, 2022
by
haoyanbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Msg
parent
0697acd4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
14 deletions
+21
-14
org_player_user.go
app/mobile/apis/org_player_user.go
+2
-0
org_msg.go
app/mobile/service/dto/org_msg.go
+3
-0
org_msg.go
app/mobile/service/org_msg.go
+1
-0
org_user.go
app/operate/apis/org_user.go
+3
-3
org_msg.go
app/operate/models/org_msg.go
+10
-9
org_user.go
app/operate/service/org_user.go
+2
-2
No files found.
app/mobile/apis/org_player_user.go
View file @
48f8f0fd
...
...
@@ -65,6 +65,7 @@ func (e OrgPlayerUser) GetMsg(c *gin.Context) {
}
reqMsg
.
Username
=
req
.
Username
reqMsg
.
Code
=
code
reqMsg
.
MsgType
=
"1"
err
=
sMsg
.
Insert
(
&
reqMsg
)
smsText
:=
"您的验证码为:"
+
code
...
...
@@ -126,6 +127,7 @@ func (e OrgPlayerUser) Login(c *gin.Context) {
}
reqMsg
.
Username
=
req
.
Username
reqMsg
.
Code
=
req
.
Code
reqMsg
.
MsgType
=
"1"
err
=
sMsg
.
Get
(
&
reqMsg
)
if
err
!=
nil
{
e
.
Logger
.
Error
(
err
)
...
...
app/mobile/service/dto/org_msg.go
View file @
48f8f0fd
...
...
@@ -18,6 +18,7 @@ type OrgMsgInsertReq struct {
Id
int
`json:"-" comment:""`
//
Code
string
`json:"code" comment:""`
Username
string
`json:"username" comment:""`
MsgType
string
`json:"msgType" comment:""`
common
.
ControlBy
}
...
...
@@ -27,6 +28,7 @@ func (s *OrgMsgInsertReq) Generate(model *models.OrgMsg) {
}
model
.
Code
=
s
.
Code
model
.
Username
=
s
.
Username
model
.
MsgType
=
s
.
MsgType
}
func
(
s
*
OrgMsgInsertReq
)
GetId
()
interface
{}
{
...
...
@@ -56,6 +58,7 @@ func (s *OrgMsgUpdateReq) GetId() interface{} {
type
OrgMsgGetReq
struct
{
Username
string
`json:"username"`
Code
string
`json:"code"`
MsgType
string
`json:"msgType"`
}
// OrgMsgDeleteReq 功能删除请求参数
...
...
app/mobile/service/org_msg.go
View file @
48f8f0fd
...
...
@@ -51,6 +51,7 @@ func (e *OrgMsg) Get(d *dto.OrgMsgGetReq) error {
Where
(
"code=?"
,
d
.
Code
)
.
Where
(
"username=?"
,
d
.
Username
)
.
Where
(
"created_at>?"
,
nowBefore5Minute
)
.
Where
(
"msg_type=?"
,
d
.
MsgType
)
.
Order
(
"id desc"
)
.
First
(
&
reply
)
.
Error
if
err
!=
nil
&&
errors
.
Is
(
err
,
gorm
.
ErrRecordNotFound
)
{
...
...
app/operate/apis/org_user.go
View file @
48f8f0fd
...
...
@@ -25,7 +25,7 @@ type OrgUser struct {
// @Summary <赛事>列表用户信息数据
// @Description 获取JSON
// @Tags 用户
// @Param
username query string false "username
"
// @Param
data body dto.OrgUserGetPageReq true "data
"
// @Success 200 {string} {object} response.Response "{"code": 200, "data": [...]}"
// @Router /api/v1/org-user [get]
// @Security Bearer
...
...
@@ -150,7 +150,7 @@ func (e OrgUser) Insert(c *gin.Context) {
// @Tags 用户
// @Accept application/json
// @Product application/json
// @Param data body dto.
Sys
UserUpdateReq true "body"
// @Param data body dto.
Org
UserUpdateReq true "body"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-user/{userId} [put]
// @Security Bearer
...
...
@@ -223,7 +223,7 @@ func (e OrgUser) Delete(c *gin.Context) {
// @Tags 用户
// @Accept application/json
// @Product application/json
// @Param data body dto.
UpdateSysUser
StatusReq true "body"
// @Param data body dto.
OrgUserUpdate
StatusReq true "body"
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /api/v1/org-user/status [put]
// @Security Bearer
...
...
app/operate/models/org_msg.go
View file @
48f8f0fd
...
...
@@ -11,6 +11,7 @@ type OrgMsg struct {
Code
string
`json:"code" gorm:"type:varchar(20);comment:Code"`
Username
string
`json:"username" gorm:"type:varchar(20);comment:Username"`
MsgType
string
`json:"msgType" gorm:"type:varchar(20);comment:MsgType"`
models
.
ModelTime
models
.
ControlBy
}
...
...
app/operate/service/org_user.go
View file @
48f8f0fd
...
...
@@ -19,7 +19,7 @@ type OrgUser struct {
func
(
e
*
OrgUser
)
GetPage
(
c
*
dto
.
OrgUserGetPageReq
,
p
*
actions
.
DataPermission
,
list
*
[]
dto
.
OrgUserGetPageReply
,
count
*
int64
)
error
{
var
err
error
var
data
models
.
SysUser
field
:=
"su.user_id, su.username, su.nick_name, su.nick_name_en, sr.role_name, su.status"
field
:=
"su.user_id, su.username, su.nick_name, su.nick_name_en, s
u.role_id, s
r.role_name, su.status"
err
=
e
.
Orm
.
Table
(
"sys_user as su"
)
.
Select
(
field
)
.
...
...
@@ -42,7 +42,7 @@ func (e *OrgUser) GetPage(c *dto.OrgUserGetPageReq, p *actions.DataPermission, l
// Get 获取OrgTeamUser对象
func
(
e
*
OrgUser
)
Get
(
d
*
dto
.
OrgUserGetReq
,
p
*
actions
.
DataPermission
,
model
*
dto
.
OrgUserGetReply
)
error
{
field
:=
"su.user_id, su.username, su.nick_name, su.nick_name_en, su.status"
field
:=
"su.user_id, su.username, su.nick_name, su.nick_name_en, su.
role_id, su.
status"
err
:=
e
.
Orm
.
Table
(
"sys_user as su"
)
.
Select
(
field
)
.
...
...
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