Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄奎
mall.oytour.com
Commits
dd9e5d36
Commit
dd9e5d36
authored
Jul 22, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员购买权益介绍
parent
abc6640f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
0 deletions
+74
-0
RB_Distributor_FXGrade.cs
Mall.Model/Entity/User/RB_Distributor_FXGrade.cs
+4
-0
UserModule.cs
Mall.Module.User/UserModule.cs
+48
-0
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+20
-0
UserController.cs
Mall.WebApi/Controllers/User/UserController.cs
+2
-0
No files found.
Mall.Model/Entity/User/RB_Distributor_FXGrade.cs
View file @
dd9e5d36
...
...
@@ -158,5 +158,9 @@ namespace Mall.Model.Entity.User
/// 年
/// </summary>
public
int
?
Year
{
get
;
set
;
}
/// <summary>
/// 会员权益描述
/// </summary>
public
string
Description
{
get
;
set
;
}
}
}
Mall.Module.User/UserModule.cs
View file @
dd9e5d36
...
...
@@ -4805,6 +4805,7 @@ namespace Mall.Module.User
{
nameof
(
RB_Distributor_FXGrade
.
UpgradeId
),
demodel
.
UpgradeId
},
{
nameof
(
RB_Distributor_FXGrade
.
UpdateDate
),
demodel
.
UpdateDate
},
{
nameof
(
RB_Distributor_FXGrade
.
DecimalType
),
demodel
.
DecimalType
},
{
nameof
(
RB_Distributor_FXGrade
.
Description
),
demodel
.
Description
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
...
...
@@ -4986,6 +4987,53 @@ namespace Mall.Module.User
return
0
;
}
/// <summary>
/// 获取粉象等级权益
/// </summary>
/// <param name="gradeId"></param>
/// <param name="userInfo"></param>
/// <returns></returns>
public
object
GetUserVipBuyRecommend
(
int
gradeId
,
AppletUserInfo
userInfo
)
{
var
FXList
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
fxgradeModel
=
FXList
.
Where
(
x
=>
x
.
Id
==
gradeId
).
FirstOrDefault
();
if
(
fxgradeModel
==
null
||
fxgradeModel
.
IsGuest
==
1
)
{
return
new
{
Status
=
2
,
Msg
=
"等级不存在"
};
}
var
pModel
=
FXList
.
Where
(
x
=>
x
.
IsGuest
==
1
).
FirstOrDefault
();
if
(
pModel
==
null
)
{
return
new
{
Status
=
2
,
Msg
=
"普通会员不存在"
};
}
var
vipModel
=
FXList
.
Where
(
x
=>
x
.
IsGuest
==
3
).
FirstOrDefault
();
if
(
vipModel
==
null
)
{
return
new
{
Status
=
2
,
Msg
=
"Vip会员不存在"
};
}
decimal
fxP
=
GetFXGradeRatioCommon
(
FXList
,
fxgradeModel
.
Id
,
pModel
.
Id
,
1
);
decimal
fxJP
=
GetFXGradeRatioCommon
(
FXList
,
fxgradeModel
.
Id
,
pModel
.
Id
,
2
);
var
mingradeModel
=
FXList
.
Where
(
x
=>
x
.
Grade
<
fxgradeModel
.
Grade
).
OrderBy
(
x
=>
x
.
Grade
).
FirstOrDefault
();
var
FXCList
=
distributor_FXCommissionRepository
.
GetFXCommissionList
(
new
RB_Distributor_FXCommission_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
decimal
fxVip
=
FXCList
.
Where
(
x
=>
x
.
FXGradeId
==
fxgradeModel
.
Id
&&
x
.
CommissionGradeId
==
vipModel
.
Id
&&
x
.
GradeType
==
1
).
FirstOrDefault
()?.
CommissionPrice
??
0
;
decimal
fxJVip
=
FXCList
.
Where
(
x
=>
x
.
FXGradeId
==
fxgradeModel
.
Id
&&
x
.
CommissionGradeId
==
vipModel
.
Id
&&
x
.
GradeType
==
2
).
FirstOrDefault
()?.
CommissionPrice
??
0
;
return
new
{
Status
=
1
,
Model
=
new
{
EarningsAdd
=
(
fxgradeModel
?.
CommissionRatio
??
0
)
-
(
mingradeModel
?.
CommissionRatio
??
0
),
FXPRate
=
fxP
,
FXJPRate
=
fxJP
,
FXVIP
=
fxVip
,
FXJVIP
=
fxJVip
,
fxgradeModel
.
Description
}
};
}
#
endregion
#
region
ERP
查询用户返佣
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
dd9e5d36
...
...
@@ -757,6 +757,26 @@ namespace Mall.WebApi.Controllers.User
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取用户vip购买 权益介绍
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetUserVipBuyRecommend
()
{
var
userInfo
=
AppletUserInfo
;
var
req
=
RequestParm
;
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
GradeId
=
prams
.
GetInt
(
"GradeId"
,
0
);
if
(
GradeId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
robj
=
userModule
.
GetUserVipBuyRecommend
(
GradeId
,
userInfo
);
return
ApiResult
.
Success
(
""
,
robj
);
}
#
endregion
#
region
会员中心
...
...
Mall.WebApi/Controllers/User/UserController.cs
View file @
dd9e5d36
...
...
@@ -2673,6 +2673,7 @@ namespace Mall.WebApi.Controllers.User
x
.
UpgradeNum
,
x
.
DecimalType
,
x
.
UpgradeId
,
x
.
Description
,
UpdateDate
=
x
.
UpdateDate
.
HasValue
?
x
.
UpdateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
});
return
ApiResult
.
Success
(
""
,
pagelist
);
...
...
@@ -2750,6 +2751,7 @@ namespace Mall.WebApi.Controllers.User
demodel
.
UpgradeNum
??=
0
;
demodel
.
UpgradeId
??=
0
;
demodel
.
DecimalType
??=
1
;
demodel
.
Description
??=
""
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
bool
flag
=
userModule
.
SetFXDistributorGradeInfo
(
demodel
);
...
...
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