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
063519fe
Commit
063519fe
authored
Sep 29, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
8d96b883
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
17 deletions
+63
-17
RB_Education_Teacher.cs
Mall.Model/Entity/Education/RB_Education_Teacher.cs
+1
-0
RB_Education_Article_Extend.cs
Mall.Model/Extend/Education/RB_Education_Article_Extend.cs
+6
-0
RB_Education_Teacher_Extend.cs
Mall.Model/Extend/Education/RB_Education_Teacher_Extend.cs
+5
-0
EducationModule.cs
Mall.Module.Education/EducationModule.cs
+4
-2
AppletSchoolController.cs
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
+3
-0
EducationController.cs
Mall.WebApi/Controllers/Education/EducationController.cs
+44
-15
No files found.
Mall.Model/Entity/Education/RB_Education_Teacher.cs
View file @
063519fe
...
...
@@ -44,6 +44,7 @@ namespace Mall.Model.Entity.Education
/// </summary>
public
string
TeacherLogo
{
get
;
set
;
}
public
string
LableName
{
get
;
set
;
}
/// <summary>
/// 专业
...
...
Mall.Model/Extend/Education/RB_Education_Article_Extend.cs
View file @
063519fe
...
...
@@ -13,6 +13,12 @@ namespace Mall.Model.Extend.Education
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Education_Article_Extend
:
RB_Education_Article
{
/// <summary>
/// 标签
/// </summary>
public
List
<
string
>
LableNameList
{
get
;
set
;
}
/// <summary>
/// 开始时间
/// </summary>
...
...
Mall.Model/Extend/Education/RB_Education_Teacher_Extend.cs
View file @
063519fe
...
...
@@ -13,6 +13,11 @@ namespace Mall.Model.Extend.Education
public
class
RB_Education_Teacher_Extend
:
Entity
.
Education
.
RB_Education_Teacher
{
/// <summary>
/// 标签
/// </summary>
public
List
<
string
>
LableNameList
{
get
;
set
;
}
/// <summary>
/// 订单数
/// </summary>
...
...
Mall.Module.Education/EducationModule.cs
View file @
063519fe
...
...
@@ -1359,6 +1359,10 @@ namespace Mall.Module.Education
{
nameof
(
RB_Education_Teacher_Extend
.
Name
),
model
.
Name
},
{
nameof
(
RB_Education_Teacher_Extend
.
Telephone
),
model
.
Telephone
},
{
nameof
(
RB_Education_Teacher_Extend
.
Introduction
),
model
.
Introduction
},
{
nameof
(
RB_Education_Teacher_Extend
.
LableName
),
model
.
LableName
},
{
nameof
(
RB_Education_Teacher_Extend
.
TeacherStatus
),
model
.
TeacherStatus
},
{
nameof
(
RB_Education_Teacher_Extend
.
Major
),
model
.
Major
},
{
nameof
(
RB_Education_Teacher_Extend
.
WorkYears
),
model
.
WorkYears
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
...
...
@@ -2400,8 +2404,6 @@ namespace Mall.Module.Education
#
endregion
#
region
自动发放给会员优惠券
/// <summary>
/// 自动给会员发放优惠券
...
...
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
View file @
063519fe
...
...
@@ -320,5 +320,8 @@ namespace Mall.WebApi.Controllers.Education
#
endregion
#
region
教师
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Education/EducationController.cs
View file @
063519fe
...
...
@@ -350,44 +350,57 @@ namespace Mall.WebApi.Controllers.Education
return
ApiResult
.
ParamIsNull
(
"请输入原价"
);
}
#
region
教师验证
if
(
demodel
.
TeacherList
==
null
||
!
demodel
.
TeacherList
.
Any
())
{
if
(
demodel
.
TeacherList
==
null
||
!
demodel
.
TeacherList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请选择讲师列表"
);
}
foreach
(
var
item
in
demodel
.
TeacherList
)
{
if
((
item
.
TeacherId
??
0
)
<=
0
)
{
foreach
(
var
item
in
demodel
.
TeacherList
)
{
if
((
item
.
TeacherId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"讲师列表数据有误"
);
}
}
#
endregion
#
region
课程验证
if
(
demodel
.
CourseList
==
null
||
!
demodel
.
CourseList
.
Any
())
{
if
(
demodel
.
CourseList
==
null
||
!
demodel
.
CourseList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请选择课程列表"
);
}
foreach
(
var
item
in
demodel
.
CourseList
)
{
if
(
item
.
Sort
<=
0
)
{
foreach
(
var
item
in
demodel
.
CourseList
)
{
if
(
item
.
Sort
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
if
(
string
.
IsNullOrEmpty
(
item
.
SortName
))
{
if
(
string
.
IsNullOrEmpty
(
item
.
SortName
))
{
return
ApiResult
.
ParamIsNull
(
"请传递章节名称"
);
}
if
(
string
.
IsNullOrEmpty
(
item
.
Name
))
{
if
(
string
.
IsNullOrEmpty
(
item
.
Name
))
{
return
ApiResult
.
ParamIsNull
(
"请传递课程名称"
);
}
if
(
item
.
Type
<=
0
)
{
if
(
item
.
Type
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递课程附件类型"
);
}
item
.
IsTrySee
??=
1
;
item
.
Number
??=
1
;
item
.
IsCache
??=
2
;
if
(
string
.
IsNullOrEmpty
(
item
.
FilePath
))
{
if
(
string
.
IsNullOrEmpty
(
item
.
FilePath
))
{
return
ApiResult
.
ParamIsNull
(
"请传递附件"
);
}
if
(
item
.
Type
==
GoodsCourseTypeEnum
.
Video
)
{
if
(
string
.
IsNullOrEmpty
(
item
.
VideoImage
))
{
if
(
item
.
Type
==
GoodsCourseTypeEnum
.
Video
)
{
if
(
string
.
IsNullOrEmpty
(
item
.
VideoImage
))
{
return
ApiResult
.
ParamIsNull
(
"请传递视频封面图"
);
}
if
((
item
.
VideoTime
??
0
)
<=
0
)
{
if
((
item
.
VideoTime
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递视频时长"
);
}
}
...
...
@@ -775,6 +788,10 @@ namespace Mall.WebApi.Controllers.Education
{
oldLogisticsModel
=
new
RB_Education_Teacher_Extend
();
}
if
(!
string
.
IsNullOrWhiteSpace
(
oldLogisticsModel
.
LableName
))
{
oldLogisticsModel
.
LableNameList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldLogisticsModel
.
LableName
);
}
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
...
...
@@ -834,6 +851,10 @@ namespace Mall.WebApi.Controllers.Education
query
.
CreateDate
=
System
.
DateTime
.
Now
;
}
query
.
UpdateDate
=
System
.
DateTime
.
Now
;
if
(
query
.
LableNameList
!=
null
&&
query
.
LableNameList
.
Any
())
{
query
.
LableName
=
JsonConvert
.
SerializeObject
(
query
.
LableNameList
);
}
bool
result
=
educationModule
.
AddOrUpdateTeacher
(
query
);
if
(
result
)
{
...
...
@@ -1458,7 +1479,10 @@ namespace Mall.WebApi.Controllers.Education
{
oldLogisticsModel
=
new
RB_Education_Article_Extend
();
}
if
(!
string
.
IsNullOrWhiteSpace
(
oldLogisticsModel
.
LableName
))
{
oldLogisticsModel
.
LableNameList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
oldLogisticsModel
.
LableName
);
}
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
...
...
@@ -1493,6 +1517,11 @@ namespace Mall.WebApi.Controllers.Education
query
.
CreateDate
=
System
.
DateTime
.
Now
;
}
query
.
UpdateDate
=
System
.
DateTime
.
Now
;
if
(
query
.
LableNameList
!=
null
&&
query
.
LableNameList
.
Any
())
{
query
.
LableName
=
JsonConvert
.
SerializeObject
(
query
.
LableNameList
);
}
bool
result
=
educationModule
.
AddOrUpdateArticle
(
query
);
if
(
result
)
{
...
...
@@ -1564,7 +1593,7 @@ namespace Mall.WebApi.Controllers.Education
{
return
ApiResult
.
ParamIsNull
(
"请输入评论时间"
);
}
if
(
demodel
.
ArticleId
<=
0
)
if
(
demodel
.
ArticleId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请选择咨询文章"
);
}
...
...
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