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
ae764314
Commit
ae764314
authored
Sep 01, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
81ae2c0d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
352 additions
and
13 deletions
+352
-13
RB_GuideCar_Site.cs
Mall.Model/Entity/GuideCar/RB_GuideCar_Site.cs
+36
-0
RB_GuideCar_SiteRegion.cs
Mall.Model/Entity/GuideCar/RB_GuideCar_SiteRegion.cs
+2
-2
RB_GuideCar_SiteRegion_Extend.cs
Mall.Model/Extend/GuideCar/RB_GuideCar_SiteRegion_Extend.cs
+1
-1
RB_GuideCar_Site_Extend.cs
Mall.Model/Extend/GuideCar/RB_GuideCar_Site_Extend.cs
+22
-0
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+188
-2
RB_GuideCar_SiteRegionRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
+8
-8
RB_GuideCar_SiteRepository.cs
Mall.Repository/GuideCar/RB_GuideCar_SiteRepository.cs
+95
-0
No files found.
Mall.Model/Entity/GuideCar/RB_GuideCar_Site.cs
0 → 100644
View file @
ae764314
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.GuideCar
{
public
class
RB_GuideCar_Site
{
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 商户id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 站点名称
/// </summary>
public
string
SiteName
{
get
;
set
;
}
public
int
Status
{
get
;
set
;
}
public
DateTime
CreateDate
{
get
;
set
;
}
public
DateTime
UpdateDate
{
get
;
set
;
}
public
int
RulesType
{
get
;
set
;
}
}
}
Mall.Model/Entity/GuideCar/RB_GuideCar_SiteRegion.cs
View file @
ae764314
...
@@ -17,7 +17,7 @@ namespace Mall.Model.Entity.BaseSetUp
...
@@ -17,7 +17,7 @@ namespace Mall.Model.Entity.BaseSetUp
/// <summary>
/// <summary>
/// 价格
/// 价格
/// </summary>
/// </summary>
public
int
RulesPric
eId
{
get
;
set
;
}
public
int
Sit
eId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 地区id
/// 地区id
...
@@ -38,7 +38,7 @@ namespace Mall.Model.Entity.BaseSetUp
...
@@ -38,7 +38,7 @@ namespace Mall.Model.Entity.BaseSetUp
public
int
MallBaseId
{
get
;
set
;
}
public
int
MallBaseId
{
get
;
set
;
}
public
RulesTypeEnum
RulesType
{
get
;
set
;
}
public
int
RulesType
{
get
;
set
;
}
public
int
Status
{
get
;
set
;
}
public
int
Status
{
get
;
set
;
}
...
...
Mall.Model/Extend/GuideCar/RB_GuideCar_SiteRegion_Extend.cs
View file @
ae764314
...
@@ -15,7 +15,7 @@ namespace Mall.Model.Extend.GuideCar
...
@@ -15,7 +15,7 @@ namespace Mall.Model.Extend.GuideCar
/// </summary>
/// </summary>
public
string
RegionName
{
get
;
set
;
}
public
string
RegionName
{
get
;
set
;
}
public
string
Pric
eIds
{
get
;
set
;
}
public
string
Sit
eIds
{
get
;
set
;
}
/// <summary>
/// <summary>
...
...
Mall.Model/Extend/GuideCar/RB_GuideCar_Site_Extend.cs
0 → 100644
View file @
ae764314
using
Mall.Model.Entity.GuideCar
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.GuideCar
{
/// <summary>
/// 司导站点扩展表
/// </summary>
public
class
RB_GuideCar_Site_Extend
:
RB_GuideCar_Site
{
/// <summary>
/// 地区列表
/// </summary>
public
List
<
RB_GuideCar_SiteRegion_Extend
>
RegionList
{
get
;
set
;
}
/// <summary>
/// 规格的ids
/// </summary>
public
string
SiteIds
{
get
;
set
;
}
}
}
Mall.Module.Product/GuideCarModule.cs
View file @
ae764314
...
@@ -9,10 +9,12 @@ using Mall.Common.Plugin;
...
@@ -9,10 +9,12 @@ using Mall.Common.Plugin;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Model.Extend.BaseSetUp
;
using
Mall.Model.Extend.GuideCar
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Extend.User
;
using
Mall.Model.Query
;
using
Mall.Model.Query
;
using
Mall.Repository.BaseSetUp
;
using
Mall.Repository.BaseSetUp
;
using
Mall.Repository.GuideCar
;
using
Mall.Repository.Product
;
using
Mall.Repository.Product
;
using
Mall.Repository.User
;
using
Mall.Repository.User
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
...
@@ -37,7 +39,7 @@ namespace Mall.Module.Product
...
@@ -37,7 +39,7 @@ namespace Mall.Module.Product
/// 商品分类
/// 商品分类
/// </summary>
/// </summary>
private
readonly
RB_Product_CategoryRepository
product_CategoryRepository
=
new
RB_Product_CategoryRepository
();
private
readonly
RB_Product_CategoryRepository
product_CategoryRepository
=
new
RB_Product_CategoryRepository
();
/// <summary>
/// <summary>
/// 商品
/// 商品
/// </summary>
/// </summary>
...
@@ -83,7 +85,7 @@ namespace Mall.Module.Product
...
@@ -83,7 +85,7 @@ namespace Mall.Module.Product
/// 商品会员价格
/// 商品会员价格
/// </summary>
/// </summary>
private
readonly
RB_Goods_MemberPriceRepository
goods_MemberPriceRepository
=
new
RB_Goods_MemberPriceRepository
();
private
readonly
RB_Goods_MemberPriceRepository
goods_MemberPriceRepository
=
new
RB_Goods_MemberPriceRepository
();
/// <summary>
/// <summary>
/// 商户仓储层对象
/// 商户仓储层对象
/// </summary>
/// </summary>
...
@@ -131,6 +133,14 @@ namespace Mall.Module.Product
...
@@ -131,6 +133,14 @@ namespace Mall.Module.Product
/// </summary>
/// </summary>
private
RB_SmallShops_PriceRepository
smallShops_PriceRepository
=
new
RB_SmallShops_PriceRepository
();
private
RB_SmallShops_PriceRepository
smallShops_PriceRepository
=
new
RB_SmallShops_PriceRepository
();
/// <summary>
/// 司导站点
/// </summary>
private
RB_GuideCar_SiteRepository
SiteRepository
=
new
RB_GuideCar_SiteRepository
();
/// <summary>
/// 司导站点地区
/// </summary>
private
RB_GuideCar_SiteRegionRepository
SiteRegionRepository
=
new
RB_GuideCar_SiteRegionRepository
();
#
region
基础配置
#
region
基础配置
...
@@ -140,7 +150,183 @@ namespace Mall.Module.Product
...
@@ -140,7 +150,183 @@ namespace Mall.Module.Product
#
region
站点配置
#
region
站点配置
/// <summary>
/// 包邮规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_Site_Extend
>
GetLogisticsPinkageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_GuideCar_Site_Extend
query
)
{
List
<
RB_GuideCar_Site_Extend
>
list
=
SiteRepository
.
GetPageListRepository
(
pageIndex
,
pageSize
,
out
rowCount
,
query
);
if
(
list
!=
null
&&
list
.
Any
())
{
List
<
RB_GuideCar_SiteRegion_Extend
>
listLogisticsRulesRegion
=
SiteRegionRepository
.
GetListRepository
(
new
RB_GuideCar_SiteRegion_Extend
{
TenantId
=
query
.
TenantId
,
RulesType
=
1
,
MallBaseId
=
query
.
MallBaseId
,
SiteIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
ID
))
});
foreach
(
var
item
in
list
)
{
item
.
RegionList
=
new
List
<
RB_GuideCar_SiteRegion_Extend
>();
item
.
RegionList
=
listLogisticsRulesRegion
.
Where
(
x
=>
x
.
SiteId
==
item
.
ID
).
ToList
();
}
}
return
list
;
}
/// <summary>
/// 包邮实体
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
RB_GuideCar_Site_Extend
GetPinkageModel
(
RB_GuideCar_Site_Extend
query
)
{
RB_GuideCar_Site_Extend
model
=
SiteRepository
.
GetLogisticsRulesList
(
query
).
FirstOrDefault
();
if
(
model
!=
null
)
{
//List<RB_Logistics_RulesRegion_Extend> listLogisticsRulesRegion = logisticsRulesRegionRepository.GetListRepository(new RB_Logistics_RulesRegion_Extend { TenantId = query.TenantId, RulesType = query.RulesType, MallBaseId = query.MallBaseId, RulesPriceId = model.ID });
//model.List = new List<RB_Logistics_RulesRegion_Extend>();
//model.List = listLogisticsRulesRegion;
}
return
model
;
}
/// <summary>
/// 新增/修改基础信息
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
AddOrUpdatePinkage
(
RB_Logistics_Rules_Extend
model
)
{
bool
flag
=
false
;
var
trans
=
logisticsRulesRepository
.
DbTransaction
;
try
{
int
rulesId
=
0
;
if
(
model
.
ID
==
0
)
{
rulesId
=
logisticsRulesRepository
.
Insert
(
model
,
trans
);
flag
=
rulesId
>
0
;
}
else
{
rulesId
=
model
.
ID
;
flag
=
logisticsRulesRepository
.
Update
(
model
,
trans
);
List
<
RB_Logistics_RulesRegion_Extend
>
listLogisticsRulesRegion
=
logisticsRulesRegionRepository
.
GetListRepository
(
new
RB_Logistics_RulesRegion_Extend
{
TenantId
=
model
.
TenantId
,
RulesType
=
model
.
RulesType
,
MallBaseId
=
model
.
MallBaseId
,
RulesPriceId
=
model
.
ID
});
//删除之前的区域
foreach
(
var
itemRegion
in
listLogisticsRulesRegion
.
Where
(
x
=>
x
.
RulesPriceId
==
model
.
ID
))
{
IDictionary
<
string
,
object
>
filedsRegion
=
new
Dictionary
<
string
,
object
>()
//删除价格下面对应的地区
{
{
nameof
(
RB_Logistics_RulesRegion
.
Status
),
1
},
{
nameof
(
RB_Logistics_RulesRegion
.
UpdateDate
),
System
.
DateTime
.
Now
},
};
IList
<
WhereHelper
>
whereHelpersRegion
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_RulesRegion
.
ID
),
FiledValue
=
itemRegion
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
logisticsRulesRegionRepository
.
Update
(
filedsRegion
,
whereHelpersRegion
,
trans
);
}
}
if
(
model
.
List
!=
null
&&
model
.
List
.
Any
())
{
model
.
List
.
ForEach
(
x
=>
x
.
TenantId
=
model
.
TenantId
);
model
.
List
.
ForEach
(
x
=>
x
.
CreateDate
=
System
.
DateTime
.
Now
);
model
.
List
.
ForEach
(
x
=>
x
.
ID
=
0
);
model
.
List
.
ForEach
(
x
=>
x
.
RulesPriceId
=
rulesId
);
model
.
List
.
ForEach
(
x
=>
x
.
RulesType
=
model
.
RulesType
);
model
.
List
.
ForEach
(
x
=>
x
.
MallBaseId
=
model
.
MallBaseId
);
logisticsRulesRegionRepository
.
InsertBatch
(
model
.
List
,
trans
);
}
logisticsRulesRepository
.
DBSession
.
Commit
();
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"AddOrUpdatePinkage"
);
logisticsRulesRepository
.
DBSession
.
Rollback
(
"AddOrUpdatePinkage"
);
return
false
;
}
return
flag
;
}
/// <summary>
/// 删除包邮规则
/// </summary>
/// <param name="gradeId"></param>
/// <param name="uid"></param>
/// <returns></returns>
public
bool
DelPinkageInfo
(
int
id
,
int
uid
,
int
mallBaseId
)
{
var
trans
=
logisticsRulesRepository
.
DbTransaction
;
bool
flag
;
try
{
Dictionary
<
string
,
object
>
cols
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Logistics_Rules
.
Status
),
1
},
{
nameof
(
RB_Logistics_Rules
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
ID
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
TenantId
),
FiledValue
=
Convert
.
ToInt32
(
uid
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
MallBaseId
),
FiledValue
=
Convert
.
ToInt32
(
mallBaseId
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_Rules
.
RulesType
),
FiledValue
=
Convert
.
ToInt32
(
Common
.
Enum
.
MallBase
.
RulesTypeEnum
.
Pinkage
),
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
logisticsRulesRepository
.
Update
(
cols
,
wheres1
,
trans
);
IDictionary
<
string
,
object
>
filedsRegion
=
new
Dictionary
<
string
,
object
>()
//删除价格下面对应的地区
{
{
nameof
(
RB_Logistics_RulesRegion
.
Status
),
1
},
{
nameof
(
RB_Logistics_RulesRegion
.
UpdateDate
),
System
.
DateTime
.
Now
},
};
IList
<
WhereHelper
>
whereHelpersRegion
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_RulesRegion
.
RulesPriceId
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_RulesRegion
.
TenantId
),
FiledValue
=
Convert
.
ToInt32
(
uid
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_RulesRegion
.
MallBaseId
),
FiledValue
=
Convert
.
ToInt32
(
mallBaseId
),
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Logistics_RulesRegion
.
RulesType
),
FiledValue
=
Convert
.
ToInt32
(
Common
.
Enum
.
MallBase
.
RulesTypeEnum
.
Pinkage
),
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
logisticsRulesRegionRepository
.
Update
(
filedsRegion
,
whereHelpersRegion
,
trans
);
logisticsRulesRepository
.
DBSession
.
Commit
();
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
"DelPinkageInfo"
);
logisticsRulesRepository
.
DBSession
.
Rollback
(
"DelPinkageInfo"
);
return
false
;
}
return
flag
;
}
#
endregion
#
endregion
}
}
}
}
Mall.Repository/GuideCar/RB_GuideCar_SiteRegionRepository.cs
View file @
ae764314
...
@@ -44,13 +44,13 @@ LEFT JOIN {DestinationTableName} as c on b.ParentID = c.ID WHERE a.{nameof(RB_
...
@@ -44,13 +44,13 @@ LEFT JOIN {DestinationTableName} as c on b.ParentID = c.ID WHERE a.{nameof(RB_
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
}
if
(
query
.
RulesPric
eId
>
0
)
if
(
query
.
Sit
eId
>
0
)
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
=
{
query
.
RulesPric
eId
}
"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
SiteId
)}
=
{
query
.
Sit
eId
}
"
);
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
Pric
eIds
))
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
Sit
eIds
))
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
in (
{
query
.
Pric
eIds
}
)"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
SiteId
)}
in (
{
query
.
Sit
eIds
}
)"
);
}
}
}
}
return
Get
<
RB_GuideCar_SiteRegion_Extend
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_GuideCar_SiteRegion_Extend
>(
builder
.
ToString
()).
ToList
();
...
@@ -80,13 +80,13 @@ LEFT JOIN {DestinationTableName} as c on b.ParentID = c.ID WHERE a.{nameof(RB_
...
@@ -80,13 +80,13 @@ LEFT JOIN {DestinationTableName} as c on b.ParentID = c.ID WHERE a.{nameof(RB_
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
}
if
(
query
.
RulesPric
eId
>
0
)
if
(
query
.
Sit
eId
>
0
)
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
=
{
query
.
RulesPric
eId
}
"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
SiteId
)}
=
{
query
.
Sit
eId
}
"
);
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
Pric
eIds
))
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
Sit
eIds
))
{
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
RulesPriceId
)}
in (
{
query
.
Pric
eIds
}
)"
);
builder
.
Append
(
$" AND a.
{
nameof
(
RB_GuideCar_SiteRegion_Extend
.
SiteId
)}
in (
{
query
.
Sit
eIds
}
)"
);
}
}
}
}
return
Get
<
RB_GuideCar_SiteRegion_Extend
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_GuideCar_SiteRegion_Extend
>(
builder
.
ToString
()).
ToList
();
...
...
Mall.Repository/GuideCar/RB_GuideCar_SiteRepository.cs
0 → 100644
View file @
ae764314
using
Mall.Model.Entity.GuideCar
;
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_SiteRepository
:
BaseRepository
<
RB_GuideCar_Site
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_GuideCar_Site
);
}
}
/// <summary>
/// 物料规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_Site_Extend
>
GetPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_GuideCar_Site_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_GuideCar_Site_Extend
.
Status
)}
=0"
);
if
(
query
!=
null
)
{
// where += $@" and {nameof(RB_Customer_InfoCreate.CustomerId)}={dmodel.CustomerId}";
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
SiteName
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
SiteName
)}
like '%
{
query
.
SiteName
}
%'"
);
}
if
(
query
.
RulesType
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
RulesType
)}
=
{(
int
)
query
.
RulesType
}
"
);
}
}
return
GetPage
<
RB_GuideCar_Site_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 物流规则列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_GuideCar_Site_Extend
>
GetLogisticsRulesList
(
RB_GuideCar_Site_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE
{
nameof
(
RB_GuideCar_Site_Extend
.
Status
)}
=0 "
);
if
(
query
!=
null
)
{
if
(
query
.
ID
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
SiteName
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
SiteName
)}
like '%
{
query
.
SiteName
}
%'"
);
}
if
(
query
.
RulesType
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
RulesType
)}
=
{(
int
)
query
.
RulesType
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
SiteIds
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_GuideCar_Site_Extend
.
ID
)}
in(
{
query
.
SiteIds
}
)"
);
}
}
return
Get
<
RB_GuideCar_Site_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