Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
cd9a2c84
Commit
cd9a2c84
authored
Oct 11, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
章节是否已学习
parent
5f0e1e07
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
7 deletions
+29
-7
RB_Goods_WK_CourseStudy_Extend.cs
Mall.Model/Extend/Product/RB_Goods_WK_CourseStudy_Extend.cs
+4
-0
RB_Goods_WK_Course_Extend.cs
Mall.Model/Extend/Product/RB_Goods_WK_Course_Extend.cs
+4
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+16
-6
RB_Goods_WK_CourseStudyRepository.cs
Mall.Repository/Product/RB_Goods_WK_CourseStudyRepository.cs
+3
-0
AppletSchoolController.cs
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
+2
-1
No files found.
Mall.Model/Extend/Product/RB_Goods_WK_CourseStudy_Extend.cs
View file @
cd9a2c84
...
...
@@ -18,6 +18,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 课程章节ids
/// </summary>
public
string
CourseIds
{
get
;
set
;
}
/// <summary>
/// 总章节
/// </summary>
public
int
TNum
{
get
;
set
;
}
...
...
Mall.Model/Extend/Product/RB_Goods_WK_Course_Extend.cs
View file @
cd9a2c84
...
...
@@ -17,6 +17,10 @@ namespace Mall.Model.Extend.Product
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 是否已阅读 1是 2否
/// </summary>
public
int
IsRead
{
get
;
set
;
}
}
/// <summary>
...
...
Mall.Module.Product/ProductModule.cs
View file @
cd9a2c84
...
...
@@ -172,10 +172,6 @@ namespace Mall.Module.Product
private
RB_FreeShippingRepository
freeShippingRepository
=
new
RB_FreeShippingRepository
();
/// <summary>
/// 微店基础
/// </summary>
private
RB_SmallShops_CustomRepository
smallShops_CustomRepository
=
new
RB_SmallShops_CustomRepository
();
/// <summary>
/// 微店
/// </summary>
...
...
@@ -192,6 +188,10 @@ namespace Mall.Module.Product
/// 教师
/// </summary>
private
readonly
RB_Goods_WK_TeacherRepository
goods_WK_TeacherRepository
=
new
RB_Goods_WK_TeacherRepository
();
/// <summary>
/// 网课学习
/// </summary>
private
readonly
RB_Goods_WK_CourseStudyRepository
goods_WK_CourseStudyRepository
=
new
RB_Goods_WK_CourseStudyRepository
();
...
...
@@ -3446,10 +3446,20 @@ namespace Mall.Module.Product
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
List
<
RB_Goods_WK_Course_Extend
>
GetAppletGoodsCourseList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
goodsId
,
int
tenantId
,
int
mallBaseId
)
public
List
<
RB_Goods_WK_Course_Extend
>
GetAppletGoodsCourseList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
int
goodsId
,
int
userId
,
int
tenantId
,
int
mallBaseId
)
{
var
list
=
goods_WK_CourseRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
new
RB_Goods_WK_Course_Extend
()
{
GoodsId
=
goodsId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
});
//查询观看数量
if
(
userId
>
0
&&
list
.
Any
())
{
//查询用户课程章节 阅读情况
var
slist
=
goods_WK_CourseStudyRepository
.
GetList
(
new
RB_Goods_WK_CourseStudy_Extend
()
{
UserId
=
userId
,
CourseIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
))
});
foreach
(
var
item
in
list
)
{
item
.
IsRead
=
2
;
if
(
slist
.
Where
(
x
=>
x
.
CourseId
==
item
.
Id
).
Any
())
{
item
.
IsRead
=
1
;
//已阅读
}
}
}
return
list
;
}
...
...
Mall.Repository/Product/RB_Goods_WK_CourseStudyRepository.cs
View file @
cd9a2c84
...
...
@@ -36,6 +36,9 @@ namespace Mall.Repository.Product
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and gc.
{
nameof
(
RB_Goods_WK_CourseStudy
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
CourseIds
))
{
where
+=
$@" and gc.
{
nameof
(
RB_Goods_WK_CourseStudy
.
CourseId
)}
in(
{
dmodel
.
CourseIds
}
)"
;
}
string
sql
=
$@"
SELECT gc.* FROM RB_Goods_WK_CourseStudy gc
...
...
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
View file @
cd9a2c84
...
...
@@ -199,7 +199,7 @@ namespace Mall.WebApi.Controllers.Education
{
return
ApiResult
.
ParamIsNull
();
}
var
list
=
productModule
.
GetAppletGoodsCourseList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
GoodsId
,
req
.
TenantId
,
req
.
MallBaseId
);
var
list
=
productModule
.
GetAppletGoodsCourseList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
GoodsId
,
req
.
UserId
,
req
.
TenantId
,
req
.
MallBaseId
);
bool
IsPay
=
productModule
.
GetAppletCourseIsPay
(
GoodsId
,
req
.
UserId
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
...
...
@@ -219,6 +219,7 @@ namespace Mall.WebApi.Controllers.Education
x
.
VideoImage
,
x
.
VideoTime
,
IsPay
,
x
.
IsRead
,
ImageList
=
GetCourseImage
(
x
.
IsTrySee
??
0
,
IsPay
,
x
.
Number
??
0
,
x
.
Image
)
});
return
ApiResult
.
Success
(
""
,
pagelist
);
...
...
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