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
55bece28
Commit
55bece28
authored
Feb 03, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
c2ef2ebb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
15 deletions
+34
-15
AppletPointController.cs
Mall.WebApi/Controllers/Education/AppletPointController.cs
+34
-15
No files found.
Mall.WebApi/Controllers/Education/AppletPointController.cs
View file @
55bece28
...
...
@@ -346,7 +346,7 @@ namespace Mall.WebApi.Controllers.Education
{
return
ApiResult
.
Failed
(
"约课总时长必须课时时长的整数倍"
);
}
if
(
courseModel
.
IsPublic
==
1
)
if
(
courseModel
.
IsPublic
==
1
)
{
//判断时长是否一致
if
(
query
.
StudyDuration
!=
courseModel
.
StudyDuration
)
...
...
@@ -394,7 +394,7 @@ namespace Mall.WebApi.Controllers.Education
courseModel
.
StudyStartTime
=
Convert
.
ToDateTime
(
courseModel
.
StudyDate
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
courseModel
.
StudyStartDate
);
if
(
courseModel
.
StudentNumType
==
Common
.
Enum
.
Point
.
StudentNumTypeEnum
.
OneToMany
)
//一对多的时候判断开始时间是否和课程一样
{
if
(
courseModel
.
StudyDate
!=
courseModel
.
StudyStartTime
)
if
(
query
.
StudyDate
!=
courseModel
.
StudyStartTime
)
{
return
ApiResult
.
Failed
(
"预约时间与课程时间不一致"
);
}
...
...
@@ -437,18 +437,29 @@ namespace Mall.WebApi.Controllers.Education
{
endTime
=
item
.
StudyDate
.
AddMinutes
(
Convert
.
ToDouble
(
item
.
TotalStudyDuration
));
}
if
(
query
.
StudyDate
==
item
.
StudyDate
)
{
return
ApiResult
.
Failed
(
"当前预约时间已预约"
);
}
//if (query.StudyDate == item.StudyDate)
//{
// return ApiResult.Failed("当前预约时间已预约");
//}
//if (pointModule.GetTimeSpan(query.StudyDate, item.StudyDate.ToString("HH:mm"), endTime.ToString("HH:mm")))
//{
// return ApiResult.Failed("当前预约时间已预约");
//}
//if (pointModule.GetTimeSpan(nowOrderDate, item.StudyDate.ToString("HH:mm"), endTime.ToString("HH:mm")))
//{
// return ApiResult.Failed("当前预约时间已预约");
//}
if
(
pointModule
.
GetTimeSpan
(
query
.
StudyDate
,
item
.
StudyDate
.
ToString
(
"HH:mm"
),
endTime
.
ToString
(
"HH:mm"
)))
{
return
ApiResult
.
Failed
(
"当前预约时间已预约"
);
}
if
(
pointModule
.
GetTimeSpan
(
nowOrderDate
,
item
.
StudyDate
.
ToString
(
"HH:mm"
),
endTim
e
.
ToString
(
"HH:mm"
)))
if
(
pointModule
.
GetTimeSpan
(
item
.
StudyDate
,
query
.
StudyDate
.
ToString
(
"HH:mm"
),
nowOrderDat
e
.
ToString
(
"HH:mm"
)))
{
return
ApiResult
.
Failed
(
"当前预约时间已预约"
);
}
}
}
...
...
@@ -544,7 +555,7 @@ namespace Mall.WebApi.Controllers.Education
courseModel
.
StudyStartTime
=
Convert
.
ToDateTime
(
courseModel
.
StudyDate
.
ToString
(
"yyyy-MM-dd"
)
+
" "
+
courseModel
.
StudyStartDate
);
if
(
courseModel
.
StudentNumType
==
Common
.
Enum
.
Point
.
StudentNumTypeEnum
.
OneToMany
)
//一对多的时候判断开始时间是否和课程一样
{
if
(
courseModel
.
StudyDate
!=
courseModel
.
StudyStartTime
)
if
(
query
.
StudyDate
!=
courseModel
.
StudyStartTime
)
{
return
ApiResult
.
Failed
(
"预约时间与课程时间不一致"
);
}
...
...
@@ -587,21 +598,29 @@ namespace Mall.WebApi.Controllers.Education
{
endTime
=
item
.
StudyDate
.
AddMinutes
(
Convert
.
ToDouble
(
item
.
TotalStudyDuration
));
}
if
(
query
.
StudyDate
==
item
.
StudyDate
)
{
return
ApiResult
.
Failed
(
"当前预约时间已预约"
);
}
if
(
pointModule
.
GetTimeSpan
(
query
.
StudyDate
,
item
.
StudyDate
.
ToString
(
"HH:mm"
),
endTime
.
ToString
(
"HH:mm"
)))
{
return
ApiResult
.
Failed
(
"当前预约时间已预约"
);
}
if
(
pointModule
.
GetTimeSpan
(
nowOrderDate
,
item
.
StudyDate
.
ToString
(
"HH:mm"
),
endTim
e
.
ToString
(
"HH:mm"
)))
if
(
pointModule
.
GetTimeSpan
(
item
.
StudyDate
,
query
.
StudyDate
.
ToString
(
"HH:mm"
),
nowOrderDat
e
.
ToString
(
"HH:mm"
)))
{
return
ApiResult
.
Failed
(
"当前预约时间已预约"
);
}
//if (query.StudyDate == item.StudyDate)
//{
// return ApiResult.Failed("当前预约时间已预约");
//}
//if (pointModule.GetTimeSpan(query.StudyDate, item.StudyDate.ToString("HH:mm"), endTime.ToString("HH:mm")))
//{
// return ApiResult.Failed("当前预约时间已预约");
//}
//if (pointModule.GetTimeSpan(nowOrderDate, item.StudyDate.ToString("HH:mm"), endTime.ToString("HH:mm")))
//{
// return ApiResult.Failed("当前预约时间已预约");
//}
}
}
return
ApiResult
.
Success
(
"
当前时间课预约
"
);
return
ApiResult
.
Success
(
""
);
}
}
...
...
@@ -837,7 +856,7 @@ namespace Mall.WebApi.Controllers.Education
model
.
DurationUnit
,
model
.
StudentNumType
,
StudyDateStr
=
model
.
StudyDate
.
ToString
(
"yyyy-MM-dd"
),
model
.
StudyStartDate
,
model
.
StudyStartDate
,
model
.
StudyEndDate
,
orderList
,
StudentNumTypeName
=
EnumHelper
.
GetEnumName
(
model
.
StudentNumType
)
...
...
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