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
de51c0aa
Commit
de51c0aa
authored
Sep 01, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础配置
parent
6c9ce8e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
8 deletions
+89
-8
RB_GuideCar_Base_Extend.cs
Mall.Model/Extend/GuideCar/RB_GuideCar_Base_Extend.cs
+18
-1
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+38
-6
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+33
-1
No files found.
Mall.Model/Extend/GuideCar/RB_GuideCar_Base_Extend.cs
View file @
de51c0aa
...
...
@@ -10,6 +10,23 @@ namespace Mall.Model.Extend.GuideCar
/// </summary>
public
class
RB_GuideCar_Base_Extend
:
RB_GuideCar_Base
{
/// <summary>
/// 订单状态列表
/// </summary>
public
List
<
GrudeCarStateModel
>
OrderStateList
{
get
;
set
;
}
}
/// <summary>
/// 司导订单状态
/// </summary>
public
class
GrudeCarStateModel
{
/// <summary>
/// id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 状态名称
/// </summary>
public
string
Name
{
get
;
set
;
}
}
}
Mall.Module.Product/GuideCarModule.cs
View file @
de51c0aa
...
...
@@ -169,17 +169,49 @@ namespace Mall.Module.Product
TenantId
=
tenantId
,
};
}
if
(
model
.
OrderStateJson
==
null
||
model
.
OrderStateJson
==
""
)
{
if
(
model
.
OrderStateJson
==
null
||
model
.
OrderStateJson
==
""
||
model
.
OrderStateJson
==
"[]"
)
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
Goods
.
OrderStatusEnum
));
//list.OrderBy(x => Convert.ToInt32(x.Value)).Select(x => new
//{
// Name = x.Key,
// Id = Convert.ToInt32(x.Value)
//}))
model
.
OrderStateList
=
list
.
OrderBy
(
x
=>
Convert
.
ToInt32
(
x
.
Value
)).
Select
(
x
=>
new
GrudeCarStateModel
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}).
ToList
();
}
else
{
model
.
OrderStateList
=
JsonConvert
.
DeserializeObject
<
List
<
GrudeCarStateModel
>>(
model
.
OrderStateJson
);
}
return
model
;
}
/// <summary>
/// 保存
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
bool
SetGuideCarInfo
(
RB_GuideCar_Base_Extend
demodel
)
{
var
model
=
guideCar_BaseRepository
.
GetList
(
new
RB_GuideCar_Base_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
}).
FirstOrDefault
();
if
(
model
==
null
)
{
return
guideCar_BaseRepository
.
Insert
(
demodel
);
}
else
{
model
.
UpdateBy
=
demodel
.
UpdateBy
;
model
.
AdvanceDay
=
demodel
.
AdvanceDay
;
model
.
CancelHour
=
demodel
.
CancelHour
;
model
.
CostPrice
=
demodel
.
CostPrice
;
model
.
InsuranceDescription
=
demodel
.
InsuranceDescription
;
model
.
InsuranceName
=
demodel
.
InsuranceName
;
model
.
IsConfirm
=
demodel
.
IsConfirm
;
model
.
OrderStateJson
=
demodel
.
OrderStateJson
;
model
.
PagePath
=
demodel
.
PagePath
;
model
.
SalePrice
=
demodel
.
SalePrice
;
model
.
UpdateDate
=
demodel
.
UpdateDate
;
return
guideCar_BaseRepository
.
Update
(
model
);
}
}
#
endregion
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
de51c0aa
...
...
@@ -16,6 +16,7 @@ using Newtonsoft.Json.Linq;
using
Mall.Common
;
using
Mall.Module.Product
;
using
Mall.AOP
;
using
Mall.Model.Extend.GuideCar
;
namespace
Mall.WebApi.Controllers.MallBase
{
...
...
@@ -38,10 +39,41 @@ namespace Mall.WebApi.Controllers.MallBase
var
req
=
RequestParm
;
var
model
=
guideCarModule
.
GetGuideCarInfo
(
req
.
TenantId
,
req
.
MallBaseId
);
return
ApiResult
.
Success
(
""
,
model
);
}
/// <summary>
/// 保存司导专区配置
/// </summary>
/// <returns></returns>
public
ApiResult
SetGuideCarInfo
()
{
var
req
=
RequestParm
;
RB_GuideCar_Base_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_GuideCar_Base_Extend
>(
req
.
msg
.
ToString
());
return
ApiResult
.
Success
();
if
(
string
.
IsNullOrEmpty
(
demodel
.
PagePath
))
{
return
ApiResult
.
ParamIsNull
(
"请输入详情页面链接地址"
);
}
demodel
.
OrderStateJson
=
""
;
if
(
demodel
.
OrderStateList
!=
null
&&
demodel
.
OrderStateList
.
Any
())
{
demodel
.
OrderStateJson
=
JsonConvert
.
SerializeObject
(
demodel
.
OrderStateList
);
}
demodel
.
TenantId
=
req
.
TenantId
;
demodel
.
MallBaseId
=
req
.
MallBaseId
;
demodel
.
UpdateBy
=
req
.
EmpId
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
bool
flag
=
guideCarModule
.
SetGuideCarInfo
(
demodel
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
...
...
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