mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
添加项目文件。
This commit is contained in:
21
CoreCms.Net.IServices/Good/ICoreCmsBrandServices.cs
Normal file
21
CoreCms.Net.IServices/Good/ICoreCmsBrandServices.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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 品牌表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsBrandServices : IBaseServices<CoreCmsBrand>
|
||||
{
|
||||
}
|
||||
}
|
||||
39
CoreCms.Net.IServices/Good/ICoreCmsGoodsBrowsingServices.cs
Normal file
39
CoreCms.Net.IServices/Good/ICoreCmsGoodsBrowsingServices.cs
Normal file
@@ -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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品浏览记录表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsBrowsingServices : IBaseServices<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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品分类扩展表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCategoryExtendServices : IBaseServices<CoreCmsGoodsCategoryExtend>
|
||||
{
|
||||
}
|
||||
}
|
||||
95
CoreCms.Net.IServices/Good/ICoreCmsGoodsCategoryServices.cs
Normal file
95
CoreCms.Net.IServices/Good/ICoreCmsGoodsCategoryServices.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
/***********************************************************************
|
||||
* 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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品分类 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCategoryServices : IBaseServices<CoreCmsGoodsCategory>
|
||||
{
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsGoodsCategory>> GetCaChe();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断商品分类下面是否有某一个商品分类
|
||||
/// </summary>
|
||||
/// <param name="catParentId"></param>
|
||||
/// <param name="catId"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> IsChild(int catParentId, int catId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否含有子类
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <param name="catParentId"></param>
|
||||
/// <param name="catId"></param>
|
||||
/// <returns></returns>
|
||||
bool IsHave(List<CoreCmsGoodsCategory> list, int catParentId, int catId);
|
||||
|
||||
#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,59 @@
|
||||
/***********************************************************************
|
||||
* 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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品收藏表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCollectionServices : IBaseServices<CoreCmsGoodsCollection>
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查是否收藏了此商品
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="goodsId"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> Check(int userId, int goodsId);
|
||||
|
||||
|
||||
/// <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);
|
||||
}
|
||||
}
|
||||
114
CoreCms.Net.IServices/Good/ICoreCmsGoodsCommentServices.cs
Normal file
114
CoreCms.Net.IServices/Good/ICoreCmsGoodsCommentServices.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
/***********************************************************************
|
||||
* 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 CoreCms.Net.Model.ViewModels.DTO;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品评价表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsCommentServices : IBaseServices<CoreCmsGoodsComment>
|
||||
{
|
||||
/// <summary>
|
||||
/// 添加一条评论
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单号</param>
|
||||
/// <param name="items">评价数据</param>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddComment(string orderId, List<OrderEvaluatePostItems> items, int userId);
|
||||
|
||||
/// <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);
|
||||
|
||||
|
||||
#region 重写根据条件查询分页数据
|
||||
|
||||
/// <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);
|
||||
|
||||
#endregion
|
||||
|
||||
#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.IServices/Good/ICoreCmsGoodsGradeServices.cs
Normal file
21
CoreCms.Net.IServices/Good/ICoreCmsGoodsGradeServices.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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品会员价表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsGradeServices : IBaseServices<CoreCmsGoodsGrade>
|
||||
{
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/Good/ICoreCmsGoodsParamsServices.cs
Normal file
21
CoreCms.Net.IServices/Good/ICoreCmsGoodsParamsServices.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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品参数表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsParamsServices : IBaseServices<CoreCmsGoodsParams>
|
||||
{
|
||||
}
|
||||
}
|
||||
253
CoreCms.Net.IServices/Good/ICoreCmsGoodsServices.cs
Normal file
253
CoreCms.Net.IServices/Good/ICoreCmsGoodsServices.cs
Normal file
@@ -0,0 +1,253 @@
|
||||
/***********************************************************************
|
||||
* 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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsServices : IBaseServices<CoreCmsGoods>
|
||||
{
|
||||
/// <summary>
|
||||
/// 批量修改价格
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DoBatchModifyPrice(FmBatchModifyPrice entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量修改价格
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DoBatchModifyStock(FmBatchModifyStock entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量上架
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DoBatchMarketableUp(int[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 批量下架
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DoBatchMarketableDown(int[] ids);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置标签
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DoSetLabel(FmSetLabel entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 取消标签
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DoDeleteLabel(FmSetLabel entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断商品是否参加团购或者秒杀
|
||||
/// </summary>
|
||||
/// <param name="goodId"></param>
|
||||
/// <param name="promotionsModel">返回团购或者秒杀序列</param>
|
||||
/// <param name="promotionId">团购秒杀优惠规则序列</param>
|
||||
/// <returns></returns>
|
||||
bool IsInGroup(int goodId, out CoreCmsPromotion promotionsModel, int promotionId = 0);
|
||||
|
||||
|
||||
/// <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="id"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="isPromotion"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
Task<CoreCmsGoods> GetGoodsDetial(int id, int userId = 0, bool isPromotion = false, string type = "goods",
|
||||
int groupId = 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();
|
||||
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <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>
|
||||
///// 重写异步更新方法方法
|
||||
///// </summary>
|
||||
///// <param name="entity"></param>
|
||||
///// <returns></returns>
|
||||
//new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsGoods> 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
|
||||
}
|
||||
}
|
||||
66
CoreCms.Net.IServices/Good/ICoreCmsGoodsTypeSpecServices.cs
Normal file
66
CoreCms.Net.IServices/Good/ICoreCmsGoodsTypeSpecServices.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms
|
||||
* ProjectName: 核心内容管理系统
|
||||
* Web: https://www.corecms.net
|
||||
* Author: 大灰灰
|
||||
* Email: jianweie@163.com
|
||||
* CreateTime: 2021/1/31 21:45:10
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品类型属性表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsTypeSpecServices : IBaseServices<CoreCmsGoodsTypeSpec>
|
||||
{
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <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>
|
||||
///// 重写异步更新方法方法
|
||||
///// </summary>
|
||||
///// <param name="entity"></param>
|
||||
///// <returns></returns>
|
||||
//new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsGoodsTypeSpec> 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,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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品类型属性值表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsGoodsTypeSpecValueServices : IBaseServices<CoreCmsGoodsTypeSpecValue>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 货品三级佣金表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsProductsDistributionServices : IBaseServices<CoreCmsProductsDistribution>
|
||||
{
|
||||
}
|
||||
}
|
||||
84
CoreCms.Net.IServices/Good/ICoreCmsProductsServices.cs
Normal file
84
CoreCms.Net.IServices/Good/ICoreCmsProductsServices.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
/***********************************************************************
|
||||
* 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.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 货品表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsProductsServices : IBaseServices<CoreCmsProducts>
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据货品ID获取货品信息
|
||||
/// </summary>
|
||||
/// <param name="id">货品序列</param>
|
||||
/// <param name="isPromotion">是否计算促销</param>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="type">类型</param>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
Task<CoreCmsProducts> GetProductInfo(int id, bool isPromotion, int userId, string type = "goods",
|
||||
int groupId = 0);
|
||||
|
||||
/// <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