mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:53:27 +08:00
添加项目文件。
This commit is contained in:
21
CoreCms.Net.IRepository/Good/ICoreCmsBrandRepository.cs
Normal file
21
CoreCms.Net.IRepository/Good/ICoreCmsBrandRepository.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using CoreCms.Net.Model.Entities;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 品牌表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsBrandRepository : IBaseRepository<CoreCmsBrand>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品浏览记录表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsBrowsingRepository : IBaseRepository<CoreCmsGoodsBrowsing>
|
||||
{
|
||||
/// <summary>
|
||||
/// 重写根据条件查询分页数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsGoodsBrowsing>> QueryPageAsync(Expression<Func<CoreCmsGoodsBrowsing, bool>> predicate,
|
||||
Expression<Func<CoreCmsGoodsBrowsing, object>> orderByExpression, OrderByType orderByType,
|
||||
int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using CoreCms.Net.Model.Entities;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品分类扩展表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCategoryExtendRepository : IBaseRepository<CoreCmsGoodsCategoryExtend>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品分类 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCategoryRepository : IBaseRepository<CoreCmsGoodsCategory>
|
||||
{
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsGoodsCategory>> GetCaChe();
|
||||
|
||||
#endregion
|
||||
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 事务重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsGoodsCategory entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsGoodsCategory entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsGoodsCategory> entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> DeleteByIdAsync(object id);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品收藏表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCollectionRepository : IBaseRepository<CoreCmsGoodsCollection>
|
||||
{
|
||||
/// <summary>
|
||||
/// 重写根据条件查询分页数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsGoodsCollection>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsGoodsCollection, bool>> predicate,
|
||||
Expression<Func<CoreCmsGoodsCollection, object>> orderByExpression, OrderByType orderByType,
|
||||
int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 收藏
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="goodsId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToAdd(int userId, int goodsId);
|
||||
}
|
||||
}
|
||||
103
CoreCms.Net.IRepository/Good/ICoreCmsGoodsCommentRepository.cs
Normal file
103
CoreCms.Net.IRepository/Good/ICoreCmsGoodsCommentRepository.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品评价表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCommentRepository : IBaseRepository<CoreCmsGoodsComment>
|
||||
{
|
||||
/// <summary>
|
||||
/// 商家回复评价
|
||||
/// </summary>
|
||||
/// <param name="id">序列</param>
|
||||
/// <param name="sellerContent">回复内容</param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> Reply(int id, string sellerContent);
|
||||
|
||||
/// <summary>
|
||||
/// 获取单个详情数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <returns></returns>
|
||||
Task<CoreCmsGoodsComment> DetailsByIdAsync(Expression<Func<CoreCmsGoodsComment, bool>> predicate,
|
||||
Expression<Func<CoreCmsGoodsComment, object>> orderByExpression, OrderByType orderByType);
|
||||
|
||||
/// <summary>
|
||||
/// 重写根据条件查询分页数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
new Task<IPageList<CoreCmsGoodsComment>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsGoodsComment, bool>> predicate,
|
||||
Expression<Func<CoreCmsGoodsComment, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsGoodsComment entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsGoodsComment entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsGoodsComment> entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> DeleteByIdAsync(object id);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IRepository/Good/ICoreCmsGoodsGradeRepository.cs
Normal file
21
CoreCms.Net.IRepository/Good/ICoreCmsGoodsGradeRepository.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using CoreCms.Net.Model.Entities;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品会员价表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsGradeRepository : IBaseRepository<CoreCmsGoodsGrade>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using CoreCms.Net.Model.Entities;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品参数表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsParamsRepository : IBaseRepository<CoreCmsGoodsParams>
|
||||
{
|
||||
}
|
||||
}
|
||||
158
CoreCms.Net.IRepository/Good/ICoreCmsGoodsRepository.cs
Normal file
158
CoreCms.Net.IRepository/Good/ICoreCmsGoodsRepository.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsRepository : IBaseRepository<CoreCmsGoods>
|
||||
{
|
||||
/// <summary>
|
||||
/// 事务重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> InsertAsync(FMGoodsInsertModel entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> UpdateAsync(FMGoodsInsertModel entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 获取商品重量
|
||||
/// </summary>
|
||||
/// <param name="productsId"></param>
|
||||
/// <returns></returns>
|
||||
Task<decimal> GetWeight(int productsId);
|
||||
|
||||
/// <summary>
|
||||
/// 库存改变机制。
|
||||
/// 库存机制:商品下单 总库存不变,冻结库存加1,
|
||||
/// 商品发货:冻结库存减1,总库存减1,
|
||||
/// 订单完成但未发货:总库存不变,冻结库存减1
|
||||
/// 商品退款&取消订单:总库存不变,冻结库存减1,
|
||||
/// 商品退货:总库存加1,冻结库存不变,
|
||||
/// 可销售库存:总库存-冻结库存
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack ChangeStock(int productsId, string type = "order", int num = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取随机推荐数据
|
||||
/// </summary>
|
||||
/// <param name="number">数量</param>
|
||||
/// <param name="isRecommend">是否推荐</param>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsGoods>> GetGoodsRecommendList(int number, bool isRecommend = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据总数
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
new Task<int> GetCountAsync(Expression<Func<CoreCmsGoods, bool>> predicate, bool blUseNoLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写根据条件查询分页数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
new Task<IPageList<CoreCmsGoods>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsGoods, bool>> predicate,
|
||||
Expression<Func<CoreCmsGoods, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写根据条件查询一定数量数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="take">获取数量</param>
|
||||
/// <param name="orderByPredicate">排序字段</param>
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
new Task<List<CoreCmsGoods>> QueryListByClauseAsync(Expression<Func<CoreCmsGoods, bool>> predicate, int take,
|
||||
Expression<Func<CoreCmsGoods, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
new Task<List<CoreCmsGoods>> QueryListByClauseAsync(Expression<Func<CoreCmsGoods, bool>> predicate,
|
||||
string orderBy = "",
|
||||
bool blUseNoLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写根据条件查询分页数据
|
||||
/// </summary>
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="orderBy"></param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
new Task<IPageList<CoreCmsGoods>> QueryPageAsync(Expression<Func<CoreCmsGoods, bool>> predicate,
|
||||
string orderBy = "", int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询代理池商品分页数据
|
||||
/// </summary>
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="orderBy"></param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsGoods>> QueryAgentGoodsPageAsync(Expression<Func<CoreCmsGoods, bool>> predicate,
|
||||
string orderBy = "", int pageIndex = 1, int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取下拉商品数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<EnumEntity>> QueryEnumEntityAsync();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品类型属性表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsTypeSpecRepository : IBaseRepository<CoreCmsGoodsTypeSpec>
|
||||
{
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> InsertAsync(FmGoodsTypeSpecInsert entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> UpdateAsync(FmGoodsTypeSpecUpdate entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> DeleteByIdAsync(object id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using CoreCms.Net.Model.Entities;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品类型属性值表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsTypeSpecValueRepository : IBaseRepository<CoreCmsGoodsTypeSpecValue>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using CoreCms.Net.Model.Entities;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 货品三级佣金表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsProductsDistributionRepository : IBaseRepository<CoreCmsProductsDistribution>
|
||||
{
|
||||
}
|
||||
}
|
||||
63
CoreCms.Net.IRepository/Good/ICoreCmsProductsRepository.cs
Normal file
63
CoreCms.Net.IRepository/Good/ICoreCmsProductsRepository.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// 货品表 工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsProductsRepository : IBaseRepository<CoreCmsProducts>
|
||||
{
|
||||
/// <summary>
|
||||
/// 判断货品上下架状态
|
||||
/// </summary>
|
||||
/// <param name="productsId">货品序列</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> GetShelfStatus(int productsId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取库存报警数量
|
||||
/// </summary>
|
||||
/// <param name="goodsStocksWarn"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> GoodsStaticsTotalWarn(int goodsStocksWarn);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取关联商品的货品列表数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsProducts>> QueryDetailPageAsync(Expression<Func<CoreCmsProducts, bool>> predicate,
|
||||
Expression<Func<CoreCmsProducts, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改单个货品库存并记入库存管理日志内
|
||||
/// </summary>
|
||||
/// <param name="productId"></param>
|
||||
/// <param name="stock"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> EditStock(int productId, int stock);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有货品数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsProducts>> GetProducts(int goodId = 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user