Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
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
黄奎
Education
Commits
a5d3e2fd
Commit
a5d3e2fd
authored
Dec 14, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bddb6bb6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
12 deletions
+47
-12
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+36
-11
RB_StudentRepository.cs
Edu.Repository/User/RB_StudentRepository.cs
+4
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+7
-1
No files found.
Edu.Module.Course/OrderModule.cs
View file @
a5d3e2fd
...
...
@@ -417,16 +417,32 @@ namespace Edu.Module.Course
var
courseModel
=
courseRepository
.
GetEntity
(
demodel
.
CourseId
);
decimal
coursePrice
=
courseModel
.
SellPrice
;
//课程最低单价
#
region
课程比例赋值
demodel
.
B2CRatio
=
courseModel
.
B2CRatio
;
demodel
.
B2CReNewRatio
=
courseModel
.
B2CReNewRatio
;
demodel
.
B2BRebateRatio
=
courseModel
.
B2BRebateRatio
;
demodel
.
B2BReNewRatio
=
courseModel
.
B2BReNewRatio
;
demodel
.
SchoolRebateRatio
=
courseModel
.
SchoolRebateRatio
;
demodel
.
SchoolReNewRatio
=
courseModel
.
SchoolReNewRatio
;
demodel
.
TransIntroductceRatio
=
courseModel
.
TransIntroductceRatio
;
demodel
.
TransIntroductceReNewRatio
=
courseModel
.
TransIntroductceReNewRatio
;
demodel
.
InnerRecommendRatio
=
courseModel
.
InnerRecommendRatio
;
demodel
.
InnerRecommendReNewRatio
=
courseModel
.
InnerRecommendReNewRatio
;
if
(
demodel
.
OrderId
<=
0
)
{
demodel
.
B2CRatio
=
courseModel
.
B2CRatio
;
demodel
.
B2CReNewRatio
=
courseModel
.
B2CReNewRatio
;
demodel
.
B2BRebateRatio
=
courseModel
.
B2BRebateRatio
;
demodel
.
B2BReNewRatio
=
courseModel
.
B2BReNewRatio
;
demodel
.
SchoolRebateRatio
=
courseModel
.
SchoolRebateRatio
;
demodel
.
SchoolReNewRatio
=
courseModel
.
SchoolReNewRatio
;
demodel
.
TransIntroductceRatio
=
courseModel
.
TransIntroductceRatio
;
demodel
.
TransIntroductceReNewRatio
=
courseModel
.
TransIntroductceReNewRatio
;
demodel
.
InnerRecommendRatio
=
courseModel
.
InnerRecommendRatio
;
demodel
.
InnerRecommendReNewRatio
=
courseModel
.
InnerRecommendReNewRatio
;
}
else
{
//使用订单的比例
courseModel
.
B2CRatio
=
orderModel
.
B2CRatio
;
courseModel
.
B2CReNewRatio
=
orderModel
.
B2CReNewRatio
;
courseModel
.
B2BRebateRatio
=
orderModel
.
B2BRebateRatio
;
courseModel
.
B2BReNewRatio
=
orderModel
.
B2BReNewRatio
;
courseModel
.
SchoolRebateRatio
=
orderModel
.
SchoolRebateRatio
;
courseModel
.
SchoolReNewRatio
=
orderModel
.
SchoolReNewRatio
;
courseModel
.
TransIntroductceRatio
=
orderModel
.
TransIntroductceRatio
;
courseModel
.
TransIntroductceReNewRatio
=
orderModel
.
TransIntroductceReNewRatio
;
courseModel
.
InnerRecommendRatio
=
orderModel
.
InnerRecommendRatio
;
courseModel
.
InnerRecommendReNewRatio
=
orderModel
.
InnerRecommendReNewRatio
;
}
#
endregion
#
region
计算订单优惠信息
List
<
RB_Student_ViewModel
>
StuList
=
new
List
<
RB_Student_ViewModel
>();
...
...
@@ -2337,6 +2353,15 @@ namespace Edu.Module.Course
//新增学员信息
else
{
#
region
验证电话是否已是他人客户
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Mobile
))
{
var
slist
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
Group_Id
=
dmodel
.
Group_Id
,
StuTel
=
dmodel
.
Mobile
});
if
(
slist
.
Where
(
x
=>
x
.
CustomerId
!=
ordermodel
.
CustomerId
).
Any
())
{
message
=
"学员'"
+
dmodel
.
GuestName
+
"'已被他人注册"
;
return
false
;
}
}
#
endregion
dmodel
.
ClassId
=
ordermodel
.
ClassId
;
dmodel
.
SourceId
=
ordermodel
.
SourceId
;
int
GuestNum
=
order_GuestRepository
.
GetOrderGuestNumRepository
(
new
RB_Order_Guest_ViewModel
()
{
OrderId
=
dmodel
.
OrderId
,
GuestState
=
GuestStateEnum
.
Normal
});
...
...
@@ -2423,7 +2448,7 @@ namespace Edu.Module.Course
UpdateBy
=
dmodel
.
CreateBy
,
UpdateTime
=
DateTime
.
Now
,
CustomerId
=
ordermodel
.
CustomerId
,
StuStage
=
Common
.
Enum
.
User
.
StuStageEnum
.
NewStu
StuStage
=
Common
.
Enum
.
User
.
StuStageEnum
.
Clinch
};
studentRepository
.
SetStudentRepository
(
stuModel
);
...
...
Edu.Repository/User/RB_StudentRepository.cs
View file @
a5d3e2fd
...
...
@@ -79,6 +79,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
AreaId
),
query
.
AreaId
);
}
if
(
query
.
CustomerId
>
0
)
{
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Student_ViewModel
.
CustomerId
),
query
.
CustomerId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StuIds
))
{
builder
.
AppendFormat
(
" AND t.{0} in({1}) "
,
nameof
(
RB_Student_ViewModel
.
StuId
),
query
.
StuIds
);
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
a5d3e2fd
...
...
@@ -697,7 +697,13 @@ namespace Edu.WebApi.Controllers.Course
model
.
TargetOrderId
,
model
.
CustomerId
,
model
.
CourseConsultantId
,
model
.
OrderIdentify
model
.
OrderIdentify
,
model
.
B2CRatio
,
model
.
B2CReNewRatio
,
model
.
B2BRebateRatio
,
model
.
B2BReNewRatio
,
model
.
SchoolRebateRatio
,
model
.
SchoolReNewRatio
},
StepPriceList
=
list
.
Select
(
x
=>
new
{
...
...
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