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
0da6f1b6
Commit
0da6f1b6
authored
Mar 17, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
79931969
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
2 deletions
+54
-2
RB_Course.cs
Edu.Model/Entity/Course/RB_Course.cs
+5
-0
RB_Course_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Course_ViewModel.cs
+10
-0
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+21
-0
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+18
-2
No files found.
Edu.Model/Entity/Course/RB_Course.cs
View file @
0da6f1b6
...
...
@@ -351,5 +351,10 @@ namespace Edu.Model.Entity.Course
/// 适配上课时段ID (滚动开班)
/// </summary>
public
int
CourseTimeId
{
get
;
set
;
}
/// <summary>
/// 开发题库等级[多选,逗号分割]
/// </summary>
public
string
OpenBankLevel
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Course_ViewModel.cs
View file @
0da6f1b6
...
...
@@ -193,5 +193,15 @@ namespace Edu.Model.ViewModel.Course
/// 是否查询有上架(1-是)
/// </summary>
public
int
IsQuerySalePlat
{
get
;
set
;
}
/// <summary>
/// 开放题库等级列表
/// </summary>
public
List
<
int
>
OpenBankLevelList
{
get
;
set
;
}
/// <summary>
/// 开发题库名称
/// </summary>
public
List
<
string
>
OpenBankLevelNameList
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/CourseModule.cs
View file @
0da6f1b6
...
...
@@ -19,6 +19,7 @@ using System.Linq;
using
System.Text.RegularExpressions
;
using
VT.FW.DB
;
using
Edu.Repository.Grade
;
using
Edu.Common.Enum.Question
;
namespace
Edu.Module.Course
{
...
...
@@ -199,6 +200,7 @@ namespace Edu.Module.Course
}
}
var
list
=
courseRepository
.
GetCoursePageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
bankTypeList
=
EnumHelper
.
EnumToList
(
typeof
(
LevelTypeEnum
));
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CourseId
));
...
...
@@ -219,6 +221,20 @@ namespace Edu.Module.Course
foreach
(
var
item
in
list
)
{
item
.
OpenBankLevelList
=
new
List
<
int
>();
if
(!
string
.
IsNullOrEmpty
(
item
.
OpenBankLevel
))
{
item
.
OpenBankLevelList
=
Common
.
ConvertHelper
.
StringToList
(
item
.
OpenBankLevel
);
}
item
.
OpenBankLevelNameList
=
new
List
<
string
>();
if
(
item
.
OpenBankLevelList
!=
null
&&
item
.
OpenBankLevelList
.
Count
>
0
)
{
foreach
(
var
bItem
in
item
.
OpenBankLevelList
)
{
var
tempBank
=
bankTypeList
.
Where
(
qitem
=>
qitem
.
Id
==
bItem
).
FirstOrDefault
();
item
.
OpenBankLevelNameList
.
Add
(
tempBank
.
Name
);
}
}
item
.
PreferentialList
=
preferentialList
?.
Where
(
qitem
=>
qitem
.
CourseId
==
item
.
CourseId
)?.
OrderBy
(
qitem
=>
qitem
.
PriceDiscountType
)?.
ToList
()
??
new
List
<
RB_Course_Preferential_Extend
>();
item
.
TeacherList
=
new
List
<
RB_Teacher_ViewModel
>();
if
(
item
.
TeacherIdList
!=
null
&&
item
.
TeacherIdList
.
Count
>
0
)
...
...
@@ -264,6 +280,10 @@ namespace Edu.Module.Course
var
clist
=
MallGoodsCategoryRepository
.
GetList
(
new
RB_Goods_Category_Extend
()
{
GoodsId
=
extModel
.
MallGoodsId
,
TenantId
=
Convert
.
ToInt32
(
Config
.
JHTenantId
),
MallBaseId
=
Convert
.
ToInt32
(
Config
.
JHMallBaseId
)
});
extModel
.
CategoryList
=
clist
;
}
if
(!
string
.
IsNullOrEmpty
(
extModel
.
OpenBankLevel
))
{
extModel
.
OpenBankLevelList
=
Common
.
ConvertHelper
.
StringToList
(
extModel
.
OpenBankLevel
);
}
}
return
extModel
;
}
...
...
@@ -309,6 +329,7 @@ namespace Edu.Module.Course
{
nameof
(
RB_Course_ViewModel
.
ScrollMinNum
),
model
.
ScrollMinNum
},
{
nameof
(
RB_Course_ViewModel
.
ScrollMaxNum
),
model
.
ScrollMaxNum
},
{
nameof
(
RB_Course_ViewModel
.
CourseTimeId
),
model
.
CourseTimeId
},
{
nameof
(
RB_Course_ViewModel
.
OpenBankLevel
),
model
.
OpenBankLevel
},
};
flag
=
courseRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_ViewModel
.
CourseId
),
model
.
CourseId
));
}
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
0da6f1b6
...
...
@@ -438,6 +438,20 @@ namespace Edu.WebApi.Controllers.Course
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetCourse"
);
}
List
<
int
>
BankLevelList
=
new
List
<
int
>();
string
OpenBankLevelListStr
=
base
.
ParmJObj
.
GetStringValue
(
"OpenBankLevelList"
);
if
(!
string
.
IsNullOrEmpty
(
OpenBankLevelListStr
))
{
try
{
BankLevelList
=
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
OpenBankLevelListStr
);
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetCourse"
);
}
}
extModel
.
OpenBankLevel
=
JsonHelper
.
Serialize
(
BankLevelList
);
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
...
...
@@ -453,8 +467,10 @@ namespace Edu.WebApi.Controllers.Course
extModel
.
OriginalPrice
=
oldModel
.
OriginalPrice
;
}
bool
flag
=
courseModule
.
SetCourseModule
(
extModel
,
out
int
courseId
);
if
(
flag
)
{
if
(
extModel
.
IsScrollClass
==
1
)
{
if
(
flag
)
{
if
(
extModel
.
IsScrollClass
==
1
)
{
try
{
//创建当月虚拟班级
...
...
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