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
a824e4bb
Commit
a824e4bb
authored
Apr 03, 2023
by
chenweijian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
封控
parent
2ce37d3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
diamond.go
domain/service/diamond_s/diamond.go
+18
-0
No files found.
domain/service/diamond_s/diamond.go
View file @
a824e4bb
package
diamond_s
import
(
"errors"
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/resource/mysql"
...
...
@@ -8,6 +9,7 @@ import (
"hilo-group/domain/model/diamond_m"
"hilo-group/domain/model/groupPower_m"
"hilo-group/domain/model/res_m"
"hilo-group/domain/model/user_m"
"hilo-group/myerr"
"hilo-group/myerr/bizerr"
)
...
...
@@ -24,6 +26,22 @@ func NewDiamondService(myContext *mycontext.MyContext) *DiamondService {
// 币商转账钻石-家族限制检查
func
(
this
*
DiamondService
)
CheckDealerTransferFamilyLimit
(
dealerId
,
userId
uint64
,
lang
string
)
error
{
model
:=
domain
.
CreateModelContext
(
this
.
svc
.
MyContext
)
//获取国家信息
_
,
dealerArea
,
err
:=
user_m
.
GetUserCountryArea
(
model
,
dealerId
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CheckDealerTransferFamilyLimit 获取国家资源错误 dealerId:%d, err:%v"
,
dealerId
,
err
)
return
err
}
_
,
area
,
err
:=
user_m
.
GetUserCountryArea
(
model
,
userId
)
if
err
!=
nil
{
model
.
Log
.
Errorf
(
"CheckDealerTransferFamilyLimit 获取国家资源错误 userId:%d, err:%v"
,
userId
,
err
)
return
err
}
if
dealerArea
!=
area
{
return
errors
.
New
(
"fail"
)
}
// 代理、用户是否加入了家族
dealerFamily
,
err
:=
groupPower_m
.
GetGroupPowerUserOrNil
(
model
,
dealerId
)
if
err
!=
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