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
5d5848dc
Commit
5d5848dc
authored
Jul 03, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
派对邀请
parent
0ee79f63
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
invite_apply.go
domain/model/invite_m/invite_apply.go
+2
-2
party_invite.go
route/invite_r/party_invite.go
+9
-9
No files found.
domain/model/invite_m/invite_apply.go
View file @
5d5848dc
...
@@ -65,9 +65,9 @@ func IsInInviteApply(model *domain.Model, userId mysql.ID) (bool, error) {
...
@@ -65,9 +65,9 @@ func IsInInviteApply(model *domain.Model, userId mysql.ID) (bool, error) {
}
}
// 检查被邀请人是否存在
// 检查被邀请人是否存在
func
GetInviteApplyNumByType
(
model
*
domain
.
Model
,
gType
int
,
beginTime
,
endTime
time
.
Time
,
userId
uint64
)
(
int
,
error
)
{
func
GetInviteApplyNumByType
(
model
*
domain
.
Model
,
gType
int
,
beginTime
,
endTime
time
.
Time
,
userId
s
[]
uint64
)
(
int
,
error
)
{
var
count
int64
var
count
int64
db
:=
model
.
Db
.
Model
(
InviteApply
{})
.
Where
(
"user_id
=?"
,
userId
)
.
Where
(
"created_time >= ? and created_time <= ?"
,
beginTime
,
endTime
)
db
:=
model
.
Db
.
Model
(
InviteApply
{})
.
Where
(
"user_id
in (?)"
,
userIds
)
.
Where
(
"created_time >= ? and created_time <= ?"
,
beginTime
,
endTime
)
switch
gType
{
// 1.已申请2.待审核3.已通过4.已拒绝
switch
gType
{
// 1.已申请2.待审核3.已通过4.已拒绝
case
2
:
case
2
:
db
=
db
.
Where
(
"`status` = ?"
,
0
)
db
=
db
.
Where
(
"`status` = ?"
,
0
)
...
...
route/invite_r/party_invite.go
View file @
5d5848dc
...
@@ -160,10 +160,18 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -160,10 +160,18 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
var
model
=
domain
.
CreateModelContext
(
myCtx
)
var
model
=
domain
.
CreateModelContext
(
myCtx
)
agentIds
:=
[]
uint64
{
userId
}
if
promotion_m
.
IsPromotionManager
(
model
,
userId
)
{
agentIds
,
err
=
promotion_m
.
GetPromotionManagerAgentList
(
model
,
userId
)
if
err
!=
nil
{
return
myCtx
,
err
}
}
if
param
.
Type
==
0
{
// 返回所有Type类型有多少条数
if
param
.
Type
==
0
{
// 返回所有Type类型有多少条数
numList
:=
make
([]
*
invite_cv
.
InviteApplyNumRes
,
0
,
4
)
numList
:=
make
([]
*
invite_cv
.
InviteApplyNumRes
,
0
,
4
)
for
_
,
gType
:=
range
[]
int
{
1
,
2
,
3
,
4
}
{
// 1.已申请2.待审核3.已通过4.已拒绝
for
_
,
gType
:=
range
[]
int
{
1
,
2
,
3
,
4
}
{
// 1.已申请2.待审核3.已通过4.已拒绝
num
,
err
:=
invite_m
.
GetInviteApplyNumByType
(
model
,
gType
,
param
.
BeginTime
,
param
.
EndTime
,
userId
)
num
,
err
:=
invite_m
.
GetInviteApplyNumByType
(
model
,
gType
,
param
.
BeginTime
,
param
.
EndTime
,
agentIds
)
if
err
!=
nil
{
if
err
!=
nil
{
return
myCtx
,
err
return
myCtx
,
err
}
}
...
@@ -173,14 +181,6 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -173,14 +181,6 @@ func InviteApplyList(c *gin.Context) (*mycontext.MyContext, error) {
return
myCtx
,
nil
return
myCtx
,
nil
}
}
agentIds
:=
[]
uint64
{
userId
}
if
promotion_m
.
IsPromotionManager
(
model
,
userId
)
{
agentIds
,
err
=
promotion_m
.
GetPromotionManagerAgentList
(
model
,
userId
)
if
err
!=
nil
{
return
myCtx
,
err
}
}
list
,
total
,
err
:=
invite_m
.
GetApplyList
(
model
,
agentIds
,
param
.
PageIndex
,
param
.
PageSize
,
param
.
Type
,
param
.
BeginTime
,
param
.
EndTime
)
list
,
total
,
err
:=
invite_m
.
GetApplyList
(
model
,
agentIds
,
param
.
PageIndex
,
param
.
PageSize
,
param
.
Type
,
param
.
BeginTime
,
param
.
EndTime
)
if
err
!=
nil
{
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"GetApplyList param:%v, err:%v"
,
param
,
err
)
model
.
Log
.
Errorf
(
"GetApplyList param:%v, err:%v"
,
param
,
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