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
1cd93831
Commit
1cd93831
authored
Dec 14, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
eaf8f986
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
261 additions
and
9 deletions
+261
-9
RB_Order.cs
Edu.Model/Entity/Sell/RB_Order.cs
+5
-0
RB_Order_ViewModel.cs
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
+10
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+171
-7
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+47
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+27
-2
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+1
-0
No files found.
Edu.Model/Entity/Sell/RB_Order.cs
View file @
1cd93831
...
...
@@ -425,5 +425,10 @@ namespace Edu.Model.Entity.Sell
/// 內推续费返佣比例
/// </summary>
public
decimal
InnerRecommendReNewRatio
{
get
;
set
;
}
/// <summary>
/// 订单标识 1产品下单 2客户转订单
/// </summary>
public
int
OrderIdentify
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Sell/RB_Order_ViewModel.cs
View file @
1cd93831
...
...
@@ -284,5 +284,15 @@ namespace Edu.Model.ViewModel.Sell
/// 课程图标
/// </summary>
public
string
B2BIcon
{
get
;
set
;
}
/// <summary>
/// 预计正常返佣
/// </summary>
public
decimal
NormalCommission
{
get
;
set
;
}
/// <summary>
/// 预计续费返佣
/// </summary>
public
decimal
RenewCommission
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/OrderModule.cs
View file @
1cd93831
This diff is collapsed.
Click to expand it.
Edu.Module.Course/OrderModule2.cs
View file @
1cd93831
...
...
@@ -18,6 +18,7 @@ using Edu.Model.Entity.Contract;
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Contract
;
using
Edu.Common.Enum.Course
;
using
Edu.Model.ViewModel.User
;
namespace
Edu.Module.Course
{
...
...
@@ -298,5 +299,51 @@ namespace Edu.Module.Course
}
return
flag
;
}
/// <summary>
/// 获取客户转订单时客户的续费状态
/// </summary>
/// <param name="stuIds"></param>
/// <param name="userInfo"></param>
/// <param name="msg"></param>
/// <returns></returns>
public
object
GetOrderGuestRenewState
(
string
stuIds
,
UserInfo
userInfo
,
out
string
message
)
{
message
=
""
;
//查询学生列表
var
StuList
=
studentRepository
.
GetStudentListRepository
(
new
RB_Student_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
StuIds
=
stuIds
});
//根据客人手机号码 验证是否是续费
if
(
StuList
.
Select
(
x
=>
x
.
CustomerId
).
Distinct
().
Count
()
>
1
)
{
message
=
"只能选择同一同行的客户报名"
;
return
false
;
}
int
CustomerId
=
StuList
.
FirstOrDefault
().
CustomerId
;
var
glist
=
order_GuestRepository
.
GetGuestListForMobile
(
StuList
.
Select
(
x
=>
x
.
StuTel
).
ToList
(),
CustomerId
,
userInfo
.
Group_Id
);
if
(
glist
.
Any
())
{
foreach
(
var
item
in
StuList
)
{
if
(
glist
.
Where
(
x
=>
x
.
Mobile
==
item
.
StuTel
).
Any
())
{
item
.
IsRenewGuest
=
1
;
//是续费的
}
}
}
int
RenewNum
=
glist
.
Select
(
x
=>
x
.
Mobile
).
Distinct
().
Count
();
//续费订单数量
return
new
{
CustomerId
,
RenewNum
,
StuList
=
StuList
.
Select
(
x
=>
new
{
x
.
StuId
,
x
.
StuName
,
x
.
StuTel
,
x
.
IsRenewGuest
})
};
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
1cd93831
...
...
@@ -464,6 +464,27 @@ namespace Edu.WebApi.Controllers.Course
}));
}
/// <summary>
/// 获取客户转订单续费状态
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderGuestRenewState
()
{
var
userInfo
=
base
.
UserInfo
;
string
StuIds
=
base
.
ParmJObj
.
GetStringValue
(
"StuIds"
);
if
(
string
.
IsNullOrEmpty
(
StuIds
))
{
return
ApiResult
.
ParamIsNull
(
"请传递学生名单"
);
}
var
Robj
=
orderModule
.
GetOrderGuestRenewState
(
StuIds
,
userInfo
,
out
string
msg
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
(
""
,
Robj
);
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
/// <summary>
/// 新增修改订单
...
...
@@ -503,7 +524,8 @@ namespace Edu.WebApi.Controllers.Course
LessPrice
=
base
.
ParmJObj
.
GetDecimal
(
"LessPrice"
),
PerLessMoney
=
base
.
ParmJObj
.
GetDecimal
(
"PerLessMoney"
),
CustomerId
=
base
.
ParmJObj
.
GetInt
(
"CustomerId"
),
StuIds
=
base
.
ParmJObj
.
GetStringValue
(
"StuIds"
)
StuIds
=
base
.
ParmJObj
.
GetStringValue
(
"StuIds"
),
OrderIdentify
=
base
.
ParmJObj
.
GetInt
(
"OrderIdentify"
),
};
var
IsInsertClass
=
base
.
ParmJObj
.
GetInt
(
"IsChaBan"
);
if
(
IsInsertClass
==
1
)
...
...
@@ -526,7 +548,10 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
ParamIsNull
(
"请选择客人来源"
);
}
if
(
demodel
.
OrderIdentify
==
2
&&
string
.
IsNullOrEmpty
(
demodel
.
StuIds
))
{
return
ApiResult
.
ParamIsNull
(
"请传递选择客户"
);
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
StuIds
))
{
int
gNum
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
"["
+
demodel
.
StuIds
+
"]"
).
Count
();
if
(
demodel
.
GuestNum
!=
gNum
)
{
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
1cd93831
...
...
@@ -696,6 +696,7 @@ namespace Edu.WebApi.Controllers.User
item
.
StuChannel
,
StuChannelName
=
item
.
StuChannel
.
ToName
(),
item
.
PlatformName
,
item
.
CustomerId
,
AssistList
=
item
.
AssistList
.
Select
(
qitem
=>
new
{
qitem
.
Id
,
...
...
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