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
81ae2c0d
Commit
81ae2c0d
authored
Sep 01, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
4f2a751e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
115 additions
and
0 deletions
+115
-0
RB_GuideCar_SiteRegion_Extend.cs
Mall.Model/Extend/GuideCar/RB_GuideCar_SiteRegion_Extend.cs
+31
-0
RB_GuideCar_SiteRegionRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
+84
-0
No files found.
Mall.Model/Extend/GuideCar/RB_GuideCar_SiteRegion_Extend.cs
0 → 100644
View file @
81ae2c0d
using
Mall.Model.Entity.BaseSetUp
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.GuideCar
{
/// <summary>
/// 司导-站点扩展表
/// </summary>
public
class
RB_GuideCar_SiteRegion_Extend
:
RB_GuideCar_SiteRegion
{
/// <summary>
/// 地区名字
/// </summary>
public
string
RegionName
{
get
;
set
;
}
public
string
PriceIds
{
get
;
set
;
}
/// <summary>
/// 地区父级id
/// </summary>
public
int
ParentID
{
get
;
set
;
}
/// <summary>
/// 地区父级的父级id
/// </summary>
public
int
GrandpaID
{
get
;
set
;
}
}
}
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
View file @
81ae2c0d
using
Mall.Model.Entity.BaseSetUp
;
using
Mall.Model.Extend.GuideCar
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.GuideCar
{
public
class
RB_GuideCar_SiteRegionRepository
:
BaseRepository
<
RB_GuideCar_SiteRegion
>
{
// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_GuideCar_SiteRegion
);
}
}
// <summary>
/// 表名称
/// </summary>
public
string
DestinationTableName
{
get
{
return
nameof
(
RB_Destination
);
}
}
/// <summary>
/// 获取物流地区列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_SiteRegion_Extend
>
GetListRepository
(
RB_GuideCar_SiteRegion_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@
$" SELECT a.*,b.`Name` as RegionName,b.ParentID,c.ParentID as GrandpaID FROM
{
TableName
}
as a
LEFT
JOIN
{
DestinationTableName
}
as
b
on
a
.
RegionId
=
b
.
ID
LEFT
JOIN
{
DestinationTableName
}
as
c
on
b
.
ParentID
=
c
.
ID
WHERE
a
.{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
Status
)}=
0
");
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
RulesType
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesType
)}
=
{(
int
)
query
.
RulesType
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
RulesPriceId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
=
{
query
.
RulesPriceId
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
PriceIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
in (
{
query
.
PriceIds
}
)"
);
}
}
return
Get
<
RB_GuideCar_SiteRegion_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取物流地区列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_SiteRegion_Extend
>
GetListForSingle
(
RB_GuideCar_SiteRegion_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
@
$" SELECT a.* FROM
{
TableName
}
as a WHERE a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
Status
)}
=0"
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
RulesType
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesType
)}
=
{(
int
)
query
.
RulesType
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
RulesPriceId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
=
{
query
.
RulesPriceId
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
PriceIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
in (
{
query
.
PriceIds
}
)"
);
}
}
return
Get
<
RB_GuideCar_SiteRegion_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
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