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
dbb4f612
Commit
dbb4f612
authored
Apr 29, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品列表
parent
22dcedbd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
2197 additions
and
1 deletion
+2197
-1
RB_Goods.cs
Mall.Model/Entity/Product/RB_Goods.cs
+374
-0
RB_Goods_Area.cs
Mall.Model/Entity/Product/RB_Goods_Area.cs
+82
-0
RB_Goods_Category.cs
Mall.Model/Entity/Product/RB_Goods_Category.cs
+74
-0
RB_Goods_Specification.cs
Mall.Model/Entity/Product/RB_Goods_Specification.cs
+90
-0
RB_Goods_SpecificationPrice.cs
Mall.Model/Entity/Product/RB_Goods_SpecificationPrice.cs
+114
-0
RB_Goods_SpecificationValue.cs
Mall.Model/Entity/Product/RB_Goods_SpecificationValue.cs
+98
-0
RB_Goods_Area.cs
Mall.Model/Extend/Product/RB_Goods_Area.cs
+28
-0
RB_Goods_Area_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Area_Extend.cs
+25
-0
RB_Goods_Category_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Category_Extend.cs
+25
-0
RB_Goods_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Extend.cs
+66
-0
RB_Goods_SpecificationPrice_Extend.cs
...odel/Extend/Product/RB_Goods_SpecificationPrice_Extend.cs
+21
-0
RB_Goods_SpecificationValue_Extend.cs
...odel/Extend/Product/RB_Goods_SpecificationValue_Extend.cs
+25
-0
RB_Goods_Specification_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Specification_Extend.cs
+26
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+551
-1
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+119
-0
RB_Goods_AreaRepository.cs
Mall.Repository/Product/RB_Goods_AreaRepository.cs
+46
-0
RB_Goods_CategoryRepository.cs
Mall.Repository/Product/RB_Goods_CategoryRepository.cs
+46
-0
RB_Goods_SpecificationPriceRepository.cs
...pository/Product/RB_Goods_SpecificationPriceRepository.cs
+44
-0
RB_Goods_SpecificationRepository.cs
Mall.Repository/Product/RB_Goods_SpecificationRepository.cs
+44
-0
RB_Goods_SpecificationValueRepository.cs
...pository/Product/RB_Goods_SpecificationValueRepository.cs
+47
-0
ProductController.cs
Mall.WebApi/Controllers/Product/ProductController.cs
+252
-0
No files found.
Mall.Model/Entity/Product/RB_Goods.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商品名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 轮播图 json 格式 第一张为封面图
/// </summary>
public
string
CarouselImage
{
get
;
set
;
}
/// <summary>
/// 视频地址
/// </summary>
public
string
VideoAddress
{
get
;
set
;
}
/// <summary>
/// 自定义分享标题
/// </summary>
public
string
CustomShareTitles
{
get
;
set
;
}
/// <summary>
/// 自定义分享图片
/// </summary>
public
int
?
CustomShareImage
{
get
;
set
;
}
/// <summary>
/// 商品状态 1销售中 2下架中
/// </summary>
public
int
?
GoodsStatus
{
get
;
set
;
}
/// <summary>
/// 库存数量
/// </summary>
public
int
?
InventoryNum
{
get
;
set
;
}
/// <summary>
/// 默认规格名
/// </summary>
public
string
DefaultSpecificationName
{
get
;
set
;
}
/// <summary>
/// 是否自定义规格 1是 2否
/// </summary>
public
int
?
IsCustomSpecification
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
Sort
{
get
;
set
;
}
/// <summary>
/// 售价
/// </summary>
public
decimal
?
SellingPrice
{
get
;
set
;
}
/// <summary>
/// 原价
/// </summary>
public
decimal
?
OriginalPrice
{
get
;
set
;
}
/// <summary>
/// 单位
/// </summary>
public
string
Unit
{
get
;
set
;
}
/// <summary>
/// 成本价格
/// </summary>
public
decimal
?
CostPrice
{
get
;
set
;
}
/// <summary>
/// 商品面议 1是 2否
/// </summary>
public
int
?
IsGoodsNegotiable
{
get
;
set
;
}
/// <summary>
/// 已售出数量
/// </summary>
public
int
?
SalesNum
{
get
;
set
;
}
/// <summary>
/// 商品货号
/// </summary>
public
string
GoodsNumbers
{
get
;
set
;
}
/// <summary>
/// 商品重量 克
/// </summary>
public
int
?
GoodsWeight
{
get
;
set
;
}
/// <summary>
/// 是否默认服务 1是 2否
/// </summary>
public
int
?
IsDefaultService
{
get
;
set
;
}
/// <summary>
/// 商品服务 json格式
/// </summary>
public
string
GoodsService
{
get
;
set
;
}
/// <summary>
/// 运费设置
/// </summary>
public
int
?
FreightId
{
get
;
set
;
}
/// <summary>
/// 自定义表单
/// </summary>
public
int
?
FormsId
{
get
;
set
;
}
/// <summary>
/// 限购商品数量
/// </summary>
public
int
?
LimitBuyGoodsNum
{
get
;
set
;
}
/// <summary>
/// 限购订单数量
/// </summary>
public
int
?
LimitBuyOrderNum
{
get
;
set
;
}
/// <summary>
/// 单品满件包邮
/// </summary>
public
int
?
FullNumPinkage
{
get
;
set
;
}
/// <summary>
/// 单品满额包邮
/// </summary>
public
decimal
?
FullMoneyPinkage
{
get
;
set
;
}
/// <summary>
/// 是否区域购买 1是 2否
/// </summary>
public
int
?
IsAreaBuy
{
get
;
set
;
}
/// <summary>
/// 积分赠送
/// </summary>
public
int
?
IntegralPresent
{
get
;
set
;
}
/// <summary>
/// 赠送类型 1固定值 2百分比
/// </summary>
public
int
?
IntegralPresentType
{
get
;
set
;
}
/// <summary>
/// 积分抵扣
/// </summary>
public
decimal
?
PointsDeduction
{
get
;
set
;
}
/// <summary>
/// 抵扣类型 1固定值 2百分比
/// </summary>
public
int
?
PointsDeductionType
{
get
;
set
;
}
/// <summary>
/// 是否允许多件累计抵扣 1是 2否
/// </summary>
public
int
?
IsMultipleDeduction
{
get
;
set
;
}
/// <summary>
/// 商品详情
/// </summary>
public
string
GoodsDetails
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </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
;
}
/// <summary>
/// 是否开启单独分销 1是 2否
/// </summary>
public
int
?
SeparateDistribution
{
get
;
set
;
}
/// <summary>
/// 单独分销类型 1普通设置 2详细设置
/// </summary>
public
int
?
SeparateDistributionType
{
get
;
set
;
}
/// <summary>
/// 分销佣金类型 1固定金额 2百分比
/// </summary>
public
int
?
SeparateDistributionMoneyType
{
get
;
set
;
}
/// <summary>
/// 是否享受会员功能 1是 2否
/// </summary>
public
int
?
EnjoyMember
{
get
;
set
;
}
/// <summary>
/// 是否单独设置会员价 1是 2否
/// </summary>
public
int
?
SeparateSetMember
{
get
;
set
;
}
/// <summary>
/// 是否加入快速购买 1是 2否
/// </summary>
public
int
?
IsQuickBuy
{
get
;
set
;
}
}
}
Mall.Model/Entity/Product/RB_Goods_Area.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品关联区域表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Area
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
/// <summary>
/// 区域id
/// </summary>
public
int
?
AreaId
{
get
;
set
;
}
/// <summary>
/// 区域类型 1国家 2省 3市 4区
/// </summary>
public
int
?
AreaType
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </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/Entity/Product/RB_Goods_Category.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品关联分类表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Category
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 商品id
/// </summary>
public
int
?
GoodsId
{
get
;
set
;
}
/// <summary>
/// 分类id
/// </summary>
public
int
?
CategoryId
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </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/Entity/Product/RB_Goods_Specification.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品关联规格表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_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
;
}
}
}
Mall.Model/Entity/Product/RB_Goods_SpecificationPrice.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品关联规格价格表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_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
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_Goods_SpecificationValue.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品关联规格值表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_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
int
?
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_Goods_Area.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 图片通用类
/// </summary>
[
Serializable
]
public
class
RB_ImageCommonModel
{
/// <summary>
/// id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 路径
/// </summary>
public
string
Path
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Area_Extend.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联区域表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Area_Extend
:
RB_Goods_Area
{
/// <summary>
/// 区域名称
/// </summary>
public
string
AreaName
{
get
;
set
;
}
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Category_Extend.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联分类表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Category_Extend
:
RB_Goods_Category
{
/// <summary>
/// 分类名称
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Extend.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Extend
:
RB_Goods
{
/// <summary>
/// 开始时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
/// <summary>
/// 是否查询售罄 1是 其他否
/// </summary>
public
int
?
IsSelectSellOut
{
get
;
set
;
}
/// <summary>
/// 分类ids
/// </summary>
public
string
CategoryIds
{
get
;
set
;
}
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 封面图
/// </summary>
public
string
CoverImage
{
get
;
set
;
}
/// <summary>
/// 轮播图列表
/// </summary>
public
List
<
RB_ImageCommonModel
>
CarouselImageList
{
get
;
set
;
}
/// <summary>
/// 服务列表
/// </summary>
public
List
<
RB_ImageCommonModel
>
ServiceList
{
get
;
set
;
}
/// <summary>
/// 商品分类
/// </summary>
public
List
<
RB_Goods_Category_Extend
>
CategoryList
{
get
;
set
;
}
/// <summary>
/// 区域列表
/// </summary>
public
List
<
RB_Goods_Area_Extend
>
AreaList
{
get
;
set
;
}
/// <summary>
/// 规格名列表
/// </summary>
public
List
<
RB_Goods_Specification_Extend
>
SpecificationList
{
get
;
set
;
}
/// <summary>
/// 规格价格列表
/// </summary>
public
List
<
RB_Goods_SpecificationPrice_Extend
>
SpecificationPriceList
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_SpecificationPrice_Extend.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联规格价格表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_SpecificationPrice_Extend
:
RB_Goods_SpecificationPrice
{
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_SpecificationValue_Extend.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联规格值表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_SpecificationValue_Extend
:
RB_Goods_SpecificationValue
{
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 图片路径
/// </summary>
public
string
ImagePath
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_Specification_Extend.cs
0 → 100644
View file @
dbb4f612
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联规格表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Specification_Extend
:
RB_Goods_Specification
{
/// <summary>
/// 商品ids
/// </summary>
public
string
GoodsIds
{
get
;
set
;
}
/// <summary>
/// 规格值列表
/// </summary>
public
List
<
RB_Goods_SpecificationValue_Extend
>
SpecificationValueList
{
get
;
set
;
}
}
}
Mall.Module.Product/ProductModule.cs
View file @
dbb4f612
This diff is collapsed.
Click to expand it.
Mall.Repository/Product/RB_GoodsRepository.cs
0 → 100644
View file @
dbb4f612
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品仓储层
/// </summary>
public
class
RB_GoodsRepository
:
RepositoryBase
<
RB_Goods
>
{
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Goods_Extend
dmodel
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Id
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Name
)}
like '%
{
dmodel
.
Name
}
%'"
;
}
if
(
dmodel
.
GoodsStatus
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsStatus
)}
=
{
dmodel
.
GoodsStatus
}
"
;
}
if
(
dmodel
.
IsSelectSellOut
==
1
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
InventoryNum
)}
<=0"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
CategoryIds
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Category
.
CategoryId
)}
in(
{
dmodel
.
CategoryIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
CreateDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
CreateDate
)}
<='
{
dmodel
.
EndTime
+
" 23:59:59"
}
'"
;
}
string
sql
=
$@"select g.* from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId
where
{
where
}
group by g.Id order by g.CreateDate desc"
;
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetList
(
RB_Goods_Extend
dmodel
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Id
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Name
)}
like '%
{
dmodel
.
Name
}
%'"
;
}
if
(
dmodel
.
GoodsStatus
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsStatus
)}
=
{
dmodel
.
GoodsStatus
}
"
;
}
if
(
dmodel
.
IsSelectSellOut
==
1
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
InventoryNum
)}
<=0"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
CategoryIds
))
{
where
+=
$@" and c.
{
nameof
(
RB_Goods_Category
.
CategoryId
)}
in(
{
dmodel
.
CategoryIds
}
)"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
StartTime
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
CreateDate
)}
>='
{
dmodel
.
StartTime
}
'"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
EndTime
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
CreateDate
)}
<='
{
dmodel
.
EndTime
+
" 23:59:59"
}
'"
;
}
string
sql
=
$@"select g.* from RB_Goods g
inner join rb_goods_category c on g.Id=c.GoodsId
where
{
where
}
group by g.Id order by g.CreateDate desc"
;
return
Get
<
RB_Goods_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_AreaRepository.cs
0 → 100644
View file @
dbb4f612
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品关联区域仓储层
/// </summary>
public
class
RB_Goods_AreaRepository
:
RepositoryBase
<
RB_Goods_Area
>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Goods_Area_Extend
>
GetList
(
RB_Goods_Area_Extend
dmodel
)
{
string
where
=
$" 1=1 and ga.
{
nameof
(
RB_Goods_Area
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and ga.
{
nameof
(
RB_Goods_Area
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and ga.
{
nameof
(
RB_Goods_Area
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and ga.
{
nameof
(
RB_Goods_Area
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and ga.
{
nameof
(
RB_Goods_Area
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and ga.
{
nameof
(
RB_Goods_Area
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select ga.*,d.Name as AreaName from RB_Goods_Area ga
inner join rb_destination d on ga.AreaId=d.ID
where
{
where
}
order by ga.Id desc"
;
return
Get
<
RB_Goods_Area_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_CategoryRepository.cs
0 → 100644
View file @
dbb4f612
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品关联分类仓储层
/// </summary>
public
class
RB_Goods_CategoryRepository
:
RepositoryBase
<
RB_Goods_Category
>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Goods_Category_Extend
>
GetList
(
RB_Goods_Category_Extend
dmodel
)
{
string
where
=
$" 1=1 and gc.
{
nameof
(
RB_Goods_Category
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and gc.
{
nameof
(
RB_Goods_Category
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and gc.
{
nameof
(
RB_Goods_Category
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and gc.
{
nameof
(
RB_Goods_Category
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and gc.
{
nameof
(
RB_Goods_Category
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and gc.
{
nameof
(
RB_Goods_Category
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select gc.*,pc.Name as CategoryName from RB_Goods_Category gc
inner join rb_product_category pc on gc.CategoryId=pc.Id
where
{
where
}
order by gc.Id desc"
;
return
Get
<
RB_Goods_Category_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_SpecificationPriceRepository.cs
0 → 100644
View file @
dbb4f612
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品关联规格价格仓储层
/// </summary>
public
class
RB_Goods_SpecificationPriceRepository
:
RepositoryBase
<
RB_Goods_SpecificationPrice
>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Goods_SpecificationPrice_Extend
>
GetList
(
RB_Goods_SpecificationPrice_Extend
dmodel
)
{
string
where
=
$" 1=1 and
{
nameof
(
RB_Goods_SpecificationPrice
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationPrice
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationPrice
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationPrice
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationPrice
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationPrice
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select * from RB_Goods_SpecificationPrice where
{
where
}
order by Id desc"
;
return
Get
<
RB_Goods_SpecificationPrice_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_SpecificationRepository.cs
0 → 100644
View file @
dbb4f612
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品关联规格仓储层
/// </summary>
public
class
RB_Goods_SpecificationRepository
:
RepositoryBase
<
RB_Goods_Specification
>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Goods_Specification_Extend
>
GetList
(
RB_Goods_Specification_Extend
dmodel
)
{
string
where
=
$" 1=1 and
{
nameof
(
RB_Goods_Specification
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_Specification
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_Specification
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_Specification
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_Specification
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_Specification
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select * from RB_Goods_Specification where
{
where
}
order by Id desc"
;
return
Get
<
RB_Goods_Specification_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_SpecificationValueRepository.cs
0 → 100644
View file @
dbb4f612
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Extend.Product
;
using
System.Linq
;
namespace
Mall.Repository.Product
{
/// <summary>
/// 商品关联规格值仓储层
/// </summary>
public
class
RB_Goods_SpecificationValueRepository
:
RepositoryBase
<
RB_Goods_SpecificationValue
>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Goods_SpecificationValue_Extend
>
GetList
(
RB_Goods_SpecificationValue_Extend
dmodel
)
{
string
where
=
$" 1=1 and
{
nameof
(
RB_Goods_SpecificationValue
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationValue
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationValue
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
Id
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationValue
.
Id
)}
=
{
dmodel
.
Id
}
"
;
}
if
(
dmodel
.
SpecificationId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationValue
.
SpecificationId
)}
=
{
dmodel
.
SpecificationId
}
"
;
}
if
(
dmodel
.
GoodsId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationValue
.
GoodsId
)}
=
{
dmodel
.
GoodsId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_SpecificationValue
.
GoodsId
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
string
sql
=
$@"select * from RB_Goods_SpecificationValue where
{
where
}
order by Id desc"
;
return
Get
<
RB_Goods_SpecificationValue_Extend
>(
sql
).
ToList
();
}
}
}
Mall.WebApi/Controllers/Product/ProductController.cs
View file @
dbb4f612
This diff is collapsed.
Click to expand it.
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