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
ceb95cdb
Commit
ceb95cdb
authored
4 years ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
bf0c8c3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+26
-12
No files found.
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
ceb95cdb
...
...
@@ -11,6 +11,7 @@ using Edu.WebApi.Filter;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
System.Linq
;
using
Newtonsoft.Json.Linq
;
namespace
Edu.WebApi.Controllers.Course
{
...
...
@@ -819,23 +820,36 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
public
ApiResult
SetBeatchCoursePreferential
()
{
var
courseObj
=
base
.
ParmJObj
.
GetStringValue
(
"courseObj"
);
var
courseModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Course_ViewModel
>(
courseObj
);
var
courseObj
=
JObject
.
Parse
(
base
.
ParmJObj
.
GetStringValue
(
"courseObj"
));
var
courseModel
=
new
RB_Course_ViewModel
()
{
CourseId
=
courseObj
.
GetInt
(
"CourseId"
),
OriginalPrice
=
courseObj
.
GetDecimal
(
"OriginalPrice"
),
SellPrice
=
courseObj
.
GetDecimal
(
"SellPrice"
),
};
var
priceObj
=
base
.
ParmJObj
.
GetStringValue
(
"priceList"
);
var
list
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Course_Preferential_Extend
>>(
priceObj
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
var
list
=
new
List
<
RB_Course_Preferential_Extend
>(
);
try
{
foreach
(
var
extModel
in
list
)
list
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Course_Preferential_Extend
>>(
priceObj
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
this
.
UserInfo
.
Group_Id
;
extModel
.
School_Id
=
this
.
UserInfo
.
School_Id
;
extModel
.
CourseId
=
courseModel
.
CourseId
;
foreach
(
var
extModel
in
list
)
{
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
this
.
UserInfo
.
Group_Id
;
extModel
.
School_Id
=
this
.
UserInfo
.
School_Id
;
extModel
.
CourseId
=
courseModel
.
CourseId
;
}
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetBeatchCoursePreferential"
);
}
var
flag
=
courseModule
.
SetCoursePreferentialListModule
(
courseModel
,
list
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
This diff is collapsed.
Click to expand it.
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