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
67a200ad
Commit
67a200ad
authored
Oct 10, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加课程标签
parent
cf9be963
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
20 deletions
+107
-20
RB_Goods.cs
Mall.Model/Entity/Product/RB_Goods.cs
+4
-0
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+4
-0
EducationModule.cs
Mall.Module.Education/EducationModule.cs
+20
-19
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+50
-0
AppletSchoolController.cs
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
+24
-0
EducationController.cs
Mall.WebApi/Controllers/Education/EducationController.cs
+5
-1
No files found.
Mall.Model/Entity/Product/RB_Goods.cs
View file @
67a200ad
...
...
@@ -549,5 +549,9 @@ namespace Mall.Model.Entity.Product
/// 课程分数
/// </summary>
public
decimal
?
CourseScore
{
get
;
set
;
}
/// <summary>
/// 课程标签
/// </summary>
public
string
CourseLable
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Extend.cs
View file @
67a200ad
...
...
@@ -40,6 +40,10 @@ namespace Mall.Model.Extend.Product
/// 线路描述list
/// </summary>
public
List
<
string
>
LineDescriptionList
{
get
;
set
;
}
/// <summary>
/// 课程标签
/// </summary>
public
List
<
string
>
CourseLableList
{
get
;
set
;
}
/// <summary>
/// 课程章节数
...
...
Mall.Module.Education/EducationModule.cs
View file @
67a200ad
...
...
@@ -562,25 +562,26 @@ namespace Mall.Module.Education
{
nameof
(
RB_Goods
.
IsLiveGoods
),
demodel
.
IsLiveGoods
},
{
nameof
(
RB_Goods
.
ShelvesDate
),
demodel
.
ShelvesDate
},
{
nameof
(
RB_Goods
.
DownDate
),
demodel
.
DownDate
},
{
nameof
(
RB_Goods
.
SendArea
),
demodel
.
SendArea
},
{
nameof
(
RB_Goods
.
SiteId
),
demodel
.
SiteId
},
{
nameof
(
RB_Goods
.
GuideId
),
demodel
.
GuideId
},
{
nameof
(
RB_Goods
.
CarId
),
demodel
.
CarId
},
{
nameof
(
RB_Goods
.
CarColorId
),
demodel
.
CarColorId
},
{
nameof
(
RB_Goods
.
CarNumber
),
demodel
.
CarNumber
},
{
nameof
(
RB_Goods
.
CarBuyYear
),
demodel
.
CarBuyYear
},
{
nameof
(
RB_Goods
.
CarType
),
demodel
.
CarType
},
{
nameof
(
RB_Goods
.
UseDay
),
demodel
.
UseDay
},
{
nameof
(
RB_Goods
.
LineName
),
demodel
.
LineName
},
{
nameof
(
RB_Goods
.
LineDescription
),
demodel
.
LineDescription
},
{
nameof
(
RB_Goods
.
IsSpell
),
demodel
.
IsSpell
},
{
nameof
(
RB_Goods
.
RideNum
),
demodel
.
RideNum
},
{
nameof
(
RB_Goods
.
AdvanceDay
),
demodel
.
AdvanceDay
},
{
nameof
(
RB_Goods
.
VideoType
),
demodel
.
VideoType
},
{
nameof
(
RB_Goods
.
IntegralComment
),
demodel
.
IntegralComment
},
{
nameof
(
RB_Goods
.
IntegralCommentType
),
demodel
.
IntegralCommentType
},
{
nameof
(
RB_Goods
.
GoodsType
),
demodel
.
GoodsType
},
{
nameof
(
RB_Goods
.
GoodsPageType
),
demodel
.
GoodsPageType
},
{
nameof
(
RB_Goods
.
SendArea
),
demodel
.
SendArea
},
{
nameof
(
RB_Goods
.
SiteId
),
demodel
.
SiteId
},
{
nameof
(
RB_Goods
.
GuideId
),
demodel
.
GuideId
},
{
nameof
(
RB_Goods
.
CarId
),
demodel
.
CarId
},
{
nameof
(
RB_Goods
.
CarColorId
),
demodel
.
CarColorId
},
{
nameof
(
RB_Goods
.
CarNumber
),
demodel
.
CarNumber
},
{
nameof
(
RB_Goods
.
CarBuyYear
),
demodel
.
CarBuyYear
},
{
nameof
(
RB_Goods
.
CarType
),
demodel
.
CarType
},
{
nameof
(
RB_Goods
.
UseDay
),
demodel
.
UseDay
},
{
nameof
(
RB_Goods
.
LineName
),
demodel
.
LineName
},
{
nameof
(
RB_Goods
.
LineDescription
),
demodel
.
LineDescription
},
{
nameof
(
RB_Goods
.
IsSpell
),
demodel
.
IsSpell
},
{
nameof
(
RB_Goods
.
RideNum
),
demodel
.
RideNum
},
{
nameof
(
RB_Goods
.
AdvanceDay
),
demodel
.
AdvanceDay
},
{
nameof
(
RB_Goods
.
VideoType
),
demodel
.
VideoType
},
{
nameof
(
RB_Goods
.
IntegralComment
),
demodel
.
IntegralComment
},
{
nameof
(
RB_Goods
.
IntegralCommentType
),
demodel
.
IntegralCommentType
},
{
nameof
(
RB_Goods
.
GoodsType
),
demodel
.
GoodsType
},
{
nameof
(
RB_Goods
.
GoodsPageType
),
demodel
.
GoodsPageType
},
{
nameof
(
RB_Goods
.
CourseLable
),
demodel
.
CourseLable
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
...
...
Mall.Module.Product/ProductModule.cs
View file @
67a200ad
...
...
@@ -3385,6 +3385,56 @@ namespace Mall.Module.Product
#
endregion
}
/// <summary>
/// 获取课程是否收藏
/// </summary>
/// <param name="goodsId"></param>
/// <param name="userId"></param>
/// <param name="smallShopsId"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
object
GetAppletCourseCollect
(
int
goodsId
,
int
UserId
,
int
TenantId
,
int
MallBaseId
)
{
if
(
UserId
>
0
)
{
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_Collection_Extend
.
UserId
),
FiledValue
=
UserId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_Collection_Extend
.
GoodsId
),
FiledValue
=
goodsId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_Collection_Extend
.
TenantId
),
FiledValue
=
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Member_Collection_Extend
.
MallBaseId
),
FiledValue
=
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
};
if
(
member_CollectionRepository
.
Exists
(
wheres
))
{
return
new
{
Favorite
=
true
};
}
}
return
new
{
Favorite
=
false
};
}
/// <summary>
/// 获取小程序课程章节列表
/// </summary>
...
...
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
View file @
67a200ad
...
...
@@ -154,6 +154,30 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
Success
(
""
,
Robj
);
}
/// <summary>
/// 获取课程是否收藏
/// </summary>
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletCourseCollect
(
object
requestMsg
)
{
var
req
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
if
(
req
.
MallBaseId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
GoodsId
=
prams
.
GetInt
(
"GoodsId"
,
0
);
if
(
GoodsId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
int
UserId
=
req
.
UserId
;
var
Robj
=
productModule
.
GetAppletCourseCollect
(
GoodsId
,
UserId
,
req
.
TenantId
,
req
.
MallBaseId
);
return
ApiResult
.
Success
(
""
,
Robj
);
}
/// <summary>
/// 获取小程序课程章节列表
/// </summary>
...
...
Mall.WebApi/Controllers/Education/EducationController.cs
View file @
67a200ad
...
...
@@ -219,6 +219,7 @@ namespace Mall.WebApi.Controllers.Education
model
?.
SupplierId
,
model
?.
Commission
,
model
?.
IsLiveGoods
,
model
?.
SalesNum
,
CategoryList
=
model
?.
CategoryList
.
Select
(
x
=>
new
{
x
.
Id
,
...
...
@@ -301,7 +302,8 @@ namespace Mall.WebApi.Controllers.Education
x
.
VideoTime
,
x
.
IsImageOK
,
ImageList
=
!
string
.
IsNullOrEmpty
(
x
.
Image
)
&&
x
.
Image
!=
"[]"
?
JsonConvert
.
DeserializeObject
<
List
<
CourseImageModel
>>(
x
.
Image
)
:
new
List
<
CourseImageModel
>()
})
}),
CourseLableList
=
!
string
.
IsNullOrEmpty
(
model
?.
CourseLable
)
&&
model
?.
CourseLable
!=
"[]"
?
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
?.
CourseLable
)
:
new
List
<
string
>()
});
}
...
...
@@ -617,6 +619,8 @@ namespace Mall.WebApi.Controllers.Education
demodel
.
IntegralCommentType
??=
1
;
demodel
.
GoodsPageType
??=
GoodsPageTypeEnum
.
All
;
demodel
.
CourseScore
??=
0
;
demodel
.
CourseLableList
??=
new
List
<
string
>();
demodel
.
CourseLable
=
JsonConvert
.
SerializeObject
(
demodel
.
CourseLableList
);
bool
flag
=
educationModule
.
SetProductGoodsInfo
(
demodel
);
if
(
flag
)
...
...
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