Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
chenweijian
hilo-user
Commits
2af6df67
Commit
2af6df67
authored
Jul 03, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派对邀请
parent
5d5848dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
invite_apply.go
cv/invite_cv/invite_apply.go
+1
-0
bizCode.go
myerr/bizerr/bizCode.go
+2
-0
party_invite.go
route/invite_r/party_invite.go
+8
-3
No files found.
cv/invite_cv/invite_apply.go
View file @
2af6df67
...
...
@@ -13,6 +13,7 @@ type CvUserLevel struct {
type
InviteApplyRes
struct
{
List
[]
*
InviteApply
`json:"list"`
NumList
[]
*
InviteApplyNumRes
`json:"numList"`
MyCode
string
`json:"myCode"`
}
type
InviteApply
struct
{
...
...
myerr/bizerr/bizCode.go
View file @
2af6df67
...
...
@@ -31,4 +31,6 @@ var (
CpHaveCancelNoDeal
=
myerr
.
NewBusinessCode
(
50121
,
"You have a cancel apply"
,
myerr
.
BusinessData
{})
// 有接触申请需要处理
InviteApplyNoPermission
=
myerr
.
NewBusinessCode
(
50122
,
"This user does not have invitation permission"
,
myerr
.
BusinessData
{})
// 该用户没有邀请权限
InviteApplyAlreadyInvited
=
myerr
.
NewBusinessCode
(
50123
,
"Already invited by someone else"
,
myerr
.
BusinessData
{})
// 已经被别人邀请了
InviteApplyCodeInvalid
=
myerr
.
NewBusinessCode
(
50124
,
"user id invalid"
,
myerr
.
BusinessData
{})
// 邀请人用户id错误
InviteApplyNewCodeInvalid
=
myerr
.
NewBusinessCode
(
50125
,
"user id invalid"
,
myerr
.
BusinessData
{})
// 被邀请人用户id错误
)
route/invite_r/party_invite.go
View file @
2af6df67
...
...
@@ -65,12 +65,12 @@ func InviteApply(c *gin.Context) (*mycontext.MyContext, error) {
newUser
,
err
:=
user_m
.
GetUserByCode
(
model
,
param
.
NewUserCode
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"InviteApply param:%v"
,
param
)
return
myCtx
,
err
return
myCtx
,
bizerr
.
InviteApplyNewCodeInvalid
}
user
,
err
:=
user_m
.
GetUserByCode
(
model
,
param
.
UserCode
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"InviteApply param:%v"
,
param
)
return
myCtx
,
err
return
myCtx
,
bizerr
.
InviteApplyCodeInvalid
}
if
newUser
.
ID
==
0
||
user
.
ID
==
0
{
model
.
Log
.
Errorf
(
"InviteApply param:%v"
,
param
)
...
...
@@ -169,6 +169,11 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
}
if
param
.
Type
==
0
{
// 返回所有Type类型有多少条数
user
,
err
:=
user_c
.
GetUserTinyById
(
model
,
userId
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"GetApplyList param:%v, err:%v"
,
param
,
err
)
return
myCtx
,
bizerr
.
InvalidParameter
}
numList
:=
make
([]
*
invite_cv
.
InviteApplyNumRes
,
0
,
4
)
for
_
,
gType
:=
range
[]
int
{
1
,
2
,
3
,
4
}
{
// 1.已申请2.待审核3.已通过4.已拒绝
num
,
err
:=
invite_m
.
GetInviteApplyNumByType
(
model
,
gType
,
param
.
BeginTime
,
param
.
EndTime
,
agentIds
)
...
...
@@ -177,7 +182,7 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
}
numList
=
append
(
numList
,
&
invite_cv
.
InviteApplyNumRes
{
Type
:
gType
,
Num
:
num
})
}
resp
.
ResponsePageOk
(
c
,
&
invite_cv
.
InviteApplyRes
{
NumList
:
numList
},
0
,
0
,
0
)
resp
.
ResponsePageOk
(
c
,
&
invite_cv
.
InviteApplyRes
{
NumList
:
numList
,
MyCode
:
user
.
Code
},
0
,
0
,
0
)
return
myCtx
,
nil
}
...
...
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