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
a5f9388d
Commit
a5f9388d
authored
Apr 01, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段
parent
5bca9891
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
213 additions
and
99 deletions
+213
-99
RB_Order_Guest.cs
Edu.Model/Entity/Course/RB_Order_Guest.cs
+30
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+143
-87
RB_Order_GuestRepository.cs
Edu.Repository/Course/RB_Order_GuestRepository.cs
+4
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+36
-12
No files found.
Edu.Model/Entity/Course/RB_Order_Guest.cs
View file @
a5f9388d
...
...
@@ -140,5 +140,35 @@ namespace Edu.Model.Entity.Course
/// 联系地址
/// </summary>
public
string
ContactAddress
{
get
;
set
;
}
/// <summary>
/// 留学就业编号
/// </summary>
public
int
SourceId
{
get
;
set
;
}
/// <summary>
/// 毕业院校
/// </summary>
public
string
GraduatedSchool
{
get
;
set
;
}
/// <summary>
/// 毕业专业
/// </summary>
public
string
GraduatedMajor
{
get
;
set
;
}
/// <summary>
/// 志愿专业
/// </summary>
public
string
VolunteerMajor
{
get
;
set
;
}
/// <summary>
/// 价格
/// </summary>
public
decimal
Price
{
get
;
set
;
}
/// <summary>
/// 留学就业备注
/// </summary>
public
string
StudyRemark
{
get
;
set
;
}
}
}
Edu.Module.Course/OrderModule.cs
View file @
a5f9388d
This diff is collapsed.
Click to expand it.
Edu.Repository/Course/RB_Order_GuestRepository.cs
View file @
a5f9388d
...
...
@@ -91,6 +91,10 @@ namespace Edu.Repository.Course
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
ClassId
)}
=
{
demodel
.
ClassId
}
"
;
}
if
(
demodel
.
SourceId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
SourceId
)}
=
{
demodel
.
SourceId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
demodel
.
GuestName
))
{
where
+=
$@" and
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestName
)}
like '%
{
demodel
.
GuestName
}
%'"
;
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
a5f9388d
...
...
@@ -812,6 +812,11 @@ namespace Edu.WebApi.Controllers.Course
x
.
Domicile
,
UpdateTime
=
x
.
UpdateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
IsShow
=
true
,
x
.
GraduatedSchool
,
x
.
GraduatedMajor
,
x
.
VolunteerMajor
,
x
.
Price
,
x
.
StudyRemark
,
});
return
ApiResult
.
Success
(
""
,
pageModel
);
}
...
...
@@ -823,17 +828,42 @@ namespace Edu.WebApi.Controllers.Course
[
HttpPost
]
public
ApiResult
SetOrderGuestInfo
()
{
var
userInfo
=
base
.
UserInfo
;
var
dmodel
=
JsonHelper
.
DeserializeObject
<
RB_Order_Guest_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
if
(
dmodel
.
OrderId
<=
0
)
{
var
dmodel
=
new
RB_Order_Guest_ViewModel
()
{
Id
=
base
.
ParmJObj
.
GetInt
(
"Id"
),
OrderId
=
base
.
ParmJObj
.
GetInt
(
"OrderId"
),
GuestName
=
base
.
ParmJObj
.
GetStringValue
(
"GuestName"
),
Profession
=
base
.
ParmJObj
.
GetStringValue
(
"Profession"
),
Sex
=
base
.
ParmJObj
.
GetInt
(
"Sex"
,
1
),
Age
=
base
.
ParmJObj
.
GetInt
(
"Age"
),
Mobile
=
base
.
ParmJObj
.
GetStringValue
(
"Mobile"
),
Basics
=
base
.
ParmJObj
.
GetStringValue
(
"Basics"
),
Education
=(
GuestEducationEnum
)
base
.
ParmJObj
.
GetInt
(
"Education"
),
GuestSource
=(
OrderSourceEnum
)
base
.
ParmJObj
.
GetInt
(
"GuestSource"
),
LearningGoals
=(
GuestLearningGoalsEnum
)
base
.
ParmJObj
.
GetInt
(
"LearningGoals"
),
Contact
=
base
.
ParmJObj
.
GetStringValue
(
"Contact"
),
ContactMobile
=
base
.
ParmJObj
.
GetStringValue
(
"ContactMobile"
),
IDCard
=
base
.
ParmJObj
.
GetStringValue
(
"IDCard"
),
Domicile
=
base
.
ParmJObj
.
GetStringValue
(
"Domicile"
),
ContactAddress
=
base
.
ParmJObj
.
GetStringValue
(
"ContactAddress"
),
SourceId
=
base
.
ParmJObj
.
GetInt
(
"SourceId"
),
GraduatedSchool
=
base
.
ParmJObj
.
GetStringValue
(
"GraduatedSchool"
),
GraduatedMajor
=
base
.
ParmJObj
.
GetStringValue
(
"GraduatedMajor"
),
VolunteerMajor
=
base
.
ParmJObj
.
GetStringValue
(
"VolunteerMajor"
),
Price
=
base
.
ParmJObj
.
GetDecimal
(
"Price"
),
StudyRemark
=
base
.
ParmJObj
.
GetStringValue
(
"StudyRemark"
),
};
if
(
dmodel
.
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单id"
);
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
GuestName
))
{
return
ApiResult
.
ParamIsNull
(
"请输入客人姓名"
);
}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
Mobile
))
{
if
(
string
.
IsNullOrEmpty
(
dmodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"请输入手机号码"
);
}
dmodel
.
GuestState
=
1
;
dmodel
.
Status
=
0
;
dmodel
.
Group_Id
=
userInfo
.
Group_Id
;
...
...
@@ -842,14 +872,8 @@ namespace Edu.WebApi.Controllers.Course
dmodel
.
CreateTime
=
DateTime
.
Now
;
dmodel
.
UpdateBy
=
userInfo
.
Id
;
dmodel
.
UpdateTime
=
DateTime
.
Now
;
string
msg
=
orderModule
.
SetOrderGuestInfo
(
dmodel
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
bool
flag
=
orderModule
.
SetOrderGuestInfo
(
dmodel
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
);
}
/// <summary>
...
...
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