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
b66ca4c9
Commit
b66ca4c9
authored
Mar 08, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动报名 点数验证
parent
ee021a43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
CommerceConsultModule.cs
Mall.Module.TradePavilion/CommerceConsultModule.cs
+8
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+3
-3
No files found.
Mall.Module.TradePavilion/CommerceConsultModule.cs
View file @
b66ca4c9
...
...
@@ -21,6 +21,10 @@ namespace Mall.Module.TradePavilion
/// </summary>
private
readonly
RB_Commerce_ConsultRepository
consultRepository
=
new
RB_Commerce_ConsultRepository
();
/// <summary>
/// 活动
/// </summary>
private
readonly
RB_Commerce_ActivityRepository
commerce_ActivityRepository
=
new
RB_Commerce_ActivityRepository
();
/// <summary>
/// 点数记录表
/// </summary>
private
readonly
RB_Member_PointBalanceRepository
member_PointBalanceRepository
=
new
RB_Member_PointBalanceRepository
();
...
...
@@ -117,6 +121,10 @@ namespace Mall.Module.TradePavilion
if
(
umodel
.
PointNum
<
model
.
Money
)
{
return
"您的星星值不足,请充值后再试"
;
}
var
actModel
=
commerce_ActivityRepository
.
GetEntity
(
model
.
ActivityId
);
if
(
actModel
==
null
)
{
return
"活动不存在"
;
}
if
(
model
.
UnitPrice
!=
actModel
.
Price
)
{
return
"单价有误"
;
}
if
(
model
.
Money
!=
model
.
UnitPrice
*
model
.
PeopleNum
)
{
return
"总价计算有误"
;
}
}
var
newId
=
consultRepository
.
Insert
(
model
);
model
.
Id
=
newId
;
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
b66ca4c9
...
...
@@ -418,9 +418,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
UserId
=
jObj
.
GetInt
(
"UserId"
),
LinkMan
=
jObj
.
GetStringValue
(
"LinkMan"
),
LinkTel
=
jObj
.
GetStringValue
(
"LinkTel"
),
PeopleNum
=
jObj
.
GetInt
(
"PeopleNum"
),
UnitPrice
=
jObj
.
GetInt
(
"UnitPrice"
),
Money
=
jObj
.
GetInt
(
"Money"
),
PeopleNum
=
jObj
.
GetInt
(
"PeopleNum"
,
0
),
UnitPrice
=
jObj
.
GetInt
(
"UnitPrice"
,
0
),
Money
=
jObj
.
GetInt
(
"Money"
,
0
),
Remark
=
jObj
.
GetStringValue
(
"Remark"
),
};
var
userInfo
=
AppletUserInfo
;
...
...
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