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
8f5f449d
Commit
8f5f449d
authored
Sep 01, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
6c9ce8e0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
127 additions
and
6 deletions
+127
-6
RB_GuideCar_Site.cs
Mall.Model/Entity/GuideCar/RB_GuideCar_Site.cs
+7
-1
RB_GuideCar_SiteRegion.cs
Mall.Model/Entity/GuideCar/RB_GuideCar_SiteRegion.cs
+1
-1
RB_GuideCar_SiteRegion_Extend.cs
Mall.Model/Extend/GuideCar/RB_GuideCar_SiteRegion_Extend.cs
+3
-0
RB_GuideCar_Site_Extend.cs
Mall.Model/Extend/GuideCar/RB_GuideCar_Site_Extend.cs
+3
-0
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+4
-4
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+109
-0
No files found.
Mall.Model/Entity/GuideCar/RB_GuideCar_Site.cs
View file @
8f5f449d
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.GuideCar
{
public
class
RB_GuideCar_Site
/// <summary>
/// 司导-站点实体表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_GuideCar_Site
{
public
int
ID
{
get
;
set
;
}
...
...
Mall.Model/Entity/GuideCar/RB_GuideCar_SiteRegion.cs
View file @
8f5f449d
...
...
@@ -7,7 +7,7 @@ using System.Text;
namespace
Mall.Model.Entity.BaseSetUp
{
/// <summary>
///
运费规则地区
///
司导-站点地区实体表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
...
...
Mall.Model/Extend/GuideCar/RB_GuideCar_SiteRegion_Extend.cs
View file @
8f5f449d
...
...
@@ -2,12 +2,15 @@
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.GuideCar
{
/// <summary>
/// 司导-站点扩展表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_GuideCar_SiteRegion_Extend
:
RB_GuideCar_SiteRegion
{
/// <summary>
...
...
Mall.Model/Extend/GuideCar/RB_GuideCar_Site_Extend.cs
View file @
8f5f449d
...
...
@@ -2,12 +2,15 @@
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.GuideCar
{
/// <summary>
/// 司导站点扩展表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_GuideCar_Site_Extend
:
RB_GuideCar_Site
{
/// <summary>
...
...
Mall.Module.Product/GuideCarModule.cs
View file @
8f5f449d
...
...
@@ -186,7 +186,7 @@ namespace Mall.Module.Product
#
region
站点配置
/// <summary>
///
包邮规则
列表
///
站点配置
列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
...
...
@@ -209,7 +209,7 @@ namespace Mall.Module.Product
}
/// <summary>
///
包邮实体
///
站点配置
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
...
...
@@ -227,7 +227,7 @@ namespace Mall.Module.Product
}
/// <summary>
/// 新增/修改
基础信息
/// 新增/修改
站点配置
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
...
...
@@ -288,7 +288,7 @@ namespace Mall.Module.Product
}
/// <summary>
/// 删除
包邮规则
/// 删除
站点配置
/// </summary>
/// <param name="gradeId"></param>
/// <param name="uid"></param>
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
8f5f449d
...
...
@@ -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
{
...
...
@@ -47,7 +48,115 @@ namespace Mall.WebApi.Controllers.MallBase
#
region
站点配置
/// <summary>
/// 列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGuideCarSiteList
()
{
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
RB_GuideCar_Site_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_GuideCar_Site_Extend
>(
RequestParm
.
msg
.
ToString
());
demodel
.
TenantId
=
UserInfo
.
TenantId
;
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
demodel
.
RulesType
=
1
;
var
list
=
guideCarModule
.
GetGuideCarSiteList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
ID
,
x
.
SiteName
,
RegionList
=
x
.
RegionList
.
Select
(
x
=>
x
.
RegionName
)
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
public
ApiResult
DelGuideCarSiteInfo
()
{
var
parms
=
RequestParm
;
JObject
parmsJob
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
int
Id
=
parmsJob
.
GetInt
(
"Id"
,
0
);
if
(
Id
<=
0
)
{
return
ApiResult
.
Failed
(
"请传递参数"
);
}
bool
flag
=
guideCarModule
.
DelGuideCarSiteInfo
(
Id
,
UserInfo
.
TenantId
,
parms
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取详情
/// </summary>
/// <returns></returns>
public
ApiResult
GetGuideCarSiteModel
()
{
var
parms
=
RequestParm
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_GuideCar_Site_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
RulesType
=
1
;
var
oldLogisticsModel
=
guideCarModule
.
GetGuideCarSiteModel
(
query
);
if
(
oldLogisticsModel
==
null
)
{
oldLogisticsModel
=
new
RB_GuideCar_Site_Extend
();
}
return
ApiResult
.
Success
(
""
,
oldLogisticsModel
);
}
/// <summary>
/// 保存司导站点信息
/// </summary>
/// <returns></returns>
public
ApiResult
AddOrUpdateGuideCarSite
()
{
var
parms
=
RequestParm
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_GuideCar_Site_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
TenantId
=
UserInfo
.
TenantId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
RulesType
=
1
;
if
(
query
==
null
)
{
return
ApiResult
.
Failed
(
"请传入站点信息"
);
}
else
{
if
(
string
.
IsNullOrWhiteSpace
(
query
.
SiteName
))
{
return
ApiResult
.
Failed
(
"请输入站点名称"
);
}
if
(
query
.
RegionList
==
null
||
!
query
.
RegionList
.
Any
())
{
return
ApiResult
.
Failed
(
"请选择地区"
);
}
query
.
TenantId
=
UserInfo
.
TenantId
;
if
(
query
.
ID
==
0
)
{
query
.
CreateDate
=
System
.
DateTime
.
Now
;
}
query
.
UpdateDate
=
System
.
DateTime
.
Now
;
bool
result
=
guideCarModule
.
AddOrUpdateGuideCarSite
(
query
);
if
(
result
)
{
return
ApiResult
.
Success
(
"站点信息保存成功"
);
}
else
{
return
ApiResult
.
Failed
(
"站点信息保存失败"
);
}
}
}
#
endregion
}
}
\ No newline at end of file
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