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
2d90dd02
Commit
2d90dd02
authored
Aug 11, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增实体类
parent
c0adf10e
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
633 additions
and
6 deletions
+633
-6
RB_Groupbuy_Activity_Specification.cs
...odel/Entity/Product/RB_Groupbuy_Activity_Specification.cs
+94
-0
RB_Groupbuy_Activity_Specificationprice.cs
...Entity/Product/RB_Groupbuy_Activity_Specificationprice.cs
+142
-0
RB_Groupbuy_Activity_Specificationvalue.cs
...Entity/Product/RB_Groupbuy_Activity_Specificationvalue.cs
+96
-0
RB_Groupbuy_Activity_Extend.cs
Mall.Model/Extend/Product/RB_Groupbuy_Activity_Extend.cs
+12
-0
RB_Groupbuy_Activity_Specification_Extend.cs
...tend/Product/RB_Groupbuy_Activity_Specification_Extend.cs
+26
-0
RB_Groupbuy_Activity_Specificationprice_Extend.cs
...Product/RB_Groupbuy_Activity_Specificationprice_Extend.cs
+31
-0
RB_Groupbuy_Activity_Specificationvalue_Extend.cs
...Product/RB_Groupbuy_Activity_Specificationvalue_Extend.cs
+25
-0
GroupBuyConfigActivityModule.cs
Mall.Module.Product/GroupBuyConfigActivityModule.cs
+50
-3
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+31
-1
RB_Groupbuy_ActivityRepository.cs
Mall.Repository/Product/RB_Groupbuy_ActivityRepository.cs
+124
-1
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+2
-1
No files found.
Mall.Model/Entity/Product/RB_Groupbuy_Activity_Specification.cs
0 → 100644
View file @
2d90dd02
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 拼团活动商品规格表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Groupbuy_Activity_Specification
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
/// <summary>
/// 规格名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
Sort
{
get
;
set
;
}
/// <summary>
/// 是否启用规格图片 1是 2否
/// </summary>
public
int
?
EnabledImage
{
get
;
set
;
}
/// <summary>
/// Status
/// </summary>
public
int
?
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
}
}
\ No newline at end of file
Mall.Model/Entity/Product/RB_Groupbuy_Activity_Specificationprice.cs
0 → 100644
View file @
2d90dd02
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 拼团活动商品关联规格价格表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Groupbuy_Activity_Specificationprice
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
/// <summary>
/// 规格值 排序组
/// </summary>
public
string
SpecificationSort
{
get
;
set
;
}
/// <summary>
/// 价格
/// </summary>
public
decimal
?
SellingPrice
{
get
;
set
;
}
/// <summary>
/// 返佣总金额
/// </summary>
public
decimal
Commission
{
get
;
set
;
}
/// <summary>
/// 成本价
/// </summary>
public
decimal
CostMoney
{
get
;
set
;
}
/// <summary>
/// 库存
/// </summary>
public
int
?
InventoryNum
{
get
;
set
;
}
/// <summary>
/// 商品重量 克
/// </summary>
public
int
?
GoodsWeight
{
get
;
set
;
}
/// <summary>
/// 商品货号
/// </summary>
public
string
GoodsNumbers
{
get
;
set
;
}
/// <summary>
/// Status
/// </summary>
public
int
?
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
?
UpdateDate
{
get
;
set
;
}
}
}
Mall.Model/Entity/Product/RB_Groupbuy_Activity_Specificationvalue.cs
0 → 100644
View file @
2d90dd02
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 拼团活动商品关联规格值表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Groupbuy_Activity_Specificationvalue
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// GoodsId
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
/// <summary>
/// 规格id
/// </summary>
public
int
?
SpecificationId
{
get
;
set
;
}
/// <summary>
/// 规格值名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 规格图片
/// </summary>
public
string
Image
{
get
;
set
;
}
/// <summary>
/// 排序 不能重复 用于价格绑定Key
/// </summary>
public
int
?
Sort
{
get
;
set
;
}
/// <summary>
/// Status
/// </summary>
public
int
?
Status
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Groupbuy_Activity_Extend.cs
View file @
2d90dd02
...
...
@@ -111,5 +111,17 @@ namespace Mall.Model.Extend.Product
return
str
;
}
}
/// <summary>
/// 规格名列表
/// </summary>
public
List
<
RB_Groupbuy_Activity_Specification_Extend
>
SpecificationList
{
get
;
set
;
}
/// <summary>
/// 规格价格列表
/// </summary>
public
List
<
RB_Groupbuy_Activity_Specificationprice_Extend
>
SpecificationPriceList
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Groupbuy_Activity_Specification_Extend.cs
0 → 100644
View file @
2d90dd02
using
Mall.Model.Entity.Product
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 拼团活动商品规格表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Groupbuy_Activity_Specification_Extend
:
RB_Groupbuy_Activity_Specification
{
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 规格值列表
/// </summary>
public
List
<
RB_Groupbuy_Activity_Specificationvalue_Extend
>
SpecificationValueList
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Groupbuy_Activity_Specificationprice_Extend.cs
0 → 100644
View file @
2d90dd02
using
Mall.Model.Entity.Product
;
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 拼团活动商品关联规格价格表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Groupbuy_Activity_Specificationprice_Extend
:
RB_Groupbuy_Activity_Specificationprice
{
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 规格值列表
/// </summary>
public
object
AttrList
{
get
;
set
;
}
/// <summary>
/// 规格值
/// </summary>
public
string
AttrStr
{
get
;
set
;
}
/// <summary>
/// 查询排序
/// </summary>
public
int
?
SortNum
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Groupbuy_Activity_Specificationvalue_Extend.cs
0 → 100644
View file @
2d90dd02
using
Mall.Model.Entity.Product
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 拼团商品关联规格值表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Groupbuy_Activity_Specificationvalue_Extend
:
RB_Groupbuy_Activity_Specificationvalue
{
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 图片路径
/// </summary>
public
string
ImagePath
{
get
;
set
;
}
}
}
Mall.Module.Product/GroupBuyConfigActivityModule.cs
View file @
2d90dd02
...
...
@@ -18,6 +18,53 @@ namespace Mall.Module.Product
/// </summary>
private
readonly
RB_Groupbuy_ActivityRepository
groupbuy_ActivityRepository
=
new
RB_Groupbuy_ActivityRepository
();
/// <summary>
/// 拼团活动商品规格价格仓储层对象
/// </summary>
private
RB_Groupbuy_Activity_SpecificationPriceRepository
groupbuy_Activity_SpecificationPriceRepository
=
new
RB_Groupbuy_Activity_SpecificationPriceRepository
();
/// <summary>
/// 拼团活动商品关联规格值仓储层对象
/// </summary>
private
RB_Groupbuy_Activity_SpecificationValueRepository
groupbuy_Activity_SpecificationValueRepository
=
new
RB_Groupbuy_Activity_SpecificationValueRepository
();
/// <summary>
/// 拼团商品关联规格仓储层对象
/// </summary>
private
RB_Groupbuy_Activity_SpecificationRepository
groupbuy_Activity_SpecificationRepository
=
new
RB_Groupbuy_Activity_SpecificationRepository
();
/// <summary>
/// 获取拼团活动商品规格价格列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Specificationprice_Extend
>
GetGroupbuyActivitySpecificationpriceListModule
(
RB_Groupbuy_Activity_Specificationprice_Extend
dmodel
)
{
return
groupbuy_Activity_SpecificationPriceRepository
.
GetGroupbuyActivitySpecificationpriceListRepository
(
dmodel
);
}
/// <summary>
/// 获取拼团活动商品关联规格值列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Specificationvalue_Extend
>
GetGroupbuyActivitySpecificationValueListModule
(
RB_Groupbuy_Activity_Specificationvalue_Extend
dmodel
)
{
return
groupbuy_Activity_SpecificationValueRepository
.
GetGroupbuyActivitySpecificationValueListRepository
(
dmodel
);
}
/// <summary>
/// 获取拼团商品关联规格列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Specification_Extend
>
GetGroupbuyActivitySpecificationListModule
(
RB_Groupbuy_Activity_Specification_Extend
dmodel
)
{
return
groupbuy_Activity_SpecificationRepository
.
GetGroupbuyActivitySpecificationListRepository
(
dmodel
);
}
/// <summary>
/// 获取拼团活动分页列表
/// </summary>
...
...
@@ -28,13 +75,13 @@ namespace Mall.Module.Product
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Extend
>
GetGroupbuyActivityPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Groupbuy_Activity_Extend
query
)
{
var
list
=
groupbuy_ActivityRepository
.
GetGroupbuyActivityPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
var
list
=
groupbuy_ActivityRepository
.
GetGroupbuyActivityPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
Ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
ActivityId
));
if
(!
string
.
IsNullOrEmpty
(
Ids
))
{
{
}
}
return
list
;
...
...
Mall.Module.Product/ProductModule.cs
View file @
2d90dd02
...
...
@@ -3420,10 +3420,13 @@ namespace Mall.Module.Product
List
<
RB_Goods_Specification_Extend
>
SpecificationList
=
new
List
<
RB_Goods_Specification_Extend
>();
//规格值
List
<
RB_Goods_SpecificationValue_Extend
>
svlist
=
new
List
<
RB_Goods_SpecificationValue_Extend
>();
//规格值列表
List
<
RB_Goods_SpecificationPrice_Extend
>
SpecificationPriceList
=
new
List
<
RB_Goods_SpecificationPrice_Extend
>();
if
(
IsGetSpec
==
1
)
{
SpecificationList
=
goods_SpecificationRepository
.
GetList
(
new
RB_Goods_Specification_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
svlist
=
goods_SpecificationValueRepository
.
GetList
(
new
RB_Goods_SpecificationValue_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
SpecificationPriceList
=
goods_SpecificationPriceRepository
.
GetList
(
new
RB_Goods_SpecificationPrice_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
}
foreach
(
var
item
in
list
)
...
...
@@ -3450,9 +3453,36 @@ namespace Mall.Module.Product
subItem
.
SpecificationValueList
=
svlist
.
Where
(
x
=>
x
.
SpecificationId
==
subItem
.
Id
).
ToList
();
}
}
var
tempPriceList
=
SpecificationPriceList
?.
Where
(
qitem
=>
qitem
.
GoodsId
==
item
.
Id
)?.
ToList
()
??
new
List
<
RB_Goods_SpecificationPrice_Extend
>();
int
SortNum
=
1
;
foreach
(
var
childItem
in
tempPriceList
)
{
if
(!
string
.
IsNullOrEmpty
(
childItem
.
SpecificationSort
))
{
var
ssarr
=
childItem
.
SpecificationSort
.
Split
(
':'
);
int
Sort
=
Convert
.
ToInt32
(
ssarr
[
0
]);
string
pic_url
=
item
.
SpecificationList
[
0
].
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Sort
).
FirstOrDefault
()?.
ImagePath
;
List
<
object
>
AttrList
=
new
List
<
object
>();
for
(
int
i
=
0
;
i
<
ssarr
.
Length
;
i
++)
{
var
smodel
=
item
.
SpecificationList
[
i
];
var
svmodel
=
smodel
.
SpecificationValueList
.
Where
(
x
=>
x
.
Sort
==
Convert
.
ToInt32
(
ssarr
[
i
])).
FirstOrDefault
();
AttrList
.
Add
(
new
{
SName
=
smodel
.
Name
,
SId
=
smodel
.
Id
,
SVId
=
svmodel
.
Sort
,
SVName
=
svmodel
.
Name
});
}
childItem
.
AttrList
=
AttrList
;
}
childItem
.
SortNum
=
SortNum
;
SortNum
++;
}
item
.
SpecificationPriceList
=
tempPriceList
.
OrderByDescending
(
x
=>
x
.
SortNum
).
ToList
();
}
}
}
return
list
;
}
...
...
Mall.Repository/Product/RB_Groupbuy_ActivityRepository.cs
View file @
2d90dd02
...
...
@@ -39,7 +39,7 @@ WHERE 1=1
'{1}' BETWEEN StartTime AND EndTime OR
StartTime BETWEEN '{0}' AND '{1}' OR
EndTime BETWEEN '{0}' AND '{1}'
)"
,
Convert
.
ToDateTime
(
query
.
QStartDate
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Convert
.
ToDateTime
(
query
.
QEndDate
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
)"
,
Convert
.
ToDateTime
(
query
.
QStartDate
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Convert
.
ToDateTime
(
query
.
QEndDate
).
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
QGoodName
))
{
...
...
@@ -71,4 +71,127 @@ WHERE 1=1
}
}
/// <summary>
/// 拼团商品关联规格价格仓储层
/// </summary>
public
class
RB_Groupbuy_Activity_SpecificationPriceRepository
:
BaseRepository
<
RB_Groupbuy_Activity_Specificationprice
>
{
/// <summary>
/// 获取拼团活动商品规格价格列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Specificationprice_Extend
>
GetGroupbuyActivitySpecificationpriceListRepository
(
RB_Groupbuy_Activity_Specificationprice_Extend
dmodel
)
{
string
where
=
$" 1=1 and
{
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationprice_Extend
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select * from rb_groupbuy_activity_specificationprice where
{
where
}
order by Id desc"
;
return
Get
<
RB_Groupbuy_Activity_Specificationprice_Extend
>(
sql
).
ToList
();
}
}
/// <summary>
/// 拼团活动商品关联规格值仓储层
/// </summary>
public
class
RB_Groupbuy_Activity_SpecificationValueRepository
:
BaseRepository
<
RB_Groupbuy_Activity_Specificationvalue
>
{
/// <summary>
/// 获取拼团活动商品关联规格值列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Specificationvalue_Extend
>
GetGroupbuyActivitySpecificationValueListRepository
(
RB_Groupbuy_Activity_Specificationvalue_Extend
dmodel
)
{
string
where
=
$" 1=1 and
{
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
SpecificationId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
SpecificationId
)}
=
{
dmodel
.
SpecificationId
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specificationvalue_Extend
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select * from rb_groupbuy_activity_specificationvalue where
{
where
}
order by Id asc"
;
return
Get
<
RB_Groupbuy_Activity_Specificationvalue_Extend
>(
sql
).
ToList
();
}
}
/// <summary>
/// 拼团商品关联规格仓储层
/// </summary>
public
class
RB_Groupbuy_Activity_SpecificationRepository
:
BaseRepository
<
RB_Groupbuy_Activity_Specification
>
{
/// <summary>
/// 获取拼团商品关联规格列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Groupbuy_Activity_Specification_Extend
>
GetGroupbuyActivitySpecificationListRepository
(
RB_Groupbuy_Activity_Specification_Extend
dmodel
)
{
string
where
=
$" 1=1 and
{
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Groupbuy_Activity_Specification_Extend
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select * from rb_groupbuy_activity_specification where
{
where
}
order by Id asc"
;
return
Get
<
RB_Groupbuy_Activity_Specification_Extend
>(
sql
).
ToList
();
}
}
}
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
2d90dd02
...
...
@@ -1398,7 +1398,8 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
GoodsWeight
,
x
.
IsDefaultService
,
x
.
GoodsService
,
x
.
SpecificationList
x
.
SpecificationList
,
x
.
SpecificationPriceList
,
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
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