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
580f37a2
Commit
580f37a2
authored
Jan 06, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
135d4ad5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
110 deletions
+134
-110
RB_Course_Words_Extend.cs
Edu.Model/ViewModel/Course/RB_Course_Words_Extend.cs
+4
-1
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+116
-108
RB_Course_WordsRepository.cs
Edu.Repository/Course/RB_Course_WordsRepository.cs
+4
-0
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+10
-1
No files found.
Edu.Model/ViewModel/Course/RB_Course_Words_Extend.cs
View file @
580f37a2
...
@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Course
...
@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
/// </summary>
public
class
RB_Course_Words_Extend
:
RB_Course_Words
public
class
RB_Course_Words_Extend
:
RB_Course_Words
{
{
/// <summary>
/// 课程编号
/// </summary>
public
string
QCourseIds
{
get
;
set
;
}
}
}
}
}
Edu.Module.Course/CourseModule.cs
View file @
580f37a2
...
@@ -145,6 +145,11 @@ namespace Edu.Module.Course
...
@@ -145,6 +145,11 @@ namespace Edu.Module.Course
/// </summary>
/// </summary>
private
readonly
Repository
.
Mall
.
RB_Goods_SpecificationPriceRepository
goods_SpecificationPriceRepository
=
new
Repository
.
Mall
.
RB_Goods_SpecificationPriceRepository
();
private
readonly
Repository
.
Mall
.
RB_Goods_SpecificationPriceRepository
goods_SpecificationPriceRepository
=
new
Repository
.
Mall
.
RB_Goods_SpecificationPriceRepository
();
/// <summary>
/// 课程单词仓储层对象
/// </summary>
private
readonly
RB_Course_WordsRepository
course_WordsRepository
=
new
RB_Course_WordsRepository
();
#
region
课程管理
#
region
课程管理
public
List
<
RB_Course_ViewModel
>
GetAllCourseChapterCountModule
(
int
groupId
,
int
courseId
)
public
List
<
RB_Course_ViewModel
>
GetAllCourseChapterCountModule
(
int
groupId
,
int
courseId
)
...
@@ -481,6 +486,11 @@ namespace Edu.Module.Course
...
@@ -481,6 +486,11 @@ namespace Edu.Module.Course
return
chapterRepository
.
GetChapterListRepository
(
query
);
return
chapterRepository
.
GetChapterListRepository
(
query
);
}
}
/// <summary>
/// 导入课程章节到新课程
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
ChapterTree_ViewModel
>
SetImportChapterModule
(
RB_Course_Chapter_ViewModel
query
)
public
List
<
ChapterTree_ViewModel
>
SetImportChapterModule
(
RB_Course_Chapter_ViewModel
query
)
{
{
var
result
=
GetChapterTreeListModule
(
query
);
var
result
=
GetChapterTreeListModule
(
query
);
...
@@ -652,6 +662,11 @@ namespace Edu.Module.Course
...
@@ -652,6 +662,11 @@ namespace Edu.Module.Course
return
resultList
;
return
resultList
;
}
}
/// <summary>
/// 批量导入课程章节信息
/// </summary>
/// <param name="courseId"></param>
/// <returns></returns>
public
bool
SetBatchAllChapterCurrentHoursModule
(
int
courseId
)
public
bool
SetBatchAllChapterCurrentHoursModule
(
int
courseId
)
{
{
RB_Course_Chapter_ViewModel
query
=
new
RB_Course_Chapter_ViewModel
()
RB_Course_Chapter_ViewModel
query
=
new
RB_Course_Chapter_ViewModel
()
...
@@ -712,8 +727,6 @@ namespace Edu.Module.Course
...
@@ -712,8 +727,6 @@ namespace Edu.Module.Course
}
}
}
}
});
});
return
chapterRepository
.
SetBatchCurrentHoursRepository
(
list
);
return
chapterRepository
.
SetBatchCurrentHoursRepository
(
list
);
}
}
...
@@ -807,7 +820,6 @@ namespace Edu.Module.Course
...
@@ -807,7 +820,6 @@ namespace Edu.Module.Course
}
}
}
}
/// <summary>
/// <summary>
/// 获取章节实体类
/// 获取章节实体类
/// </summary>
/// </summary>
...
@@ -841,7 +853,6 @@ namespace Edu.Module.Course
...
@@ -841,7 +853,6 @@ namespace Edu.Module.Course
public
bool
BatchRemoveChapterModule
(
RB_Course_Chapter_ViewModel
model
)
public
bool
BatchRemoveChapterModule
(
RB_Course_Chapter_ViewModel
model
)
{
{
var
flag
=
chapterRepository
.
DeleteBatchChpterRepository
(
model
);
var
flag
=
chapterRepository
.
DeleteBatchChpterRepository
(
model
);
SetBatchAllChapterCurrentHoursModule
(
model
.
CourseId
);
SetBatchAllChapterCurrentHoursModule
(
model
.
CourseId
);
return
flag
;
return
flag
;
}
}
...
@@ -896,8 +907,6 @@ namespace Edu.Module.Course
...
@@ -896,8 +907,6 @@ namespace Edu.Module.Course
public
bool
SetBatchChapterNoModule
(
List
<
RB_Course_Chapter_ViewModel
>
chapters
)
public
bool
SetBatchChapterNoModule
(
List
<
RB_Course_Chapter_ViewModel
>
chapters
)
{
{
var
flag
=
chapterRepository
.
SetBatchUpdateChapterNoRepository
(
chapters
);
var
flag
=
chapterRepository
.
SetBatchUpdateChapterNoRepository
(
chapters
);
//SetBatchAllChapterCurrentHoursModule(chapters[0].CourseId);
return
flag
;
return
flag
;
}
}
...
@@ -1611,7 +1620,6 @@ namespace Edu.Module.Course
...
@@ -1611,7 +1620,6 @@ namespace Edu.Module.Course
public
List
<
RB_Class_Time_UnKnowUser_ViewModel
>
GetUnKnowUserByClassTimeModule
(
int
classId
)
public
List
<
RB_Class_Time_UnKnowUser_ViewModel
>
GetUnKnowUserByClassTimeModule
(
int
classId
)
{
{
var
list
=
unKnowRepository
.
GetUnKnowUsersByClassIdRepository
(
classId
);
var
list
=
unKnowRepository
.
GetUnKnowUsersByClassIdRepository
(
classId
);
return
list
;
return
list
;
}
}
...
@@ -1714,6 +1722,7 @@ namespace Edu.Module.Course
...
@@ -1714,6 +1722,7 @@ namespace Edu.Module.Course
demodel
.
GoodsPageType
??=
GoodsPageTypeEnum
.
All
;
demodel
.
GoodsPageType
??=
GoodsPageTypeEnum
.
All
;
demodel
.
TenantId
=
Convert
.
ToInt32
(
Config
.
JHTenantId
);
demodel
.
TenantId
=
Convert
.
ToInt32
(
Config
.
JHTenantId
);
demodel
.
MallBaseId
=
Convert
.
ToInt32
(
Config
.
JHMallBaseId
);
demodel
.
MallBaseId
=
Convert
.
ToInt32
(
Config
.
JHMallBaseId
);
#
region
商品规格信息
#
region
商品规格信息
demodel
.
SpecificationList
=
new
List
<
RB_Goods_Specification_Extend
>();
demodel
.
SpecificationList
=
new
List
<
RB_Goods_Specification_Extend
>();
demodel
.
SpecificationPriceList
=
new
List
<
RB_Goods_SpecificationPrice_Extend
>();
demodel
.
SpecificationPriceList
=
new
List
<
RB_Goods_SpecificationPrice_Extend
>();
...
@@ -1762,7 +1771,6 @@ namespace Edu.Module.Course
...
@@ -1762,7 +1771,6 @@ namespace Edu.Module.Course
demodel
.
SpecificationList
.
Add
(
modelSpecification
);
demodel
.
SpecificationList
.
Add
(
modelSpecification
);
#
endregion
#
endregion
if
(
demodel
.
Id
==
0
)
//已存在,更新
if
(
demodel
.
Id
==
0
)
//已存在,更新
{
{
demodel
.
Status
=
0
;
demodel
.
Status
=
0
;
...
@@ -1772,7 +1780,6 @@ namespace Edu.Module.Course
...
@@ -1772,7 +1780,6 @@ namespace Edu.Module.Course
if
(
goodsId
>
0
)
if
(
goodsId
>
0
)
{
{
//插入分类
//插入分类
foreach
(
var
item
in
model
.
CategoryList
)
foreach
(
var
item
in
model
.
CategoryList
)
{
{
...
@@ -1793,7 +1800,8 @@ namespace Edu.Module.Course
...
@@ -1793,7 +1800,8 @@ namespace Edu.Module.Course
else
else
{
{
//修改
//修改
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods
.
Name
),
demodel
.
Name
},
{
nameof
(
RB_Goods
.
Name
),
demodel
.
Name
},
{
nameof
(
RB_Goods
.
CarouselImage
),
demodel
.
CarouselImage
},
{
nameof
(
RB_Goods
.
CarouselImage
),
demodel
.
CarouselImage
},
{
nameof
(
RB_Goods
.
VideoAddress
),
demodel
.
VideoAddress
},
{
nameof
(
RB_Goods
.
VideoAddress
),
demodel
.
VideoAddress
},
...
@@ -1861,18 +1869,22 @@ namespace Edu.Module.Course
...
@@ -1861,18 +1869,22 @@ namespace Edu.Module.Course
{
nameof
(
RB_Goods
.
GoodsUrl
),
demodel
.
GoodsUrl
},
{
nameof
(
RB_Goods
.
GoodsUrl
),
demodel
.
GoodsUrl
},
{
nameof
(
RB_Goods
.
goodsLogo
),
demodel
.
goodsLogo
},
{
nameof
(
RB_Goods
.
goodsLogo
),
demodel
.
goodsLogo
},
};
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
new
WhereHelper
(){
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods
.
Id
),
FiledName
=
nameof
(
RB_Goods
.
Id
),
FiledValue
=
demodel
.
Id
,
FiledValue
=
demodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
OperatorEnum
=
OperatorEnum
.
Equal
},
},
new
WhereHelper
(){
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods
.
TenantId
),
FiledName
=
nameof
(
RB_Goods
.
TenantId
),
FiledValue
=
demodel
.
TenantId
,
FiledValue
=
demodel
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
OperatorEnum
=
OperatorEnum
.
Equal
},
},
new
WhereHelper
(){
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods
.
MallBaseId
),
FiledName
=
nameof
(
RB_Goods
.
MallBaseId
),
FiledValue
=
demodel
.
MallBaseId
,
FiledValue
=
demodel
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
OperatorEnum
=
OperatorEnum
.
Equal
...
@@ -1900,7 +1912,6 @@ namespace Edu.Module.Course
...
@@ -1900,7 +1912,6 @@ namespace Edu.Module.Course
}
}
#
endregion
#
endregion
#
region
修改分类
#
region
修改分类
var
clist
=
MallGoodsCategoryRepository
.
GetList
(
new
RB_Goods_Category_Extend
()
{
GoodsId
=
demodel
.
Id
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
clist
=
MallGoodsCategoryRepository
.
GetList
(
new
RB_Goods_Category_Extend
()
{
GoodsId
=
demodel
.
Id
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
insertList
=
model
.
CategoryList
.
Where
(
x
=>
!
clist
.
Select
(
y
=>
y
.
CategoryId
).
Contains
(
x
.
CategoryId
)).
ToList
();
var
insertList
=
model
.
CategoryList
.
Where
(
x
=>
!
clist
.
Select
(
y
=>
y
.
CategoryId
).
Contains
(
x
.
CategoryId
)).
ToList
();
...
@@ -2062,7 +2073,6 @@ namespace Edu.Module.Course
...
@@ -2062,7 +2073,6 @@ namespace Edu.Module.Course
}
}
#
endregion
#
endregion
return
goodsId
;
return
goodsId
;
}
}
...
@@ -2075,7 +2085,6 @@ namespace Edu.Module.Course
...
@@ -2075,7 +2085,6 @@ namespace Edu.Module.Course
public
bool
UpdateMallGoodsPrice
(
RB_Course_ViewModel
courseModel
,
List
<
RB_Course_Preferential_Extend
>
list
)
public
bool
UpdateMallGoodsPrice
(
RB_Course_ViewModel
courseModel
,
List
<
RB_Course_Preferential_Extend
>
list
)
{
{
bool
flag
=
false
;
bool
flag
=
false
;
if
(
courseModel
.
MallGoodsId
>
0
)
if
(
courseModel
.
MallGoodsId
>
0
)
{
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
@@ -2165,7 +2174,6 @@ namespace Edu.Module.Course
...
@@ -2165,7 +2174,6 @@ namespace Edu.Module.Course
}
}
}
}
}
}
return
flag
;
return
flag
;
}
}
...
...
Edu.Repository/Course/RB_Course_WordsRepository.cs
View file @
580f37a2
...
@@ -37,6 +37,10 @@ WHERE 1=1
...
@@ -37,6 +37,10 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Course_Words_Extend
.
CourseId
),
query
.
CourseId
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Course_Words_Extend
.
CourseId
),
query
.
CourseId
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QCourseIds
))
{
builder
.
AppendFormat
(
" AND A.{0} IN({1}) "
,
nameof
(
RB_Course_Words_Extend
.
CourseId
),
query
.
QCourseIds
);
}
}
}
return
Get
<
RB_Course_Words_Extend
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_Course_Words_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
580f37a2
...
@@ -582,10 +582,19 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -582,10 +582,19 @@ namespace Edu.WebApi.Controllers.Course
#
region
课程章节管理
#
region
课程章节管理
/// <summary>
/// 导入课程章节到新课程
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
public
ApiResult
SetImportCourseChapter
()
public
ApiResult
SetImportCourseChapter
()
{
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Course_Chapter_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
new
RB_Course_Chapter_ViewModel
()
{
CourseIds
=
base
.
ParmJObj
.
GetStringValue
(
"CourseIds"
),
NewCourseId
=
base
.
ParmJObj
.
GetInt
(
"NewCourseId"
),
MaxLength
=
base
.
ParmJObj
.
GetInt
(
"MaxLength"
)
};
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
query
.
CreateBy
=
base
.
UserInfo
.
Id
;
query
.
CreateBy
=
base
.
UserInfo
.
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