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
cb8518a4
Commit
cb8518a4
authored
Aug 21, 2023
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 调整老师 试听提成
parent
5462b9e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
4 deletions
+32
-4
SellAchievementsModule.cs
Edu.Module.Course/SellAchievementsModule.cs
+17
-4
RB_Student_AssistRepository.cs
Edu.Repository/Customer/RB_Student_AssistRepository.cs
+15
-0
No files found.
Edu.Module.Course/SellAchievementsModule.cs
View file @
cb8518a4
...
...
@@ -795,11 +795,19 @@ namespace Edu.Module.Course
{
//再次查询学生
string
OrderIds
=
string
.
Join
(
","
,
orderList
.
Where
(
x
=>
x
.
JoinType
==
Common
.
Enum
.
Sale
.
OrderJoinTypeEnum
.
Normal
).
Select
(
x
=>
x
.
OrderId
));
var
saList
=
student_AssistRepository
.
GetAssistTeacherForOrder
(
OrderIds
);
var
saList
=
student_AssistRepository
.
GetAssistTeacherForOrder
(
OrderIds
);
//转介绍 2%提成
var
stList
=
student_AssistRepository
.
GetTrialTeacher
(
OrderIds
,
userInfo
.
Group_Id
);
//试听 1%提成
//重新关联一下订单的 转介绍老师
foreach
(
var
item
in
orderList
.
Where
(
x
=>
x
.
JoinType
==
Common
.
Enum
.
Sale
.
OrderJoinTypeEnum
.
Normal
))
{
//if (item.HelpEnterId > 0) { continue; }
item
.
HelpEnterId
=
saList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
FirstOrDefault
()?.
AssistId
??
0
;
//
item
.
HelpEnterId
=
saList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
FirstOrDefault
()?.
AssistId
??
0
;
item
.
ClassScrollType
=
1
;
//再次查询此订单学员是否走试听 试听拿 1%提成 如果是转介绍 就不拿试听提成 2023-08-21 LD
if
(
item
.
HelpEnterId
<=
0
)
{
item
.
HelpEnterId
=
stList
.
Where
(
x
=>
x
.
OrderId
==
item
.
OrderId
).
FirstOrDefault
()?.
AssistId
??
0
;
item
.
ClassScrollType
=
2
;
}
}
}
...
...
@@ -822,10 +830,15 @@ namespace Edu.Module.Course
TRate
=
Convert
.
ToDecimal
(
TeacherRuleList
.
Where
(
x
=>
x
.
SNO
==
4
).
FirstOrDefault
()?.
Content
??
"0"
);
Remark
=
"教师续费订单提成:订单b2b返佣:"
+
bdCommission
+
";订单业绩:"
+
(
qitem
.
PreferPrice
-
qitem
.
DiscountMoney
-
bdCommission
);
}
else
else
if
(
qitem
.
ClassScrollType
==
1
)
{
//
新订单
//
转介绍
TRate
=
Convert
.
ToDecimal
(
TeacherRuleList
.
Where
(
x
=>
x
.
SNO
==
1
).
FirstOrDefault
()?.
Content
??
"0"
);
Remark
=
"教师转介绍订单提成:订单b2b返佣:"
+
bdCommission
+
";订单业绩:"
+
(
qitem
.
PreferPrice
-
qitem
.
DiscountMoney
-
bdCommission
);
}
else
if
(
qitem
.
ClassScrollType
==
2
)
{
//新订单
TRate
=
Convert
.
ToDecimal
(
TeacherRuleList
.
Where
(
x
=>
x
.
SNO
==
5
).
FirstOrDefault
()?.
Content
??
"0"
);
Remark
=
"教师试听订单提成:订单b2b返佣:"
+
bdCommission
+
";订单业绩:"
+
(
qitem
.
PreferPrice
-
qitem
.
DiscountMoney
-
bdCommission
);
}
if
(
qitem
.
JoinType
==
Common
.
Enum
.
Sale
.
OrderJoinTypeEnum
.
Normal
&&
qitem
.
OrderType
==
Common
.
Enum
.
Sale
.
OrderTypeEnum
.
StudyabroadOrder
)
{
...
...
Edu.Repository/Customer/RB_Student_AssistRepository.cs
View file @
cb8518a4
...
...
@@ -80,5 +80,20 @@ INNER JOIN rb_account ac on a.AssistId = ac.Id
WHERE og.`Status` =0 and a.`Status` =0 and og.OrderId in(
{
orderIds
}
) and a.AssistType =4 and s.CreateType =4 and ac.AccountType =2"
;
return
Get
<
RB_Student_Assist_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取试听老师
/// </summary>
/// <param name="orderIds"></param>
/// <returns></returns>
public
List
<
RB_Student_Assist_Extend
>
GetTrialTeacher
(
string
orderIds
,
int
groupId
)
{
string
sql
=
$@"SELECT g.OrderId,c.TeacherId,ac.Id as AssistId FROM rb_visitor_reserve r
left JOIN rb_reserve_class c on r.ReserveClassId = c.ReserveClassId
left join rb_student_orderguest g on r.Visitor_Id = g.Student_Id
left join rb_account ac on ac.AccountId = c.TeacherId and ac.AccountType =2
WHERE r.Group_Id =
{
groupId
}
and r.`Status` =0 and c.`Status` =0 and og.`Status` =0 and g.OrderId in(
{
orderIds
}
)"
;
return
Get
<
RB_Student_Assist_Extend
>(
sql
).
ToList
();
}
}
}
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