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
d01e0533
Commit
d01e0533
authored
Aug 29, 2024
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8cf5020d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
15 deletions
+62
-15
RB_Customer_Category.cs
Edu.Model/Entity/Customer/RB_Customer_Category.cs
+12
-1
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+42
-14
CustomerModule.cs
Edu.Module.Customer/CustomerModule.cs
+2
-0
B2BCustomerController.cs
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
+6
-0
No files found.
Edu.Model/Entity/Customer/RB_Customer_Category.cs
View file @
d01e0533
...
...
@@ -73,5 +73,16 @@ namespace Edu.Model.Entity.Customer
/// 合同附件
/// </summary>
public
string
ContractUrl
{
get
;
set
;
}
}
/// <summary>
/// 返佣比例
/// </summary>
public
decimal
RebateRate
{
get
;
set
;
}
/// <summary>
/// 固定返佣金额
/// </summary>
public
decimal
RebateMoney
{
get
;
set
;
}
}
}
Edu.Module.Course/OrderModule.cs
View file @
d01e0533
...
...
@@ -129,6 +129,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_CustomerRepository
customerRepository
=
new
RB_CustomerRepository
();
/// <summary>
/// 同行资料
/// </summary>
private
readonly
RB_Customer_CategoryRepository
customer_CategoryRepository
=
new
RB_Customer_CategoryRepository
();
/// <summary>
/// 学生关联
/// </summary>
...
...
@@ -450,7 +455,8 @@ namespace Edu.Module.Course
CommissionType
=
orderCount
==
0
?
1
:
2
,
SchoolId
=
model
.
School_Id
,
GroupId
=
model
.
Group_Id
,
Remark
=
""
Remark
=
""
,
};
if
(
model
.
OrderType
==
OrderTypeEnum
.
CourseOrder
)
{
...
...
@@ -634,33 +640,55 @@ namespace Edu.Module.Course
else
if
((
int
)
m
.
OrderSourceType
==
2
)
{
var
customerModel
=
customerRepository
.
GetEntity
(
m
.
OrderSourceId
);
if
(
customerModel
.
CustomerType
==
Common
.
Enum
.
Customer
.
CatetoryTypeEnum
.
Company
)
var
customerCompany
=
customer_CategoryRepository
.
GetEntity
(
customerModel
.
CategoryId
);
//验证订单是否 续费订单
var
orderModel
=
orderRepository
.
GetEntity
(
m
.
OrderId
);
if
(
orderModel
.
JoinType
==
OrderJoinTypeEnum
.
Normal
&&
(
customerCompany
.
RebateRate
>
0
||
customerCompany
.
RebateMoney
>
0
))
{
if
(
courseModel
.
CommissionReType
==
1
)
//同业返佣 只有首单反, 直接默认 次月全提
if
(
customerCompany
.
RebateRate
>
0
)
{
m
.
CommissionMoeny
=
Math
.
Round
(
sellPrice
*
(
(
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatio
:
courseModel
.
B2BReNewRatio
)
/
100
),
2
,
MidpointRounding
.
AwayFromZero
);
m
.
CommissionMoeny
=
Math
.
Round
(
sellPrice
*
(
customerCompany
.
RebateRate
/
100
),
2
,
MidpointRounding
.
AwayFromZero
);
}
else
{
m
.
CommissionMoeny
=
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatio
:
courseModel
.
B2BReNewRatio
;
m
.
CommissionMoeny
=
customerCompany
.
RebateMoney
;
}
m
.
CommissionReType
=
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatioType
.
ToInt
()
:
courseModel
.
B2BReNewRatioType
.
ToInt
()
;
m
.
CommissionReValue
=
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatioValue
:
courseModel
.
B2BReNewRatioValue
;
m
.
Remark
=
$"学员来源为:同业,学员为
{(
m
.
CommissionType
==
1
?
"首次报名"
:
"续费报名"
)}
,本次报名金额为:
{
sellPrice
}
,本次返佣金额为:
{
m
.
CommissionMoeny
:
0.00
}
"
;
m
.
CommissionReType
=
(
int
)
CourseRebateSetEnum
.
NextMonth
;
m
.
CommissionReValue
=
0
;
m
.
Remark
=
$"学员来源为:同业,学员为
首次报名
,本次报名金额为:
{
sellPrice
}
,本次返佣金额为:
{
m
.
CommissionMoeny
:
0.00
}
"
;
}
else
{
if
(
courseModel
.
CommissionReType
==
1
)
//走课程配置
if
(
customerModel
.
CustomerType
==
Common
.
Enum
.
Customer
.
CatetoryTypeEnum
.
Company
)
{
m
.
CommissionMoeny
=
Math
.
Round
(
sellPrice
*
((
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatio
:
courseModel
.
SchoolReNewRatio
)
/
100
),
2
,
MidpointRounding
.
AwayFromZero
);
if
(
courseModel
.
CommissionReType
==
1
)
{
m
.
CommissionMoeny
=
Math
.
Round
(
sellPrice
*
((
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatio
:
courseModel
.
B2BReNewRatio
)
/
100
),
2
,
MidpointRounding
.
AwayFromZero
);
}
else
{
m
.
CommissionMoeny
=
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatio
:
courseModel
.
B2BReNewRatio
;
}
m
.
CommissionReType
=
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatioType
.
ToInt
()
:
courseModel
.
B2BReNewRatioType
.
ToInt
();
m
.
CommissionReValue
=
m
.
CommissionType
==
1
?
courseModel
.
B2BRebateRatioValue
:
courseModel
.
B2BReNewRatioValue
;
m
.
Remark
=
$"学员来源为:同业,学员为
{(
m
.
CommissionType
==
1
?
"首次报名"
:
"续费报名"
)}
,本次报名金额为:
{
sellPrice
}
,本次返佣金额为:
{
m
.
CommissionMoeny
:
0.00
}
"
;
}
else
{
m
.
CommissionMoeny
=
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatio
:
courseModel
.
SchoolReNewRatio
;
if
(
courseModel
.
CommissionReType
==
1
)
{
m
.
CommissionMoeny
=
Math
.
Round
(
sellPrice
*
((
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatio
:
courseModel
.
SchoolReNewRatio
)
/
100
),
2
,
MidpointRounding
.
AwayFromZero
);
}
else
{
m
.
CommissionMoeny
=
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatio
:
courseModel
.
SchoolReNewRatio
;
}
m
.
CommissionReType
=
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatioType
.
ToInt
()
:
courseModel
.
SchoolReNewRatioType
.
ToInt
();
m
.
CommissionReValue
=
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatioValue
:
courseModel
.
SchoolReNewRatioValue
;
m
.
Remark
=
$"学员来源为:校代,学员为
{(
m
.
CommissionType
==
1
?
"首次报名"
:
"续费报名"
)}
,本次报名金额为:
{
sellPrice
}
,本次返佣金额为:
{
m
.
CommissionMoeny
:
0.00
}
"
;
}
m
.
CommissionReType
=
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatioType
.
ToInt
()
:
courseModel
.
SchoolReNewRatioType
.
ToInt
();
m
.
CommissionReValue
=
m
.
CommissionType
==
1
?
courseModel
.
SchoolRebateRatioValue
:
courseModel
.
SchoolReNewRatioValue
;
m
.
Remark
=
$"学员来源为:校代,学员为
{(
m
.
CommissionType
==
1
?
"首次报名"
:
"续费报名"
)}
,本次报名金额为:
{
sellPrice
}
,本次返佣金额为:
{
m
.
CommissionMoeny
:
0.00
}
"
;
}
}
else
if
((
int
)
m
.
OrderSourceType
==
3
)
...
...
Edu.Module.Customer/CustomerModule.cs
View file @
d01e0533
...
...
@@ -660,6 +660,8 @@ namespace Edu.Module.Customer
{
nameof
(
RB_Customer_Category_Extend
.
UpdateTime
),
model
.
UpdateTime
},
{
nameof
(
RB_Customer_Category_Extend
.
IsContract
),
model
.
IsContract
},
{
nameof
(
RB_Customer_Category_Extend
.
ContractUrl
),
model
.
ContractUrl
},
{
nameof
(
RB_Customer_Category_Extend
.
RebateRate
),
model
.
RebateRate
},
{
nameof
(
RB_Customer_Category_Extend
.
RebateMoney
),
model
.
RebateMoney
},
};
flag
=
customer_CategoryRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Customer_Category_Extend
.
CategoryId
),
model
.
CategoryId
));
}
...
...
Edu.WebApi/Controllers/Customer/B2BCustomerController.cs
View file @
d01e0533
...
...
@@ -973,6 +973,8 @@ namespace Edu.WebApi.Controllers.Customer
item
.
OrderCount
,
item
.
IsContract
,
item
.
ContractUrl
,
item
.
RebateRate
,
item
.
RebateMoney
,
CatetoryTypeName
=
item
.
CatetoryType
.
ToName
(),
CreateTime
=
Common
.
ConvertHelper
.
FormatTime
(
item
.
CreateTime
),
});
...
...
@@ -1097,6 +1099,8 @@ namespace Edu.WebApi.Controllers.Customer
CatetoryType
=
(
CatetoryTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"CatetoryType"
),
IsContract
=
base
.
ParmJObj
.
GetInt
(
"IsContract"
),
ContractUrl
=
base
.
ParmJObj
.
GetStringValue
(
"ContractUrl"
),
RebateRate
=
base
.
ParmJObj
.
GetDecimal
(
"RebateRate"
),
RebateMoney
=
base
.
ParmJObj
.
GetDecimal
(
"RebateMoney"
),
};
var
linkMan
=
base
.
ParmJObj
.
GetStringValue
(
"linkMan"
);
var
linkTel
=
base
.
ParmJObj
.
GetStringValue
(
"linkTel"
);
...
...
@@ -1179,6 +1183,8 @@ namespace Edu.WebApi.Controllers.Customer
CatetoryTypeName
=
extModel
?.
CatetoryType
.
ToName
()??
""
,
extModel
?.
ContractUrl
,
extModel
?.
IsContract
,
extModel
?.
RebateRate
,
extModel
?.
RebateMoney
};
return
ApiResult
.
Success
(
data
:
obj
);
}
...
...
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