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;
...
@@ -3,31 +3,41 @@ using VT.FW.DB;
namespace
Edu.Model.Entity.Course
namespace
Edu.Model.Entity.Course
{
{
/// <summary>
/// <summary>
/// 课程阶梯价格实体
/// 课程阶梯价格实体
/// </summary>
/// </summary>
[
Serializable
]
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course_StepPrice
public
class
RB_Course_StepPrice
{
{
/// <summary>
/// <summary>
/// 主键
/// 主键
/// </summary>
/// </summary>
public
int
CoursePriceId
{
get
;
set
;
}
public
int
CoursePriceId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 课程编号
/// 课程编号
/// </summary>
/// </summary>
public
int
CourseId
{
get
;
set
;
}
public
int
CourseId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 人数
/// 人数
/// </summary>
/// </summary>
public
int
PersionNum
{
get
;
set
;
}
public
int
PersionNum
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 售价
/// 售价
/// </summary>
/// </summary>
public
decimal
SellPrice
{
get
;
set
;
}
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
...
@@ -23,7 +23,7 @@ namespace Edu.Model.ViewModel.Course
/// <summary>
/// <summary>
/// 创建时间字符串
/// 创建时间字符串
/// </summary>
/// </summary>
public
string
CreateTimeStr
{
get
{
return
this
.
CreateTime
.
FormatTime
();}
}
public
string
CreateTimeStr
{
get
{
return
this
.
CreateTime
.
FormatTime
();
}
}
/// <summary>
/// <summary>
/// 更新时间
/// 更新时间
...
@@ -44,5 +44,35 @@ namespace Edu.Model.ViewModel.Course
...
@@ -44,5 +44,35 @@ namespace Edu.Model.ViewModel.Course
/// 课程阶梯价格列表
/// 课程阶梯价格列表
/// </summary>
/// </summary>
public
List
<
RB_Course_StepPrice_ViewModel
>
StepPriceList
{
get
;
set
;
}
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
...
@@ -43,6 +43,7 @@ namespace Edu.Model.ViewModel.Question
/// </summary>
/// </summary>
public
string
QQuestionTypeStr
{
get
;
set
;
}
public
string
QQuestionTypeStr
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 知识点【查询使用,多选】
/// 知识点【查询使用,多选】
/// </summary>
/// </summary>
...
...
Edu.Module.Course/CourseModule.cs
View file @
e3aa76a3
...
@@ -161,19 +161,64 @@ namespace Edu.Module.Course
...
@@ -161,19 +161,64 @@ namespace Edu.Module.Course
model
.
CourseId
=
newId
;
model
.
CourseId
=
newId
;
flag
=
newId
>
0
;
flag
=
newId
>
0
;
}
}
//没有设置阶梯价格,删除原来的价格
course_StepPriceRepository
.
DeleteStepPriceRepository
(
model
.
CourseId
);
#
region
阶梯报价
if
(
model
.
IsOpenStepPrice
==
1
)
//未开启阶梯价格
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
;
priceItem
.
CourseId
=
model
.
CourseId
;
course_StepPriceRepository
.
Insert
(
item
);
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
;
return
flag
;
}
}
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
e3aa76a3
using
System
;
using
System
;
using
Edu.Cache.User
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
using
Edu.Common.Plugin
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Module.Course
;
using
Edu.Module.Course
;
...
@@ -216,6 +217,17 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -216,6 +217,17 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Success
(
data
:
extModel
);
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>
/// 删除课程
/// 删除课程
/// </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