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
e3aa76a3
Commit
e3aa76a3
authored
Jan 08, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
502dfe7e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
158 additions
and
31 deletions
+158
-31
SaleplatEnum.cs
Edu.Common/Enum/Course/SaleplatEnum.cs
+29
-0
RB_Course_StepPrice.cs
Edu.Model/Entity/Course/RB_Course_StepPrice.cs
+33
-23
RB_Course_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_ViewModel.cs
+31
-1
RB_Question_ViewModel.cs
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
+1
-0
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+52
-7
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+12
-0
No files found.
Edu.Common/Enum/Course/SaleplatEnum.cs
0 → 100644
View file @
e3aa76a3
using
Edu.Common.Plugin
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Common.Enum.Course
{
/// <summary>
/// 销售端口
/// </summary>
public
enum
SaleplatEnum
{
/// <summary>
/// 内部销售
/// </summary>
[
EnumField
(
"内部销售"
)]
InternalSales
=
1
,
/// <summary>
/// 学员App
/// </summary>
[
EnumField
(
"学员App"
)]
StudentApp
=
2
,
/// <summary>
/// 网课端
/// </summary>
[
EnumField
(
"网课端"
)]
OnlineClass
=
3
,
}
}
Edu.Model/Entity/Course/RB_Course_StepPrice.cs
View file @
e3aa76a3
...
...
@@ -3,31 +3,41 @@ using VT.FW.DB;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 课程阶梯价格实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_StepPrice
/// <summary>
/// 课程阶梯价格实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_StepPrice
{
/// <summary>
/// 主键
/// </summary>
public
int
CoursePriceId
{
get
;
set
;
}
/// <summary>
/// 主键
/// </summary>
public
int
CoursePriceId
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 课程编号
/// </summary>
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
int
PersionNum
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
int
PersionNum
{
get
;
set
;
}
/// <summary>
/// 售价
/// </summary>
public
decimal
SellPrice
{
get
;
set
;
}
}
/// <summary>
/// 售价
/// </summary>
public
decimal
PersionPrice
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 学校编号
/// </summary>
public
int
School_Id
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Course_ViewModel.cs
View file @
e3aa76a3
...
...
@@ -23,7 +23,7 @@ namespace Edu.Model.ViewModel.Course
/// <summary>
/// 创建时间字符串
/// </summary>
public
string
CreateTimeStr
{
get
{
return
this
.
CreateTime
.
FormatTime
();}
}
public
string
CreateTimeStr
{
get
{
return
this
.
CreateTime
.
FormatTime
();
}
}
/// <summary>
/// 更新时间
...
...
@@ -44,5 +44,35 @@ namespace Edu.Model.ViewModel.Course
/// 课程阶梯价格列表
/// </summary>
public
List
<
RB_Course_StepPrice_ViewModel
>
StepPriceList
{
get
;
set
;
}
/// <summary>
/// 教师团队
/// </summary>
public
List
<
int
>
TeacherIdList
{
get
{
if
(!
string
.
IsNullOrEmpty
(
this
.
Teacher_Ids
))
{
return
Common
.
ConvertHelper
.
StringToList
(
this
.
Teacher_Ids
);
}
return
new
List
<
int
>();
}
}
/// <summary>
/// 销售平台
/// </summary>
public
List
<
int
>
SalePlatList
{
get
{
if
(!
string
.
IsNullOrEmpty
(
this
.
Saleplat
))
{
return
Common
.
ConvertHelper
.
StringToList
(
this
.
Saleplat
);
}
return
new
List
<
int
>();
}
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Question/RB_Question_ViewModel.cs
View file @
e3aa76a3
...
...
@@ -43,6 +43,7 @@ namespace Edu.Model.ViewModel.Question
/// </summary>
public
string
QQuestionTypeStr
{
get
;
set
;
}
/// <summary>
/// 知识点【查询使用,多选】
/// </summary>
...
...
Edu.Module.Course/CourseModule.cs
View file @
e3aa76a3
...
...
@@ -161,19 +161,64 @@ namespace Edu.Module.Course
model
.
CourseId
=
newId
;
flag
=
newId
>
0
;
}
//没有设置阶梯价格,删除原来的价格
course_StepPriceRepository
.
DeleteStepPriceRepository
(
model
.
CourseId
);
if
(
model
.
IsOpenStepPrice
==
1
)
#
region
阶梯报价
//未开启阶梯价格
if
(
model
.
IsOpenStepPrice
==
0
)
{
course_StepPriceRepository
.
DeleteStepPriceRepository
(
model
.
CourseId
);
}
else
//开启阶梯价格
{
if
(
model
.
StepPriceList
!=
null
&&
model
.
StepPriceList
.
Count
>
0
)
var
oldStepPriceList
=
course_StepPriceRepository
.
GetCourseStepPriceListRepository
(
new
RB_Course_StepPrice_ViewModel
()
{
CourseId
=
model
.
CourseId
});
//以前没有阶梯报价信息【直接新增】
if
(
oldStepPriceList
==
null
||
(
oldStepPriceList
!=
null
&&
oldStepPriceList
.
Count
==
0
))
{
foreach
(
var
item
in
model
.
StepPriceList
)
if
(
model
.
StepPriceList
!=
null
&&
model
.
StepPriceList
.
Count
>
0
)
{
foreach
(
var
item
in
model
.
StepPriceList
)
{
item
.
CoursePriceId
=
0
;
item
.
CourseId
=
model
.
CourseId
;
item
.
Group_Id
=
model
.
Group_Id
;
item
.
School_Id
=
model
.
School_Id
;
course_StepPriceRepository
.
Insert
(
item
);
}
}
}
else
//以前有阶梯报价
{
//现在没有阶梯报价了【直接删除以前的阶梯报价】
if
(
model
.
StepPriceList
==
null
||
(
model
.
StepPriceList
!=
null
&&
model
.
StepPriceList
.
Count
==
0
))
{
course_StepPriceRepository
.
DeleteStepPriceRepository
(
model
.
CourseId
);
}
//找出差异的数据
var
deleteList
=
oldStepPriceList
.
Where
(
qitem
=>
!
model
.
StepPriceList
.
Any
(
oldItem
=>
qitem
.
CoursePriceId
==
oldItem
.
CoursePriceId
)).
ToList
();
foreach
(
var
dItem
in
deleteList
)
{
if
(
dItem
.
CoursePriceId
>
0
)
{
course_StepPriceRepository
.
Delete
(
dItem
.
CoursePriceId
);
}
}
foreach
(
var
priceItem
in
model
.
StepPriceList
)
{
item
.
CourseId
=
model
.
CourseId
;
course_StepPriceRepository
.
Insert
(
item
);
priceItem
.
CourseId
=
model
.
CourseId
;
priceItem
.
Group_Id
=
model
.
Group_Id
;
priceItem
.
School_Id
=
model
.
School_Id
;
if
(
priceItem
.
CoursePriceId
==
0
)
{
course_StepPriceRepository
.
Insert
(
priceItem
);
}
else
{
course_StepPriceRepository
.
Update
(
priceItem
);
}
}
}
}
#
endregion
return
flag
;
}
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
e3aa76a3
using
System
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Module.Course
;
...
...
@@ -216,6 +217,17 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 获取销售端口
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSaleplatList
()
{
var
list
=
Common
.
Plugin
.
EnumHelper
.
EnumToList
(
typeof
(
SaleplatEnum
));
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 删除课程
/// </summary>
...
...
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