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
Compare Revisions
master...fix/add_common_charge_country
Source
fix/add_common_charge_country
Select Git revision
...
Target
master
Select Git revision
Compare
Commits (2)
封控
· a824e4bb
chenweijian
authored
Apr 03, 2023
a824e4bb
错误码
· 4b169c69
chenweijian
authored
Apr 04, 2023
4b169c69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
diamond.go
domain/service/diamond_s/diamond.go
+17
-0
bizCode.go
myerr/bizerr/bizCode.go
+1
-0
No files found.
domain/service/diamond_s/diamond.go
View file @
4b169c69
...
@@ -8,6 +8,7 @@ import (
...
@@ -8,6 +8,7 @@ import (
"hilo-group/domain/model/diamond_m"
"hilo-group/domain/model/diamond_m"
"hilo-group/domain/model/groupPower_m"
"hilo-group/domain/model/groupPower_m"
"hilo-group/domain/model/res_m"
"hilo-group/domain/model/res_m"
"hilo-group/domain/model/user_m"
"hilo-group/myerr"
"hilo-group/myerr"
"hilo-group/myerr/bizerr"
"hilo-group/myerr/bizerr"
)
)
...
@@ -24,6 +25,22 @@ func NewDiamondService(myContext *mycontext.MyContext) *DiamondService {
...
@@ -24,6 +25,22 @@ func NewDiamondService(myContext *mycontext.MyContext) *DiamondService {
// 币商转账钻石-家族限制检查
// 币商转账钻石-家族限制检查
func
(
this
*
DiamondService
)
CheckDealerTransferFamilyLimit
(
dealerId
,
userId
uint64
,
lang
string
)
error
{
func
(
this
*
DiamondService
)
CheckDealerTransferFamilyLimit
(
dealerId
,
userId
uint64
,
lang
string
)
error
{
model
:=
domain
.
CreateModelContext
(
this
.
svc
.
MyContext
)
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
bizerr
.
DealerCannotSaleToOtherArea
}
// 代理、用户是否加入了家族
// 代理、用户是否加入了家族
dealerFamily
,
err
:=
groupPower_m
.
GetGroupPowerUserOrNil
(
model
,
dealerId
)
dealerFamily
,
err
:=
groupPower_m
.
GetGroupPowerUserOrNil
(
model
,
dealerId
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
myerr/bizerr/bizCode.go
View file @
4b169c69
...
@@ -94,6 +94,7 @@ var (
...
@@ -94,6 +94,7 @@ var (
GroupPowerChangeNameplate
=
myerr
.
NewBusinessCode
(
15021
,
"Can only be modified at the silver level"
,
myerr
.
BusinessData
{})
// 修改铭牌不够等级
GroupPowerChangeNameplate
=
myerr
.
NewBusinessCode
(
15021
,
"Can only be modified at the silver level"
,
myerr
.
BusinessData
{})
// 修改铭牌不够等级
GroupPowerMemberMax
=
myerr
.
NewBusinessCode
(
15022
,
"The family size has reached the upper limit"
,
myerr
.
BusinessData
{})
// 家族人数达到上限
GroupPowerMemberMax
=
myerr
.
NewBusinessCode
(
15022
,
"The family size has reached the upper limit"
,
myerr
.
BusinessData
{})
// 家族人数达到上限
GroupPowerCannotJoin
=
myerr
.
NewBusinessCode
(
15023
,
"You cannot join"
,
myerr
.
BusinessData
{})
// 不能加入家族
GroupPowerCannotJoin
=
myerr
.
NewBusinessCode
(
15023
,
"You cannot join"
,
myerr
.
BusinessData
{})
// 不能加入家族
DealerCannotSaleToOtherArea
=
myerr
.
NewBusinessCode
(
15024
,
"Fail"
,
myerr
.
BusinessData
{})
// 代理转账失败-不同地区
TaskHasAward
=
myerr
.
NewBusinessCode
(
19001
,
"task has award"
,
myerr
.
BusinessData
{})
TaskHasAward
=
myerr
.
NewBusinessCode
(
19001
,
"task has award"
,
myerr
.
BusinessData
{})
...
...