Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
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
hujiebin
hilo-group
Commits
2ce37d3f
Commit
2ce37d3f
authored
Apr 03, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/send_msg_after_noble' into 'master'
代理家族限制 See merge request
!9
parents
67801c2c
b8c7c4b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
diamond.go
domain/service/diamond_s/diamond.go
+13
-13
No files found.
domain/service/diamond_s/diamond.go
View file @
2ce37d3f
...
...
@@ -40,25 +40,25 @@ func (this *DiamondService) CheckDealerTransferFamilyLimit(dealerId, userId uint
return
err
}
// 用户的家族是否有家族代理
var
userHasFamilyAgent
bool
if
userFamily
!=
nil
{
userHasFamilyAgent
,
err
=
groupPower_m
.
IsGroupPowerHasFamilyAgent
(
model
,
userFamily
.
GroupPowerId
)
if
err
!=
nil
{
return
err
}
}
//
var userHasFamilyAgent bool
//
if userFamily != nil {
//
userHasFamilyAgent, err = groupPower_m.IsGroupPowerHasFamilyAgent(model, userFamily.GroupPowerId)
//
if err != nil {
//
return err
//
}
//
}
if
dealerFamily
!=
nil
&&
dealerFamily
.
GroupPowerId
>
0
{
// 代理加入了家族
if
isFamilyAgent
&&
(
userFamily
==
nil
||
userFamily
.
GroupPowerId
!=
dealerFamily
.
GroupPowerId
)
{
// 是家族代理:只能向本家族成员转移钻石,如果向非家族成员转移钻石,则提示“非家族成员”
return
myerr
.
WrapErr
(
res_m
.
GetErrByLanguage
(
model
.
Db
,
common
.
MSG_ID_NOT_FAMILY_MEMBER
,
lang
,
bizerr
.
GroupPowerDealerNotMember
))
}
if
!
isFamilyAgent
&&
userHasFamilyAgent
{
// 不是家族代理:如果用户加入了家族,且家族中有家族代理,那么也不能,“此用户已有家族代理,不能出售钻石”
return
myerr
.
WrapErr
(
res_m
.
GetErrByLanguage
(
model
.
Db
,
common
.
MSG_ID_DEALER_CAN_NOT_SOLE
,
lang
,
bizerr
.
GroupPowerDealerCanNotSole
))
}
//
if !isFamilyAgent && userHasFamilyAgent { // 不是家族代理:如果用户加入了家族,且家族中有家族代理,那么也不能,“此用户已有家族代理,不能出售钻石”
//
return myerr.WrapErr(res_m.GetErrByLanguage(model.Db, common.MSG_ID_DEALER_CAN_NOT_SOLE, lang, bizerr.GroupPowerDealerCanNotSole))
//
}
}
else
{
// 代理没有加入家族的
// 普通代理:不能向已经加入家族的成员(并且家族有家族代理)转移钻石,如果转移则提示“此用户已有家族代理,不能出售钻石”
if
userHasFamilyAgent
{
return
myerr
.
WrapErr
(
res_m
.
GetErrByLanguage
(
model
.
Db
,
common
.
MSG_ID_DEALER_CAN_NOT_SOLE
,
lang
,
bizerr
.
GroupPowerDealerCanNotSole
))
}
//
if userHasFamilyAgent {
//
return myerr.WrapErr(res_m.GetErrByLanguage(model.Db, common.MSG_ID_DEALER_CAN_NOT_SOLE, lang, bizerr.GroupPowerDealerCanNotSole))
//
}
}
return
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