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
bcfb6b13
Commit
bcfb6b13
authored
Oct 16, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
caafd04f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+13
-4
RB_Goods_WK_StudyTimeRepository.cs
Mall.Repository/Product/RB_Goods_WK_StudyTimeRepository.cs
+1
-1
AppletSchoolController.cs
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
+4
-4
No files found.
Mall.Module.Product/ProductModule.cs
View file @
bcfb6b13
...
...
@@ -3469,19 +3469,28 @@ namespace Mall.Module.Product
/// <param name="goodsId"></param>
/// <param name="UserId"></param>
/// <returns></returns>
public
bool
GetAppletCourseIsPay
(
int
goodsId
,
int
UserId
)
{
public
int
GetAppletCourseIsPay
(
int
goodsId
,
int
UserId
)
{
if
(
UserId
<=
0
)
{
return
false
;
return
0
;
}
var
goodsModel
=
goodsRepository
.
GetEntity
(
goodsId
);
if
(
goodsModel
==
null
)
{
return
0
;
}
if
(
goodsModel
.
SellingPrice
==
0
)
{
return
1
;
}
var
omodel
=
goods_OrderRepository
.
GetCourseOrderIsPay
(
GoodsIds
:
goodsId
.
ToString
(),
UserId
:
UserId
).
FirstOrDefault
();
if
(
omodel
!=
null
)
{
if
(
omodel
.
PaymentTime
.
HasValue
)
{
return
true
;
return
1
;
}
return
2
;
}
return
false
;
return
0
;
}
#
endregion
...
...
Mall.Repository/Product/RB_Goods_WK_StudyTimeRepository.cs
View file @
bcfb6b13
...
...
@@ -154,7 +154,7 @@ GROUP BY DATE_FORMAT(CreateDate,'%Y-%m-%d') ORDER BY DATE_FORMAT(CreateDate,'%Y-
/// <returns></returns>
public
RB_Goods_WK_StudyTime_Extend
GetMyStudyTimeByLast
(
int
userId
)
{
string
sql
=
$@"SELECT *
FROM rb_goods_wk_studytime WHERE UserId =
{
userId
}
limit 1
"
;
string
sql
=
$@"SELECT *
FROM rb_goods_wk_studytime WHERE UserId =
{
userId
}
order by Id desc limit 1
"
;
return
Get
<
RB_Goods_WK_StudyTime_Extend
>(
sql
).
FirstOrDefault
();
}
...
...
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
View file @
bcfb6b13
...
...
@@ -201,7 +201,7 @@ namespace Mall.WebApi.Controllers.Education
}
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
);
int
IsPay
=
productModule
.
GetAppletCourseIsPay
(
GoodsId
,
req
.
UserId
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
...
...
@@ -214,7 +214,7 @@ namespace Mall.WebApi.Controllers.Education
x
.
IsTrySee
,
x
.
Number
,
x
.
IsCache
,
FilePath
=
x
.
IsTrySee
==
1
||
IsPay
?
x
.
FilePath
:
""
,
FilePath
=
x
.
IsTrySee
==
1
||
IsPay
==
1
?
x
.
FilePath
:
""
,
x
.
IsImageOK
,
x
.
VideoImage
,
x
.
VideoTime
,
...
...
@@ -233,13 +233,13 @@ namespace Mall.WebApi.Controllers.Education
/// <param name="Number"></param>
/// <param name="Image"></param>
/// <returns></returns>
public
List
<
CourseImageModel
>
GetCourseImage
(
int
IsTrySee
,
bool
IsPay
,
int
Number
,
string
Image
)
public
List
<
CourseImageModel
>
GetCourseImage
(
int
IsTrySee
,
int
IsPay
,
int
Number
,
string
Image
)
{
if
(
string
.
IsNullOrEmpty
(
Image
)
||
Image
==
"[]"
)
{
return
new
List
<
CourseImageModel
>();
}
if
(
IsPay
)
if
(
IsPay
==
1
)
{
return
JsonConvert
.
DeserializeObject
<
List
<
CourseImageModel
>>(
Image
);
}
...
...
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