mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
添加项目文件。
This commit is contained in:
@@ -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 ICoreCmsAdvertPositionServices : IBaseServices<CoreCmsAdvertPosition>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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 ICoreCmsAdvertisementServices : IBaseServices<CoreCmsAdvertisement>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
85
CoreCms.Net.IServices/Agent/ICoreCmsAgentGoodsServices.cs
Normal file
85
CoreCms.Net.IServices/Agent/ICoreCmsAgentGoodsServices.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsAgentGoodsServices : IBaseServices<CoreCmsAgentGoods>
|
||||
{
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="products"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> InsertAsync(CoreCmsAgentGoods entity, List<CoreCmsAgentProducts> products);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="products"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> UpdateAsync(CoreCmsAgentGoods entity, List<CoreCmsAgentProducts> products);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsAgentGoods> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DeleteByIdAsync(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> DeleteByIdsAsync(int[] ids);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#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<CoreCmsAgentGoods>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsAgentGoods, bool>> predicate,
|
||||
Expression<Func<CoreCmsAgentGoods, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
91
CoreCms.Net.IServices/Agent/ICoreCmsAgentGradeServices.cs
Normal file
91
CoreCms.Net.IServices/Agent/ICoreCmsAgentGradeServices.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsAgentGradeServices : IBaseServices<CoreCmsAgentGrade>
|
||||
{
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsAgentGrade entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsAgentGrade entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsAgentGrade> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DeleteByIdAsync(int id);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsAgentGrade>> GetCaChe();
|
||||
|
||||
/// <summary>
|
||||
/// 更新cache
|
||||
/// </summary>
|
||||
Task<List<CoreCmsAgentGrade>> UpdateCaChe();
|
||||
|
||||
#endregion
|
||||
|
||||
#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<CoreCmsAgentGrade>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsAgentGrade, bool>> predicate,
|
||||
Expression<Func<CoreCmsAgentGrade, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
106
CoreCms.Net.IServices/Agent/ICoreCmsAgentOrderServices.cs
Normal file
106
CoreCms.Net.IServices/Agent/ICoreCmsAgentOrderServices.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsAgentOrderServices : IBaseServices<CoreCmsAgentOrder>
|
||||
{
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsAgentOrder entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsAgentOrder entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsAgentOrder> 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
|
||||
|
||||
#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<CoreCmsAgentOrder>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsAgentOrder, bool>> predicate,
|
||||
Expression<Func<CoreCmsAgentOrder, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加代理订单关联记录
|
||||
/// </summary>
|
||||
/// <param name="order"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddData(CoreCmsOrder order);
|
||||
|
||||
/// <summary>
|
||||
/// 订单结算处理事件
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> FinishOrder(string orderId);
|
||||
|
||||
/// <summary>
|
||||
/// 作废订单
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单编号</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> CancleOrderByOrderId(string orderId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
44
CoreCms.Net.IServices/Agent/ICoreCmsAgentProductsServices.cs
Normal file
44
CoreCms.Net.IServices/Agent/ICoreCmsAgentProductsServices.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsAgentProductsServices : IBaseServices<CoreCmsAgentProducts>
|
||||
{
|
||||
|
||||
#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<CoreCmsAgentProducts>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsAgentProducts, bool>> predicate,
|
||||
Expression<Func<CoreCmsAgentProducts, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
98
CoreCms.Net.IServices/Agent/ICoreCmsAgentServices.cs
Normal file
98
CoreCms.Net.IServices/Agent/ICoreCmsAgentServices.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
/***********************************************************************
|
||||
* 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.Agent;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 代理商表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsAgentServices : IBaseServices<CoreCmsAgent>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取代理商信息
|
||||
/// </summary>
|
||||
/// <param name="userId">用户id</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetInfo(int userId);
|
||||
|
||||
/// <summary>
|
||||
/// 添加用户信息
|
||||
/// </summary>
|
||||
/// <param name="iData"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddData(CoreCmsAgent iData, int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取我的代理订单
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="limit"></param>
|
||||
/// <param name="typeId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetMyOrderList(int userId, int page, int limit = 10, int typeId = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取店铺信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetStore(int userId);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询分页数据
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsAgentOrder>> QueryOrderPageAsync(int userId, int pageIndex = 1, int pageSize = 20);
|
||||
|
||||
|
||||
#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<CoreCmsAgent>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsAgent, bool>> predicate,
|
||||
Expression<Func<CoreCmsAgent, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取代理商排行
|
||||
/// </summary>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<AgentRankingDTO>> QueryRankingPageAsync(int pageIndex = 1, int pageSize = 20);
|
||||
|
||||
}
|
||||
}
|
||||
22
CoreCms.Net.IServices/Api/ICoreCmsApiAccessTokenServices.cs
Normal file
22
CoreCms.Net.IServices/Api/ICoreCmsApiAccessTokenServices.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsApiAccessTokenServices : IBaseServices<CoreCmsApiAccessToken>
|
||||
{
|
||||
}
|
||||
}
|
||||
45
CoreCms.Net.IServices/Article/ICoreCmsArticleServices.cs
Normal file
45
CoreCms.Net.IServices/Article/ICoreCmsArticleServices.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsArticleServices : IBaseServices<CoreCmsArticle>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取指定id 的文章详情
|
||||
/// </summary>
|
||||
/// <param name="id">序列</param>
|
||||
Task<CoreCmsArticle> ArticleDetail(int id);
|
||||
|
||||
|
||||
/// <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<CoreCmsArticle>> QueryPageAsync(Expression<Func<CoreCmsArticle, bool>> predicate,
|
||||
Expression<Func<CoreCmsArticle, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/Article/ICoreCmsArticleTypeServices.cs
Normal file
21
CoreCms.Net.IServices/Article/ICoreCmsArticleTypeServices.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 ICoreCmsArticleTypeServices : IBaseServices<CoreCmsArticleType>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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 ICoreCmsBillAftersalesImagesServices : IBaseServices<CoreCmsBillAftersalesImages>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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 ICoreCmsBillAftersalesItemServices : IBaseServices<CoreCmsBillAftersalesItem>
|
||||
{
|
||||
}
|
||||
}
|
||||
104
CoreCms.Net.IServices/Bill/ICoreCmsBillAftersalesServices.cs
Normal file
104
CoreCms.Net.IServices/Bill/ICoreCmsBillAftersalesServices.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
/***********************************************************************
|
||||
* 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 Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 退货单表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsBillAftersalesServices : IBaseServices<CoreCmsBillAftersales>
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据订单号查询已经售后的内容
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单编号</param>
|
||||
/// <param name="aftersaleLevel">取售后单的时候,售后单的等级,0:待审核的和审核通过的售后单,1未审核的,2审核通过的</param>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack OrderToAftersales(string orderId, int aftersaleLevel = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 统计用户的售后数量
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> GetUserAfterSalesNum(int userId, int status);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建售后单
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="orderId">发起售后的订单</param>
|
||||
/// <param name="type">是否收到退货,1未收到退货,不会创建退货单,2收到退货,会创建退货单,只有未发货的商品才能选择未收到货,只有已发货的才能选择已收到货</param>
|
||||
/// <param name="items">如果是退款退货,退货的明细 以 [[order_item_id=>nums]]的二维数组形式传值</param>
|
||||
/// <param name="images"></param>
|
||||
/// <param name="reason">售后理由</param>
|
||||
/// <param name="refund">退款金额,只在退款退货的时候用,如果是退款,直接就是订单金额</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToAdd(int userId, string orderId, int type, JArray items, string[] images, string reason,
|
||||
decimal refund);
|
||||
|
||||
/// <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<CoreCmsBillAftersales>> QueryPageAsync(Expression<Func<CoreCmsBillAftersales, bool>> predicate,
|
||||
Expression<Func<CoreCmsBillAftersales, object>> orderByExpression, OrderByType orderByType,
|
||||
int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
|
||||
/// <summary>
|
||||
/// 获取单个数据
|
||||
/// </summary>
|
||||
/// <param name="reshipId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<CoreCmsBillAftersales> GetInfo(string aftersalesId, int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 后端进行审核的时候,前置操作,1取出页面的数据,2在提交过来的表单的时候,进行校验
|
||||
/// </summary>
|
||||
/// <param name="aftersalesId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> PreAudit(string aftersalesId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Audit平台审核通过或者审核不通过
|
||||
/// 如果审核通过了,是退款单的话,自动生成退款单,并做订单完成状态,如果是退货的话,自动生成退款单和退货单,如果
|
||||
/// </summary>
|
||||
/// <param name="aftersalesId"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="refund"></param>
|
||||
/// <param name="mark"></param>
|
||||
/// <param name="items"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Audit(string aftersalesId, int status, int type, decimal refund, string mark,
|
||||
JArray items);
|
||||
}
|
||||
}
|
||||
@@ -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 ICoreCmsBillDeliveryItemServices : IBaseServices<CoreCmsBillDeliveryItem>
|
||||
{
|
||||
}
|
||||
}
|
||||
79
CoreCms.Net.IServices/Bill/ICoreCmsBillDeliveryServices.cs
Normal file
79
CoreCms.Net.IServices/Bill/ICoreCmsBillDeliveryServices.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsBillDeliveryServices : IBaseServices<CoreCmsBillDelivery>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 批量发货,可以支持多个订单合并发货,单个订单拆分发货等。
|
||||
/// </summary>
|
||||
/// <param name="orderId">英文逗号分隔的订单号</param>
|
||||
/// <param name="logiCode">物流公司编码</param>
|
||||
/// <param name="logiNo">物流单号</param>
|
||||
/// <param name="items">发货明细</param>
|
||||
/// <param name="storeId">店铺收货地址</param>
|
||||
/// <param name="shipName">收货人姓名</param>
|
||||
/// <param name="shipMobile">收货人电话</param>
|
||||
/// <param name="shipAreaId">省市区id</param>
|
||||
/// <param name="shipAddress">收货地址</param>
|
||||
/// <param name="memo">发货描述</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> BatchShip(string[] orderId, string logiCode, string logiNo, Dictionary<int, int> items,
|
||||
int storeId = 0, string shipName = "", string shipMobile = "", int shipAreaId = 0, string shipAddress = "",
|
||||
string memo = "");
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发货,单个订单发货
|
||||
/// </summary>
|
||||
/// <param name="orderId">英文逗号分隔的订单号</param>
|
||||
/// <param name="logiCode">物流公司编码</param>
|
||||
/// <param name="logiNo">物流单号</param>
|
||||
/// <param name="items">发货明细</param>
|
||||
/// <param name="storeId">店铺收货地址</param>
|
||||
/// <param name="shipName">收货人姓名</param>
|
||||
/// <param name="shipMobile">收货人电话</param>
|
||||
/// <param name="shipAreaId">省市区id</param>
|
||||
/// <param name="shipAddress">收货地址</param>
|
||||
/// <param name="memo">发货描述</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Ship(string orderId, string logiCode, string logiNo, Dictionary<int, int> items,
|
||||
int storeId = 0, string shipName = "", string shipMobile = "", int shipAreaId = 0, string shipAddress = "",
|
||||
string memo = "");
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物流信息查询根据快递编码和单号查询(快递100)未使用
|
||||
/// </summary>
|
||||
/// <param name="code">查询的快递公司的编码, 一律用小写字母(如:yuantong)</param>
|
||||
/// <param name="no">查询的快递单号, 单号的最大长度是32个字符</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetLogistic(string code, string no);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 发货单统计7天统计
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<StatisticsOut>> Statistics();
|
||||
}
|
||||
}
|
||||
59
CoreCms.Net.IServices/Bill/ICoreCmsBillLadingServices.cs
Normal file
59
CoreCms.Net.IServices/Bill/ICoreCmsBillLadingServices.cs
Normal file
@@ -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.Threading.Tasks;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 提货单表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsBillLadingServices : IBaseServices<CoreCmsBillLading>
|
||||
{
|
||||
/// <summary>
|
||||
/// 添加提货单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddData(string orderId, int storeId, string name, string mobile);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 核销提货单
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> LadingOperating(string[] ids, int userId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取店铺提货单列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetStoreLadingList(int userId, int page, int limit);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除提货单(软删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> LadingDelete(string id, int userId = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取提货单详情
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetInfo(string id, int userId = 0);
|
||||
}
|
||||
}
|
||||
112
CoreCms.Net.IServices/Bill/ICoreCmsBillPaymentsServices.cs
Normal file
112
CoreCms.Net.IServices/Bill/ICoreCmsBillPaymentsServices.cs
Normal file
@@ -0,0 +1,112 @@
|
||||
/***********************************************************************
|
||||
* 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 Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付单表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsBillPaymentsServices : IBaseServices<CoreCmsBillPayments>
|
||||
{
|
||||
/// <summary>
|
||||
/// 单个生成支付单的时候,格式化支付单明细
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单号</param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="params"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> FormatPaymentRel(string orderId, int type, JObject @params);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量生成支付单的时候,格式化支付单明细
|
||||
/// </summary>
|
||||
/// <param name="sourceStr"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="params"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> BatchFormatPaymentRel(string[] sourceStr, int type, JObject @params);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 支付,先生成支付单,然后去支付
|
||||
/// </summary>
|
||||
/// <param name="sourceStr">来源,一般是订单号或者用户id,比如充值</param>
|
||||
/// <param name="paymentCode">支付方式</param>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="type">订单/充值/服务项目</param>
|
||||
/// <param name="params">支付的时候用到的参数,如果是微信支付的话,这里可以传trade_type=>'JSAPI'(小程序支付),或者'MWEB'(h5支付),当是JSPI的时候,可以不传其他参数了,默认就可以,默认的这个值就是JSAPI,如果是MWEB的话,需要传wap_url(网站url地址)参数和wap_name(网站名称)参数,其他支付方式需要传什么参数这个以后再说</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Pay(string sourceStr, string paymentCode, int userId, int type, JObject @params);
|
||||
|
||||
/// <summary>
|
||||
/// 获取支付单详情
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetInfo(string paymentId, int userId = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 支付成功后,更新支付单状态
|
||||
/// </summary>
|
||||
/// <param name="paymentId"></param>
|
||||
/// <param name="paymentCode"></param>
|
||||
/// <param name="money"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <param name="payedMsg"></param>
|
||||
/// <param name="tradeNo"></param>
|
||||
Task<WebApiCallBack> ToUpdate(string paymentId, int status, string paymentCode, decimal money,
|
||||
string payedMsg = "", string tradeNo = "");
|
||||
|
||||
/// <summary>
|
||||
/// 卖家直接支付操作
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单编号</param>
|
||||
/// <param name="type">支付类型</param>
|
||||
/// <param name="paymentCode">支付类型编码</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToPay(string orderId, int type, string paymentCode);
|
||||
|
||||
/// <summary>
|
||||
/// 支付单7天统计
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<StatisticsOut>> Statistics();
|
||||
|
||||
|
||||
#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<CoreCmsBillPayments>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsBillPayments, bool>> predicate,
|
||||
Expression<Func<CoreCmsBillPayments, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
73
CoreCms.Net.IServices/Bill/ICoreCmsBillRefundServices.cs
Normal file
73
CoreCms.Net.IServices/Bill/ICoreCmsBillRefundServices.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsBillRefundServices : IBaseServices<CoreCmsBillRefund>
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建退款单
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="sourceId"></param>
|
||||
/// <param name="type">1订单,2充值,5服务订单</param>
|
||||
/// <param name="money"></param>
|
||||
/// <param name="aftersalesId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToAdd(int userId, string sourceId, int type, decimal money, string aftersalesId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 退款单去退款或者拒绝
|
||||
/// </summary>
|
||||
/// <param name="refundId">退款单id</param>
|
||||
/// <param name="status">2或者4,通过或者拒绝</param>
|
||||
/// <param name="paymentCodeStr">退款方式,如果和退款单上的一样,说明没有修改,原路返回,否则只记录状态,不做实际退款,如果为空是原路返回</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToRefund(string refundId, int status, string paymentCodeStr = "");
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 如果是在线支付的原路退还,去做退款操作
|
||||
/// </summary>
|
||||
Task<WebApiCallBack> PaymentRefund(string refundId);
|
||||
|
||||
|
||||
#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<CoreCmsBillRefund>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsBillRefund, bool>> predicate,
|
||||
Expression<Func<CoreCmsBillRefund, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/Bill/ICoreCmsBillReshipItemServices.cs
Normal file
21
CoreCms.Net.IServices/Bill/ICoreCmsBillReshipItemServices.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 ICoreCmsBillReshipItemServices : IBaseServices<CoreCmsBillReshipItem>
|
||||
{
|
||||
}
|
||||
}
|
||||
68
CoreCms.Net.IServices/Bill/ICoreCmsBillReshipServices.cs
Normal file
68
CoreCms.Net.IServices/Bill/ICoreCmsBillReshipServices.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsBillReshipServices : IBaseServices<CoreCmsBillReship>
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建退货单
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="aftersalesId"></param>
|
||||
/// <param name="aftersalesItems"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToAdd(int userId, string orderId, string aftersalesId,
|
||||
List<CoreCmsBillAftersalesItem> aftersalesItems);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取单个数据带导航
|
||||
/// </summary>
|
||||
/// <param name="predicate"></param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="orderByType"></param>
|
||||
/// <returns></returns>
|
||||
Task<CoreCmsBillReship> GetDetails(Expression<Func<CoreCmsBillReship, bool>> predicate,
|
||||
Expression<Func<CoreCmsBillReship, 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>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsBillReship>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsBillReship, bool>> predicate,
|
||||
Expression<Func<CoreCmsBillReship, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
143
CoreCms.Net.IServices/Cart/ICoreCmsCartServices.cs
Normal file
143
CoreCms.Net.IServices/Cart/ICoreCmsCartServices.cs
Normal file
@@ -0,0 +1,143 @@
|
||||
/***********************************************************************
|
||||
* 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.Configuration;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Model.ViewModels.DTO;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 购物车表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsCartServices : IBaseServices<CoreCmsCart>
|
||||
{
|
||||
/// <summary>
|
||||
/// 设置购物车商品数量
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="nums"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="numType"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> SetCartNum(int id, int nums, int userId, int numType, int type = 1);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> DeleteByIdsAsync(int id, int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加单个货品到购物车
|
||||
/// </summary>
|
||||
/// <param name="userId">用户id</param>
|
||||
/// <param name="productId">货品序号</param>
|
||||
/// <param name="nums">数量</param>
|
||||
/// <param name="numType">数量类型/1是直接增加/2是赋值</param>
|
||||
/// <param name="cartTypes">1普通购物/2拼团模式/3团购模式/4秒杀模式/6砍价模式/7赠品</param>
|
||||
/// <param name="objectId">关联对象类型</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Add(int userId, int productId, int nums, int numType, int cartTypes = 1, int objectId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 在加入购物车的时候,判断是否有参加拼团的商品
|
||||
/// </summary>
|
||||
/// <param name="productId"></param>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="nums">加入购物车数量</param>
|
||||
/// <param name="teamId">团队序列</param>
|
||||
Task<WebApiCallBack> AddCartHavePinTuan(int productId, int userId = 0, int nums = 1, int teamId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取购物车列表
|
||||
/// </summary>
|
||||
/// <param name="userId">用户序号</param>
|
||||
/// <param name="ids">已选择货号</param>
|
||||
/// <param name="type">购物车类型/同订单类型</param>
|
||||
/// <param name="objectId">关联非订单类型数据序列</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetCartDtoData(int userId, int[] ids = null, int type = 1, int objectId = 0);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取处理后的购物车信息
|
||||
/// </summary>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="ids">选中的购物车商品</param>
|
||||
/// <param name="orderType">订单类型</param>
|
||||
/// <param name="areaId">收货地址id</param>
|
||||
/// <param name="point">消费的积分</param>
|
||||
/// <param name="couponCode">优惠券码</param>
|
||||
/// <param name="freeFreight">是否免运费</param>
|
||||
/// <param name="deliveryType">关联上面的是否免运费/1=快递配送(要去算运费)生成订单记录快递方式,2=同城配送/3=门店自提(不需要计算运费)生成订单记录门店自提信息</param>
|
||||
/// <param name="objectId">关联非普通订单营销类型序列</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetCartInfos(int userId, int[] ids, int orderType, int areaId, int point,
|
||||
string couponCode, bool freeFreight = false,
|
||||
int deliveryType = (int)GlobalEnumVars.OrderReceiptType.Logistics, int objectId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 算运费
|
||||
/// </summary>
|
||||
/// <param name="cartDto">购物车信息</param>
|
||||
/// <param name="areaId">收货地址id</param>
|
||||
/// <param name="freeFreight">是否包邮,默认false</param>
|
||||
/// <returns></returns>
|
||||
bool CartFreight(CartDto cartDto, int areaId, bool freeFreight = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 购物车中使用优惠券
|
||||
/// </summary>
|
||||
/// <param name="cartDto">购物车数据</param>
|
||||
/// <param name="couponCode">优惠券码</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> CartCoupon(CartDto cartDto, string couponCode);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 购物车中使用积分
|
||||
/// </summary>
|
||||
/// <param name="cartDto"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="point"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> CartPoint(CartDto cartDto, int userId, int point);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取购物车用户数据总数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<int> GetCountAsync(int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据提交的数据判断哪些购物券可以使用
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="promotionId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetCartAvailableCoupon(int userId, int[] ids = null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/***********************************************************************
|
||||
* 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 SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
public interface ICodeGeneratorServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取所有的表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<DbTableInfo> GetDbTables();
|
||||
|
||||
/// <summary>
|
||||
/// 获取表下面所有的字段
|
||||
/// </summary>
|
||||
/// <param name="tableName"></param>
|
||||
/// <returns></returns>
|
||||
List<DbColumnInfo> GetDbTablesColumns(string tableName);
|
||||
|
||||
///// <summary>
|
||||
///// 自动生成全部代码
|
||||
///// </summary>
|
||||
///// <param name="model"></param>
|
||||
///// <returns></returns>
|
||||
byte[] CodeGen(string tableName, string fileType);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自动生成类型的所有数据库代码
|
||||
/// </summary>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="fileType"></param>
|
||||
/// <returns></returns>
|
||||
byte[] CodeGenByAll(string fileType);
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/Com/ICoreCmsLabelServices.cs
Normal file
21
CoreCms.Net.IServices/Com/ICoreCmsLabelServices.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 ICoreCmsLabelServices : IBaseServices<CoreCmsLabel>
|
||||
{
|
||||
}
|
||||
}
|
||||
100
CoreCms.Net.IServices/Com/IToolsServices.cs
Normal file
100
CoreCms.Net.IServices/Com/IToolsServices.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
/***********************************************************************
|
||||
* 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.IO;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Configuration;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.Options;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 标签表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface IToolsServices
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询是否存在违规内容并进行替换
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<String> IllegalWordsReplace(string oldString, char symbol = '*');
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询是否存在违规内容
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<bool> IllegalWordsContainsAny(string oldString);
|
||||
|
||||
#region FIle文件上传处理
|
||||
/// <summary>
|
||||
/// 本地上传(File)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<string> UpLoadFileForLocalStorage(FilesStorageOptions options, string fileExt, IFormFile file, int filesStorageLocation = (int)GlobalEnumVars.FilesStorageLocation.Admin);
|
||||
|
||||
/// <summary>
|
||||
/// AliYunOSS-阿里云上传方法(File)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<string> UpLoadFileForAliYunOSS(FilesStorageOptions options, string fileExt, IFormFile file);
|
||||
|
||||
/// <summary>
|
||||
/// QCloudOSS-腾讯云存储上传方法(File)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<string> UpLoadFileForQCloudOSS(FilesStorageOptions options, string fileExt, IFormFile file);
|
||||
/// <summary>
|
||||
/// QiNiuKoDo-七牛云存储上传方法(File)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<string> UpLoadFileForQiNiuKoDo(FilesStorageOptions options, string fileExt, IFormFile file);
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Base64文件上传处理
|
||||
/// <summary>
|
||||
/// 本地上传(Base64)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string UpLoadBase64ForLocalStorage(FilesStorageOptions options, MemoryStream memStream, int filesStorageLocation = (int)GlobalEnumVars.FilesStorageLocation.Admin);
|
||||
|
||||
/// <summary>
|
||||
/// AliYunOSS-阿里云上传方法(Base64)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<string> UpLoadBase64ForAliYunOSS(FilesStorageOptions options, MemoryStream memStream);
|
||||
|
||||
/// <summary>
|
||||
/// QCloudOSS-腾讯云存储上传方法(Base64)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string UpLoadBase64ForQCloudOSS(FilesStorageOptions options, byte[] bytes);
|
||||
|
||||
/// <summary>
|
||||
/// QiNiuKoDo-七牛云存储上传方法(Base64)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string UpLoadBase64ForQiNiuKoDo(FilesStorageOptions options, byte[] bytes);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
16
CoreCms.Net.IServices/CoreCms.Net.IServices.csproj
Normal file
16
CoreCms.Net.IServices/CoreCms.Net.IServices.csproj
Normal file
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CoreCms.Net.Configuration\CoreCms.Net.Configuration.csproj" />
|
||||
<ProjectReference Include="..\CoreCms.Net.Model\CoreCms.Net.Model.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,101 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsDistributionConditionServices : IBaseServices<CoreCmsDistributionCondition>
|
||||
{
|
||||
#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<CoreCmsDistributionCondition>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsDistributionCondition, bool>> predicate,
|
||||
Expression<Func<CoreCmsDistributionCondition, 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(CoreCmsDistributionCondition entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsDistributionCondition entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsDistributionCondition> 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
|
||||
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsDistributionCondition>> GetCaChe();
|
||||
|
||||
/// <summary>
|
||||
/// 更新cache
|
||||
/// </summary>
|
||||
Task<List<CoreCmsDistributionCondition>> UpdateCaChe();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsDistributionGradeServices : IBaseServices<CoreCmsDistributionGrade>
|
||||
{
|
||||
#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<CoreCmsDistributionGrade>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsDistributionGrade, bool>> predicate,
|
||||
Expression<Func<CoreCmsDistributionGrade, 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(CoreCmsDistributionGrade entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsDistributionGrade entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DeleteByIdAsync(int id);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsDistributionGrade>> GetCaChe();
|
||||
|
||||
/// <summary>
|
||||
/// 更新cache
|
||||
/// </summary>
|
||||
Task<List<CoreCmsDistributionGrade>> UpdateCaChe();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsDistributionOrderServices : IBaseServices<CoreCmsDistributionOrder>
|
||||
{
|
||||
#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<CoreCmsDistributionOrder>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsDistributionOrder, bool>> predicate,
|
||||
Expression<Func<CoreCmsDistributionOrder, object>> orderByExpression, OrderByType orderByType,
|
||||
int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加分销订单关联记录
|
||||
/// </summary>
|
||||
/// <param name="order"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddData(CoreCmsOrder order);
|
||||
|
||||
/// <summary>
|
||||
/// 订单结算处理事件
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> FinishOrder(string orderId);
|
||||
|
||||
/// <summary>
|
||||
/// 作废订单
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单编号</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> CancleOrderByOrderId(string orderId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取下级推广订单数量
|
||||
/// </summary>
|
||||
/// <param name="parentId">父类序列</param>
|
||||
/// <param name="type">1获取1级,其他为2级,0为全部</param>
|
||||
/// <param name="thisMonth">显示当月</param>
|
||||
/// <returns></returns>
|
||||
Task<int> QueryChildOrderCountAsync(int parentId, int type = 1, bool thisMonth = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取下级推广订单金额
|
||||
/// </summary>
|
||||
/// <param name="parentId">父类序列</param>
|
||||
/// <param name="type">1获取1级,其他为2级,0为全部</param>
|
||||
/// <param name="thisMonth">显示当月</param>
|
||||
/// <returns></returns>
|
||||
Task<decimal> QueryChildOrderMoneySumAsync(int parentId, int type = 1, bool thisMonth = false);
|
||||
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsDistributionOrder entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsDistributionOrder entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsDistributionOrder> 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,102 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsDistributionResultServices : IBaseServices<CoreCmsDistributionResult>
|
||||
{
|
||||
#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<CoreCmsDistributionResult>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsDistributionResult, bool>> predicate,
|
||||
Expression<Func<CoreCmsDistributionResult, 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(CoreCmsDistributionResult entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsDistributionResult entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsDistributionResult> 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
|
||||
|
||||
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsDistributionResult>> GetCaChe();
|
||||
|
||||
/// <summary>
|
||||
/// 更新cache
|
||||
/// </summary>
|
||||
Task<List<CoreCmsDistributionResult>> UpdateCaChe();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/***********************************************************************
|
||||
* 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.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Model.ViewModels.DTO.Distribution;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 分销商表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsDistributionServices : IBaseServices<CoreCmsDistribution>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取分销商信息
|
||||
/// </summary>
|
||||
/// <param name="userId">用户id</param>
|
||||
/// <param name="checkStatus">是否检查满足条件</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetInfo(int userId, bool checkStatus = false);
|
||||
|
||||
/// <summary>
|
||||
/// 添加用户信息
|
||||
/// </summary>
|
||||
/// <param name="iData"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddData(CoreCmsDistribution iData, int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取我的推广订单
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="limit"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetMyOrderList(int userId, int page, int limit = 10, int typeId = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取店铺信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="limit"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetStore(int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前用户返佣设置
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetGradeAndCommission(int userId);
|
||||
|
||||
|
||||
//检查是否可以成为分销商
|
||||
Task CheckCondition(Dictionary<string, DictionaryKeyValues> allConfigs, CoreCmsDistribution info,
|
||||
int userId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查当前用户是否可以升级(暂存,有问题)
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> CheckUpdate(int userId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取代理商排行
|
||||
/// </summary>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<DistributionRankingDTO>> QueryRankingPageAsync(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 ICoreCmsInvoiceRecordServices : IBaseServices<CoreCmsInvoiceRecord>
|
||||
{
|
||||
}
|
||||
}
|
||||
53
CoreCms.Net.IServices/Financial/ICoreCmsInvoiceServices.cs
Normal file
53
CoreCms.Net.IServices/Financial/ICoreCmsInvoiceServices.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsInvoiceServices : IBaseServices<CoreCmsInvoice>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取订单的发票信息
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单字符串编号</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderInvoiceInfo(string orderId);
|
||||
|
||||
|
||||
#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<CoreCmsInvoice>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsInvoice, bool>> predicate,
|
||||
Expression<Func<CoreCmsInvoice, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/Financial/ICoreCmsPaymentsServices.cs
Normal file
21
CoreCms.Net.IServices/Financial/ICoreCmsPaymentsServices.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 ICoreCmsPaymentsServices : IBaseServices<CoreCmsPayments>
|
||||
{
|
||||
}
|
||||
}
|
||||
100
CoreCms.Net.IServices/Financial/ICoreCmsReportsServices.cs
Normal file
100
CoreCms.Net.IServices/Financial/ICoreCmsReportsServices.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
/***********************************************************************
|
||||
* 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.Threading.Tasks;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.Echarts;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 报表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsReportsServices : IBaseServices<GetOrdersReportsDbSelectOut>
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单报表
|
||||
/// </summary>
|
||||
/// <param name="num">数量</param>
|
||||
/// <param name="where">查询条件</param>
|
||||
/// <param name="section">查询值</param>
|
||||
/// <param name="sTime">开始时间</param>
|
||||
/// <param name="joinVal">筛选字段createTime/paymentTime </param>
|
||||
/// <returns></returns>
|
||||
List<GetOrdersReportsDbSelectOut> GetOrderMark(int num, string where, int section, DateTime sTime,
|
||||
string joinVal);
|
||||
|
||||
/// <summary>
|
||||
/// 支付单报表
|
||||
/// </summary>
|
||||
/// <param name="num">数量</param>
|
||||
/// <param name="where">查询条件</param>
|
||||
/// <param name="section">查询值</param>
|
||||
/// <param name="sTime">开始时间</param>
|
||||
/// <param name="joinVal">筛选字段createTime/paymentTime </param>
|
||||
/// <returns></returns>
|
||||
List<GetOrdersReportsDbSelectOut> GetPaymentsMark(int num, string where, int section, DateTime sTime,
|
||||
string joinVal);
|
||||
|
||||
/// <summary>
|
||||
/// 退款单报表
|
||||
/// </summary>
|
||||
/// <param name="num">数量</param>
|
||||
/// <param name="where">查询条件</param>
|
||||
/// <param name="section">查询值</param>
|
||||
/// <param name="sTime">开始时间</param>
|
||||
/// <param name="joinVal">筛选字段createTime/paymentTime </param>
|
||||
/// <returns></returns>
|
||||
List<GetOrdersReportsDbSelectOut> GetRefundMark(int num, string where, int section, DateTime sTime,
|
||||
string joinVal);
|
||||
|
||||
/// <summary>
|
||||
/// 用户提现报表
|
||||
/// </summary>
|
||||
/// <param name="num">数量</param>
|
||||
/// <param name="where">查询条件</param>
|
||||
/// <param name="section">查询值</param>
|
||||
/// <param name="sTime">开始时间</param>
|
||||
/// <param name="joinVal">筛选字段createTime/paymentTime </param>
|
||||
/// <returns></returns>
|
||||
List<GetOrdersReportsDbSelectOut> GetTocashMark(int num, string where, int section, DateTime sTime,
|
||||
string joinVal);
|
||||
|
||||
/// <summary>
|
||||
/// 获取订单销量查询返回结果
|
||||
/// </summary>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <param name="filter"></param>
|
||||
/// <param name="filterSed"></param>
|
||||
/// <param name="thesort"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<GoodsSalesVolume>> GetGoodsSalesVolumes(string start, string end, string filter,
|
||||
string filterSed,
|
||||
string thesort, int pageIndex = 1, int pageSize = 5000);
|
||||
|
||||
/// <summary>
|
||||
/// 获取商品收藏查询返回结果
|
||||
/// </summary>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <param name="thesort"></param>
|
||||
/// <param name="pageIndex"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<GoodsCollection>> GetGoodsCollections(string start, string end, string thesort,
|
||||
int pageIndex = 1, int pageSize = 5000);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
819
CoreCms.Net.IServices/IBaseServices.cs
Normal file
819
CoreCms.Net.IServices/IBaseServices.cs
Normal file
@@ -0,0 +1,819 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.Basics;
|
||||
using SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 服务仓储通用接口类
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public interface IBaseServices<T> where T : class
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主值查询单条数据
|
||||
/// </summary>
|
||||
/// <param name="pkValue">主键值</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体</returns>
|
||||
T QueryById(object pkValue, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据主值查询单条数据
|
||||
/// </summary>
|
||||
/// <param name="objId"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByIdAsync(object objId, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据主值列表查询单条数据
|
||||
/// </summary>
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
List<T> QueryByIDs(object[] lstIds, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据主值列表查询单条数据
|
||||
/// </summary>
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryByIDsAsync(object[] lstIds, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据主值列表查询单条数据
|
||||
/// </summary>
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
List<T> QueryByIDs(int[] lstIds, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据主值列表查询单条数据
|
||||
/// </summary>
|
||||
/// <param name="lstIds"></param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryByIDsAsync(int[] lstIds, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 查询所有数据(无分页,请慎用)
|
||||
/// </summary>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
List<T> Query(bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 查询所有数据(无分页,请慎用)
|
||||
/// </summary>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryAsync(bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="strWhere">条件</param>
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
List<T> QueryListByClause(string strWhere, string orderBy = "", bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="strWhere">条件</param>
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
Task<List<T>> QueryListByClauseAsync(string strWhere, string orderBy = "", bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, string orderBy = "", bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderBy">排序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate, string orderBy = "",
|
||||
bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderByPredicate">排序字段</param>
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderByPredicate">排序字段</param>
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>泛型实体集合</returns>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, 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>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, int take,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, 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>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate, int take,
|
||||
Expression<Func<T, object>> orderByPredicate, OrderByType orderByType, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询一定数量数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="take">获取数量</param>
|
||||
/// <param name="strOrderByFileds">排序字段,如name asc,age desc</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
List<T> QueryListByClause(Expression<Func<T, bool>> predicate, int take, string strOrderByFileds = "",
|
||||
bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询一定数量数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="take">获取数量</param>
|
||||
/// <param name="strOrderByFileds">排序字段,如name asc,age desc</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> QueryListByClauseAsync(Expression<Func<T, bool>> predicate, int take,
|
||||
string strOrderByFileds = "", bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
T QueryByClause(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderByPredicate">排序字段</param>
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
T QueryByClause(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="orderByPredicate">排序字段</param>
|
||||
/// <param name="orderByType">排序顺序</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<T> QueryByClauseAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByPredicate,
|
||||
OrderByType orderByType, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
int Insert(T entity);
|
||||
|
||||
/// <summary>
|
||||
/// 写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
Task<int> InsertAsync(T entity);
|
||||
|
||||
/// <summary>
|
||||
/// 写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
int Insert(T entity, Expression<Func<T, object>> insertColumns = null);
|
||||
|
||||
/// <summary>
|
||||
/// 写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
Task<int> InsertAsync(T entity, Expression<Func<T, object>> insertColumns = null);
|
||||
|
||||
/// <summary>
|
||||
/// 写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
bool InsertGuid(T entity, Expression<Func<T, object>> insertColumns = null);
|
||||
|
||||
/// <summary>
|
||||
/// 写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> InsertGuidAsync(T entity, Expression<Func<T, object>> insertColumns = null);
|
||||
|
||||
/// <summary>
|
||||
/// 批量写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
int Insert(List<T> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 批量写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
Task<int> InsertAsync(List<T> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 批量写入实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
Task<int> InsertCommandAsync(List<T> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
bool Update(List<T> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateAsync(List<T> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 更新实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
bool Update(T entity);
|
||||
|
||||
/// <summary>
|
||||
/// 更新实体数据
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateAsync(T entity);
|
||||
|
||||
/// <summary>
|
||||
/// 根据手写条件更新
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="strWhere"></param>
|
||||
/// <returns></returns>
|
||||
bool Update(T entity, string strWhere);
|
||||
|
||||
/// <summary>
|
||||
/// 根据手写条件更新
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="strWhere"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateAsync(T entity, string strWhere);
|
||||
|
||||
/// <summary>
|
||||
/// 根据手写sql语句更新数据
|
||||
/// </summary>
|
||||
/// <param name="strSql"></param>
|
||||
/// <param name="parameters"></param>
|
||||
/// <returns></returns>
|
||||
bool Update(string strSql, SugarParameter[] parameters = null);
|
||||
|
||||
/// <summary>
|
||||
/// 根据手写sql语句更新数据
|
||||
/// </summary>
|
||||
/// <param name="strSql"></param>
|
||||
/// <param name="parameters"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateAsync(string strSql, SugarParameter[] parameters = null);
|
||||
|
||||
/// <summary>
|
||||
/// 更新某个字段
|
||||
/// </summary>
|
||||
/// <param name="columns">lamdba表达式,如it => new Student() { Name = "a", CreateTime = DateTime.Now }</param>
|
||||
/// <param name="where">lamdba判断</param>
|
||||
/// <returns></returns>
|
||||
bool Update(Expression<Func<T, T>> columns, Expression<Func<T, bool>> where);
|
||||
|
||||
/// <summary>
|
||||
/// 更新某个字段
|
||||
/// </summary>
|
||||
/// <param name="columns">lamdba表达式,如it => new Student() { Name = "a", CreateTime = DateTime.Now }</param>
|
||||
/// <param name="where">lamdba判断</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateAsync(Expression<Func<T, T>> columns, Expression<Func<T, bool>> where);
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件更新
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="lstColumns"></param>
|
||||
/// <param name="lstIgnoreColumns"></param>
|
||||
/// <param name="strWhere"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdateAsync(T entity, List<string> lstColumns = null, List<string> lstIgnoreColumns = null,
|
||||
string strWhere = "");
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件更新
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <param name="lstColumns"></param>
|
||||
/// <param name="lstIgnoreColumns"></param>
|
||||
/// <param name="strWhere"></param>
|
||||
/// <returns></returns>
|
||||
bool Update(T entity, List<string> lstColumns = null, List<string> lstIgnoreColumns = null,
|
||||
string strWhere = "");
|
||||
|
||||
/// <summary>
|
||||
/// 删除数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
bool Delete(T entity);
|
||||
|
||||
/// <summary>
|
||||
/// 删除数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteAsync(T entity);
|
||||
|
||||
/// <summary>
|
||||
/// 删除数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类集合</param>
|
||||
/// <returns></returns>
|
||||
bool Delete(IEnumerable<T> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 删除数据
|
||||
/// </summary>
|
||||
/// <param name="entity">实体类集合</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteAsync(IEnumerable<T> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 删除数据
|
||||
/// </summary>
|
||||
/// <param name="where">过滤条件</param>
|
||||
/// <returns></returns>
|
||||
bool Delete(Expression<Func<T, bool>> where);
|
||||
|
||||
/// <summary>
|
||||
/// 删除数据
|
||||
/// </summary>
|
||||
/// <param name="where">过滤条件</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteAsync(Expression<Func<T, bool>> where);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteById(object id);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdAsync(object id);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(int[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(int[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(long[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(long[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(Guid[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(Guid[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(string[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(string[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(List<int> ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(List<int> ids);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(List<string> ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(List<string> ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(List<Guid> ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(List<Guid> ids);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
bool DeleteByIds(List<long> ids);
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定ID集合的数据(批量删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> DeleteByIdsAsync(List<long> ids);
|
||||
|
||||
/// <summary>
|
||||
/// 判断数据是否存在
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
bool Exists(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 判断数据是否存在
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> ExistsAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据总数
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
int GetCount(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据总数
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<int> GetCountAsync(Expression<Func<T, bool>> predicate, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
int GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, int>> field, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<int> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, int>> field,
|
||||
bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
decimal GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, decimal>> field,
|
||||
bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<decimal> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, decimal>> field,
|
||||
bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
float GetSum(Expression<Func<T, bool>> predicate, Expression<Func<T, float>> field, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据某个字段的合计
|
||||
/// </summary>
|
||||
/// <param name="predicate">条件表达式树</param>
|
||||
/// <param name="field">字段</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<float> GetSumAsync(Expression<Func<T, bool>> predicate, Expression<Func<T, float>> field,
|
||||
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>
|
||||
IPageList<T> QueryPage(Expression<Func<T, 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<T>> QueryPageAsync(Expression<Func<T, bool>> predicate, string orderBy = "", int pageIndex = 1,
|
||||
int pageSize = 20, 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>
|
||||
IPageList<T> QueryPage(Expression<Func<T, bool>> predicate, Expression<Func<T, object>> orderByExpression,
|
||||
OrderByType orderByType, int pageIndex = 1, int pageSize = 20, 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>
|
||||
Task<IPageList<T>> QueryPageAsync(Expression<Func<T, bool>> predicate,
|
||||
Expression<Func<T, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
/// <summary>
|
||||
/// 查询-多表查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">实体1</typeparam>
|
||||
/// <typeparam name="T2">实体2</typeparam>
|
||||
/// <typeparam name="TResult">返回对象</typeparam>
|
||||
/// <param name="joinExpression">关联表达式 (join1,join2) => new object[] {JoinType.Left,join1.UserNo==join2.UserNo}</param>
|
||||
/// <param name="selectExpression">返回表达式 (s1, s2) => new { Id =s1.UserNo, Id1 = s2.UserNo}</param>
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>值</returns>
|
||||
List<TResult> QueryMuch<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
Expression<Func<T1, T2, TResult>> selectExpression,
|
||||
Expression<Func<T1, T2, bool>> whereLambda = null, bool blUseNoLock = false) where T1 : class, new();
|
||||
|
||||
/// <summary>
|
||||
/// 查询-多表查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">实体1</typeparam>
|
||||
/// <typeparam name="T2">实体2</typeparam>
|
||||
/// <typeparam name="TResult">返回对象</typeparam>
|
||||
/// <param name="joinExpression">关联表达式 (join1,join2) => new object[] {JoinType.Left,join1.UserNo==join2.UserNo}</param>
|
||||
/// <param name="selectExpression">返回表达式 (s1, s2) => new { Id =s1.UserNo, Id1 = s2.UserNo}</param>
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>值</returns>
|
||||
Task<List<TResult>> QueryMuchAsync<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
Expression<Func<T1, T2, TResult>> selectExpression,
|
||||
Expression<Func<T1, T2, bool>> whereLambda = null, bool blUseNoLock = false) where T1 : class, new();
|
||||
|
||||
/// <summary>
|
||||
/// 查询-多表查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">实体1</typeparam>
|
||||
/// <typeparam name="T2">实体2</typeparam>
|
||||
/// <typeparam name="TResult">返回对象</typeparam>
|
||||
/// <param name="joinExpression">关联表达式 (join1,join2) => new object[] {JoinType.Left,join1.UserNo==join2.UserNo}</param>
|
||||
/// <param name="selectExpression">返回表达式 (s1, s2) => new { Id =s1.UserNo, Id1 = s2.UserNo}</param>
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>值</returns>
|
||||
TResult QueryMuchFirst<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
Expression<Func<T1, T2, TResult>> selectExpression,
|
||||
Expression<Func<T1, T2, bool>> whereLambda = null, bool blUseNoLock = false) where T1 : class, new();
|
||||
|
||||
/// <summary>
|
||||
/// 查询-多表查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T1">实体1</typeparam>
|
||||
/// <typeparam name="T2">实体2</typeparam>
|
||||
/// <typeparam name="TResult">返回对象</typeparam>
|
||||
/// <param name="joinExpression">关联表达式 (join1,join2) => new object[] {JoinType.Left,join1.UserNo==join2.UserNo}</param>
|
||||
/// <param name="selectExpression">返回表达式 (s1, s2) => new { Id =s1.UserNo, Id1 = s2.UserNo}</param>
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>值</returns>
|
||||
Task<TResult> QueryMuchFirstAsync<T1, T2, TResult>(
|
||||
Expression<Func<T1, T2, object[]>> joinExpression,
|
||||
Expression<Func<T1, T2, TResult>> selectExpression,
|
||||
Expression<Func<T1, T2, bool>> whereLambda = null, bool blUseNoLock = false) where T1 : class, new();
|
||||
|
||||
/// <summary>
|
||||
/// 查询-三表查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T">实体1</typeparam>
|
||||
/// <typeparam name="T2">实体2</typeparam>
|
||||
/// <typeparam name="T3">实体3</typeparam>
|
||||
/// <typeparam name="TResult">返回对象</typeparam>
|
||||
/// <param name="joinExpression">关联表达式 (join1,join2) => new object[] {JoinType.Left,join1.UserNo==join2.UserNo}</param>
|
||||
/// <param name="selectExpression">返回表达式 (s1, s2) => new { Id =s1.UserNo, Id1 = s2.UserNo}</param>
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>值</returns>
|
||||
List<TResult> QueryMuch<T1, T2, T3, TResult>(
|
||||
Expression<Func<T1, T2, T3, object[]>> joinExpression,
|
||||
Expression<Func<T1, T2, T3, TResult>> selectExpression,
|
||||
Expression<Func<T1, T2, T3, bool>> whereLambda = null, bool blUseNoLock = false) where T1 : class, new();
|
||||
|
||||
/// <summary>
|
||||
/// 查询-三表查询
|
||||
/// </summary>
|
||||
/// <typeparam name="T">实体1</typeparam>
|
||||
/// <typeparam name="T2">实体2</typeparam>
|
||||
/// <typeparam name="T3">实体3</typeparam>
|
||||
/// <typeparam name="TResult">返回对象</typeparam>
|
||||
/// <param name="joinExpression">关联表达式 (join1,join2) => new object[] {JoinType.Left,join1.UserNo==join2.UserNo}</param>
|
||||
/// <param name="selectExpression">返回表达式 (s1, s2) => new { Id =s1.UserNo, Id1 = s2.UserNo}</param>
|
||||
/// <param name="whereLambda">查询表达式 (w1, w2) =>w1.UserNo == "")</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns>值</returns>
|
||||
Task<List<TResult>> QueryMuchAsync<T1, T2, T3, TResult>(
|
||||
Expression<Func<T1, T2, T3, object[]>> joinExpression,
|
||||
Expression<Func<T1, T2, T3, TResult>> selectExpression,
|
||||
Expression<Func<T1, T2, T3, bool>> whereLambda = null, bool blUseNoLock = false) where T1 : class, new();
|
||||
|
||||
/// <summary>
|
||||
/// 执行sql语句并返回List<T>
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="sql"></param>
|
||||
/// <param name="parameters"></param>
|
||||
/// <returns></returns>
|
||||
List<T> SqlQuery(string sql, List<SugarParameter> parameters);
|
||||
|
||||
/// <summary>
|
||||
/// 执行sql语句并返回List<T>
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="sql"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> SqlQueryable(string sql);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 消息配置表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsMessageCenterServices : IBaseServices<CoreCmsMessageCenter>
|
||||
{
|
||||
/// <summary>
|
||||
/// 商家发送信息助手
|
||||
/// </summary>
|
||||
/// <param name="userId">接受者id</param>
|
||||
/// <param name="code">模板编码</param>
|
||||
/// <param name="parameters">参数</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> SendMessage(int userId, string code, JObject parameters);
|
||||
}
|
||||
}
|
||||
48
CoreCms.Net.IServices/Message/ICoreCmsMessageServices.cs
Normal file
48
CoreCms.Net.IServices/Message/ICoreCmsMessageServices.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 消息发送表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsMessageServices : IBaseServices<CoreCmsMessage>
|
||||
{
|
||||
/// <summary>
|
||||
/// 站内消息
|
||||
/// </summary>
|
||||
/// <param name="userId">接受者id</param>
|
||||
/// <param name="code">模板编码</param>
|
||||
/// <param name="parameters">参数</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Send(int userId, string code, JObject parameters);
|
||||
|
||||
/// <summary>
|
||||
/// 消息查看,更新已读状态
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> info(int userId, int id);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否有新消息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> HasNew(int userId);
|
||||
}
|
||||
}
|
||||
58
CoreCms.Net.IServices/Message/ICoreCmsSmsServices.cs
Normal file
58
CoreCms.Net.IServices/Message/ICoreCmsSmsServices.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.Sms;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 短信发送日志 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsSmsServices : IBaseServices<CoreCmsSms>
|
||||
{
|
||||
/// <summary>
|
||||
/// 发送短信(验证码)
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="mobile"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> DoSendSms(string type, string mobile);
|
||||
|
||||
/// <summary>
|
||||
/// 发送短信统一方法
|
||||
/// </summary>
|
||||
/// <param name="mobile">接受者手机号码</param>
|
||||
/// <param name="code">模板编码</param>
|
||||
/// <param name="parameters">参数</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Send(string mobile, string code, JObject parameters);
|
||||
|
||||
/// <summary>
|
||||
/// 接口通道发送短信
|
||||
/// </summary>
|
||||
/// <param name="mobile"></param>
|
||||
/// <param name="contentBody"></param>
|
||||
/// <param name="smsOptions"></param>
|
||||
string SendSms(string mobile, string contentBody, SMSOptions smsOptions);
|
||||
|
||||
/// <summary>
|
||||
/// 校验短信验证码
|
||||
/// </summary>
|
||||
/// <param name="phone"></param>
|
||||
/// <param name="verCode"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> Check(string phone, string verCode, string code);
|
||||
}
|
||||
}
|
||||
30
CoreCms.Net.IServices/Order/ICoreCmsOrderItemServices.cs
Normal file
30
CoreCms.Net.IServices/Order/ICoreCmsOrderItemServices.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
/***********************************************************************
|
||||
* 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;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单明细表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsOrderItemServices : IBaseServices<CoreCmsOrderItem>
|
||||
{
|
||||
/// <summary>
|
||||
/// 发货数量
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="item">发货明细</param>
|
||||
/// <returns></returns>
|
||||
Task<bool> ship(string orderId, Dictionary<int, int> item);
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/Order/ICoreCmsOrderLogServices.cs
Normal file
21
CoreCms.Net.IServices/Order/ICoreCmsOrderLogServices.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 ICoreCmsOrderLogServices : IBaseServices<CoreCmsOrderLog>
|
||||
{
|
||||
}
|
||||
}
|
||||
304
CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
Normal file
304
CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
Normal file
@@ -0,0 +1,304 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsOrderServices : IBaseServices<CoreCmsOrder>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询团购秒杀下单数量
|
||||
/// </summary>
|
||||
/// <param name="productId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="startTime"></param>
|
||||
/// <param name="endTime"></param>
|
||||
/// <param name="orderType"></param>
|
||||
/// <returns></returns>
|
||||
FindLimitOrderDto FindLimitOrder(int productId, int userId, DateTime? startTime, DateTime? endTime,
|
||||
int orderType = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取税号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetTaxCode(string name);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建订单
|
||||
/// </summary>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="orderType">订单类型,1是普通订单,2是拼团订单</param>
|
||||
/// <param name="cartIds">购物车货品序列</param>
|
||||
/// <param name="receiptType">收货方式,1快递物流,2同城配送,3门店自提</param>
|
||||
/// <param name="ushipId">用户地址库序列</param>
|
||||
/// <param name="storeId">门店序列</param>
|
||||
/// <param name="ladingName">提货人姓名</param>
|
||||
/// <param name="ladingMobile">提货人联系方式</param>
|
||||
/// <param name="memo">备注</param>
|
||||
/// <param name="point">积分</param>
|
||||
/// <param name="couponCode">优惠券码</param>
|
||||
/// <param name="source">来源平台</param>
|
||||
/// <param name="scene">场景值(一般小程序才有)</param>
|
||||
/// <param name="taxType">发票信息</param>
|
||||
/// <param name="taxName">发票抬头</param>
|
||||
/// <param name="taxCode">发票税务编码</param>
|
||||
/// <param name="objectId">关联非普通订单营销功能的序列</param>
|
||||
/// <param name="teamId">拼团订单分组序列</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToAdd(int userId, int orderType, string cartIds, int receiptType, int ushipId, int storeId,
|
||||
string ladingName, string ladingMobile, string memo, int point, string couponCode,
|
||||
int source, int scene, int taxType, string taxName, string taxCode, int objectId, int teamId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取订单信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderInfoByOrderId(string id, int userId = 0, int aftersaleLevel = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取订单不同状态的数量
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="isAfterSale"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderStatusNum(int userId, int[] ids, bool isAfterSale = false);
|
||||
|
||||
/// <summary>
|
||||
/// 订单数量统计
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> OrderCount(int type = 0, int userId = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取订单状态反查
|
||||
/// </summary>
|
||||
/// <param name="status">状态</param>
|
||||
/// <returns></returns>
|
||||
Expression<Func<CoreCmsOrder, bool>> GetReverseStatus(int status);
|
||||
|
||||
/// <summary>
|
||||
/// 获取订单列表微信小程序
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderList(int status = -1, int userId = 0, int page = 1, int limit = 5);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 商家获取订单列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderPageByMerchant(string dateType, string[] date, int status = 0, int storeId = 0,
|
||||
int page = 1, int limit = 5);
|
||||
|
||||
/// <summary>
|
||||
/// 根据搜索条件商家获取订单列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderPageByMerchantSearch(string keyword, int status = 0, int receiptType = 0, int storeId = 0,
|
||||
int page = 1, int limit = 5);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 订单支付
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单编号</param>
|
||||
/// <param name="paymentCode">支付方式</param>
|
||||
/// <param name="billPaymentInfo">支付单据</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Pay(string orderId, string paymentCode, CoreCmsBillPayments billPaymentInfo);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 取消订单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> CancelOrder(string[] ids, int userId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 后端根据订单状态生成不同的操作按钮
|
||||
/// </summary>
|
||||
/// <param name="orderId">订单号</param>
|
||||
/// <param name="orderStatus">订单状态</param>
|
||||
/// <param name="payStatus">支付状态</param>
|
||||
/// <param name="shipStatus">发货状态</param>
|
||||
/// <param name="receiptType">收货方式</param>
|
||||
/// <param name="isDel">是否删除</param>
|
||||
/// <returns></returns>
|
||||
string GetOperating(string orderId, int orderStatus, int payStatus, int shipStatus, int receiptType, bool isDel);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 构建需要发货的数据,和发货单密切关联
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderShipInfo(string[] ids);
|
||||
|
||||
/// <summary>
|
||||
/// 构建单个需要发货的数据,和发货单密切关联
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetOrderShipInfo(string orderId);
|
||||
|
||||
/// <summary>
|
||||
/// 发货改状态
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="items"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> EditShipStatus(string orderId, Dictionary<int, int> items);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 批量订单发货
|
||||
/// </summary>
|
||||
/// <param name="ids">订单标号</param>
|
||||
/// <param name="logiCode">物流公司编码</param>
|
||||
/// <param name="logiNo">物流单号</param>
|
||||
/// <param name="items">发货明细</param>
|
||||
/// <param name="shipName">收货人姓名</param>
|
||||
/// <param name="shipMobile">收货人电话</param>
|
||||
/// <param name="shipAddress">收货地址</param>
|
||||
/// <param name="memo">发货描述</param>
|
||||
/// <param name="storeId">店铺收货地址</param>
|
||||
/// <param name="shipAreaId">省市区id</param>
|
||||
/// <param name="deliveryCompanyId">直播物流编码</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> BatchShip(string[] ids, string logiCode, string logiNo,
|
||||
Dictionary<int, int> items, string shipName, string shipMobile, string shipAddress, string memo,
|
||||
int storeId = 0, int shipAreaId = 0, string deliveryCompanyId = "");
|
||||
|
||||
/// <summary>
|
||||
/// 订单发货
|
||||
/// </summary>
|
||||
/// <param name="ids">订单标号</param>
|
||||
/// <param name="logiCode">物流公司编码</param>
|
||||
/// <param name="logiNo">物流单号</param>
|
||||
/// <param name="items">发货明细</param>
|
||||
/// <param name="shipName">收货人姓名</param>
|
||||
/// <param name="shipMobile">收货人电话</param>
|
||||
/// <param name="shipAddress">收货地址</param>
|
||||
/// <param name="memo">发货描述</param>
|
||||
/// <param name="storeId">店铺收货地址</param>
|
||||
/// <param name="shipAreaId">省市区id</param>
|
||||
/// <param name="deliveryCompanyId">直播物流编码</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Ship(string ids, string logiCode, string logiNo,
|
||||
Dictionary<int, int> items, string shipName, string shipMobile, string shipAddress, string memo,
|
||||
int storeId = 0, int shipAreaId = 0, string deliveryCompanyId = "");
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 后台完成订单
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="score">有序队列积分</param>
|
||||
/// <param name="remark"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> CompleteOrder(string orderId, int score = 0, string remark = "后台订单完成操作");
|
||||
|
||||
/// <summary>
|
||||
/// 确认签收订单
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ConfirmOrder(string orderId, int userId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断订单是否可以进行评论
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> IsOrderComment(string orderId, int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自动取消订单(定时任务使用)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AutoCancelOrder();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自动完成订单(定时任务使用)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AutoCompleteOrder();
|
||||
|
||||
/// <summary>
|
||||
/// 自动评价订单(定时任务使用)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AutoEvaluateOrder();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自动签收订单(定时任务使用)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AutoSignOrder();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 催付款(定时任务使用)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> RemindOrderPay();
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写根据条件列表数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsOrder>> QueryListAsync(Expression<Func<CoreCmsOrder, bool>> predicate,
|
||||
Expression<Func<CoreCmsOrder, 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<CoreCmsOrder>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsOrder, bool>> predicate,
|
||||
Expression<Func<CoreCmsOrder, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
}
|
||||
}
|
||||
28
CoreCms.Net.IServices/Pay/IAliPayServices.cs
Normal file
28
CoreCms.Net.IServices/Pay/IAliPayServices.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
/***********************************************************************
|
||||
* 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;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付宝支付 服务工厂接口
|
||||
/// </summary>
|
||||
public interface IAliPayServices : IBaseServices<CoreCmsSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// 发起支付
|
||||
/// </summary>
|
||||
/// <param name="entity">实体数据</param>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack PubPay(CoreCmsBillPayments entity);
|
||||
}
|
||||
}
|
||||
38
CoreCms.Net.IServices/Pay/IBalancePayServices.cs
Normal file
38
CoreCms.Net.IServices/Pay/IBalancePayServices.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 余额支付 服务工厂接口
|
||||
/// </summary>
|
||||
public interface IBalancePayServices : IBaseServices<CoreCmsSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// 发起支付
|
||||
/// </summary>
|
||||
/// <param name="entity">实体数据</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> PubPay(CoreCmsBillPayments entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户余额退款
|
||||
/// </summary>
|
||||
/// <param name="refundInfo">退款单数据</param>
|
||||
/// <param name="paymentInfo">支付单数据</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Refund(CoreCmsBillRefund refundInfo, CoreCmsBillPayments paymentInfo);
|
||||
}
|
||||
}
|
||||
28
CoreCms.Net.IServices/Pay/IOfflinePayServices.cs
Normal file
28
CoreCms.Net.IServices/Pay/IOfflinePayServices.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
/***********************************************************************
|
||||
* 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;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 线下支付 服务工厂接口
|
||||
/// </summary>
|
||||
public interface IOfflinePayServices : IBaseServices<CoreCmsSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// 发起支付
|
||||
/// </summary>
|
||||
/// <param name="entity">实体数据</param>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack PubPay(CoreCmsBillPayments entity);
|
||||
}
|
||||
}
|
||||
38
CoreCms.Net.IServices/Pay/IWeChatPayServices.cs
Normal file
38
CoreCms.Net.IServices/Pay/IWeChatPayServices.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 微信支付调用 服务工厂接口
|
||||
/// </summary>
|
||||
public interface IWeChatPayServices : IBaseServices<CoreCmsSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// 发起支付
|
||||
/// </summary>
|
||||
/// <param name="entity">实体数据</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> PubPay(CoreCmsBillPayments entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户退款
|
||||
/// </summary>
|
||||
/// <param name="refundInfo">退款单数据</param>
|
||||
/// <param name="paymentInfo">支付单数据</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Refund(CoreCmsBillRefund refundInfo, CoreCmsBillPayments paymentInfo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/***********************************************************************
|
||||
* 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;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 拼团商品表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsPinTuanGoodsServices : IBaseServices<CoreCmsPinTuanGoods>
|
||||
{
|
||||
/// <summary>
|
||||
/// 取拼团的商品信息,增加拼团的一些属性,会显示优惠价
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<CoreCmsGoods> GetGoodsInfo(int id, int userId, int pinTuanStatus = 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsPinTuanRecordServices : IBaseServices<CoreCmsPinTuanRecord>
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成订单的时候,增加信息
|
||||
/// </summary>
|
||||
/// <param name="order">订单数据</param>
|
||||
/// <param name="items">货品列表</param>
|
||||
/// <param name="teamId">团队序列</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> OrderAdd(CoreCmsOrder order, List<CoreCmsOrderItem> items, int teamId = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 取得商品的所有拼团记录
|
||||
/// </summary>
|
||||
/// <param name="ruleId"></param>
|
||||
/// <param name="goodsId"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="limit"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetRecord(int ruleId, int goodsId, int status = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取拼团团队人数
|
||||
/// </summary>
|
||||
/// <param name="teamId"></param>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetTeamList(int teamId, string orderId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自动取消到时间的团(定时任务用)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AutoCanclePinTuanOrder();
|
||||
|
||||
|
||||
#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<CoreCmsPinTuanRecord>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsPinTuanRecord, bool>> predicate,
|
||||
Expression<Func<CoreCmsPinTuanRecord, object>> orderByExpression, OrderByType orderByType,
|
||||
int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
64
CoreCms.Net.IServices/Pintuan/ICoreCmsPintuanRuleServices.cs
Normal file
64
CoreCms.Net.IServices/Pintuan/ICoreCmsPintuanRuleServices.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsPinTuanRuleServices : IBaseServices<CoreCmsPinTuanRule>
|
||||
{
|
||||
/// <summary>
|
||||
/// 取购物车数据的时候,更新价格
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack PinTuanInfo(List<CartProducts> list);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 接口上获取拼团所有商品
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetPinTuanList(int id = 0, int userId = 0);
|
||||
|
||||
|
||||
/// <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<TagPinTuanResult>> QueryTagPinTuanPageAsync(Expression<Func<TagPinTuanResult, bool>> predicate,
|
||||
Expression<Func<TagPinTuanResult, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据商品id获取拼团规则信息
|
||||
/// </summary>
|
||||
/// <param name="goodId"></param>
|
||||
/// <returns></returns>
|
||||
Task<TagPinTuanResult> GetPinTuanInfo(int goodId);
|
||||
}
|
||||
}
|
||||
149
CoreCms.Net.IServices/Promotion/ICoreCmsCouponServices.cs
Normal file
149
CoreCms.Net.IServices/Promotion/ICoreCmsCouponServices.cs
Normal file
@@ -0,0 +1,149 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsCouponServices : IBaseServices<CoreCmsCoupon>
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据优惠券编码取优惠券的信息,并判断是否可用
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <param name="check"></param>
|
||||
Task<WebApiCallBack> CodeToInfo(string[] code, bool check = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除核销多个优惠券
|
||||
/// </summary>
|
||||
/// <param name="couponCode">优惠券码</param>
|
||||
/// <param name="orderId">使用序列</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> UsedMultipleCoupon(string[] couponCode, string orderId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取 我的优惠券
|
||||
/// </summary>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="promotionId">促销序列</param>
|
||||
/// <param name="display">优惠券状态编码</param>
|
||||
/// <param name="page">页码</param>
|
||||
/// <param name="limit">数量</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetMyCoupon(int userId, int promotionId = 0, string display = "all", int page = 1,
|
||||
int limit = 10);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户领取优惠券 插入数据
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="promotionId"></param>
|
||||
/// <param name="promotion"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddData(int userId, int promotionId, CoreCmsPromotion promotion);
|
||||
|
||||
/// <summary>
|
||||
/// 通过优惠券号领取优惠券
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="couponCode"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ReceiveCoupon(int userId, string couponCode);
|
||||
|
||||
/// <summary>
|
||||
/// 生成优惠券code 方法
|
||||
/// </summary>
|
||||
/// <param name="noOfCodes">定义一个int类型的参数 用来确定生成多少个优惠码</param>
|
||||
/// <param name="excludeCodesArray">定义一个exclude_codes_array类型的数组</param>
|
||||
/// <param name="codeLength">定义一个code_length的参数来确定优惠码的长度</param>
|
||||
/// <returns></returns>
|
||||
List<string> GeneratePromotionCode(int noOfCodes = 1, List<string> excludeCodesArray = null,
|
||||
int codeLength = 10);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据条件查询分页数据及导航数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="isToPage">是否分页</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsCoupon>> QueryPageMapperAsync(
|
||||
Expression<Func<CoreCmsCoupon, bool>> predicate,
|
||||
Expression<Func<CoreCmsCoupon, object>> orderByExpression, OrderByType orderByType, bool isToPage = false,
|
||||
int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写数据并获取相关
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsCoupon>> QueryWithAboutAsync(Expression<Func<CoreCmsCoupon, bool>> predicate);
|
||||
|
||||
|
||||
#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<CoreCmsCoupon>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsCoupon, bool>> predicate,
|
||||
Expression<Func<CoreCmsCoupon, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取 我的优惠券可用数量
|
||||
/// </summary>
|
||||
/// <param name="userId">用户序列</param>
|
||||
Task<int> GetMyCouponCount(int userId);
|
||||
|
||||
|
||||
#region 优惠券返还
|
||||
|
||||
/// <summary>
|
||||
/// 优惠券返还
|
||||
/// </summary>
|
||||
/// <param name="couponCodes">优惠券数组</param>
|
||||
Task<WebApiCallBack> CancelReturnCoupon(string couponCodes);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.DTO;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 促销条件表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsPromotionConditionServices : IBaseServices<CoreCmsPromotionCondition>
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查是否满足条件
|
||||
/// </summary>
|
||||
/// <param name="conditionInfo"></param>
|
||||
/// <param name="cart"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> check(CoreCmsPromotionCondition conditionInfo, CartDto cart, CoreCmsPromotion promotionInfo);
|
||||
|
||||
/// <summary>
|
||||
/// 在促销结果中,如果是商品促销结果,调用此方法,判断商品是否符合需求
|
||||
/// </summary>
|
||||
/// <param name="promotionId"></param>
|
||||
/// <param name="goodsId"></param>
|
||||
/// <param name="nums"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> goods_check(int promotionId, int goodsId, int nums = 1);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 因为计算过促销条件后啊,前面有些是满足条件的,所以,他们的type是2,后面有不满足条件的时候呢,要把前面满足条件的回滚成不满足条件的
|
||||
/// </summary>
|
||||
/// <param name="cart"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
/// <returns></returns>
|
||||
CartDto PromotionFalse(CartDto cart, CoreCmsPromotion promotionInfo);
|
||||
|
||||
/// <summary>
|
||||
/// 订单满XX金额时满足条件
|
||||
/// </summary>
|
||||
/// <param name="parameters">参数对象</param>
|
||||
/// <param name="cart"></param>
|
||||
/// <returns></returns>
|
||||
int condition_ORDER_FULL(JObject parameters, CartDto cart);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所有商品满足条件
|
||||
/// </summary>
|
||||
/// <param name="parameters">参数对象</param>
|
||||
/// <param name="goodsId">商品序列</param>
|
||||
/// <param name="nums">数量</param>
|
||||
/// <returns></returns>
|
||||
int condition_GOODS_ALL(JObject parameters, int goodsId, int nums);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 指定某些商品满足条件
|
||||
/// </summary>
|
||||
/// <param name="parameters">参数对象</param>
|
||||
/// <param name="goodsId">商品序列</param>
|
||||
/// <param name="nums">数量</param>
|
||||
/// <returns></returns>
|
||||
int condition_GoodsIdS(JObject parameters, int goodsId, int nums);
|
||||
|
||||
/// <summary>
|
||||
/// 指定商品分类满足条件
|
||||
/// </summary>
|
||||
/// <param name="parameters">参数对象</param>
|
||||
/// <param name="goodsId">商品序列</param>
|
||||
/// <param name="nums">数量</param>
|
||||
/// <returns></returns>
|
||||
Task<int> condition_GOODS_CATS(JObject parameters, int goodsId, int nums);
|
||||
|
||||
/// <summary>
|
||||
/// 指定商品品牌满足条件
|
||||
/// </summary>
|
||||
/// <param name="parameters">参数对象</param>
|
||||
/// <param name="goodsId">商品序列</param>
|
||||
/// <param name="nums">数量</param>
|
||||
/// <returns></returns>
|
||||
Task<int> condition_GOODS_BRANDS(JObject parameters, int goodsId, int nums);
|
||||
|
||||
/// <summary>
|
||||
/// 指定用户等级满足条件
|
||||
/// </summary>
|
||||
/// <param name="parameters">参数对象</param>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <returns></returns>
|
||||
Task<int> condition_USER_GRADE(JObject parameters, int userId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsPromotionRecordServices : IBaseServices<CoreCmsPromotionRecord>
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成订单的时候,增加信息
|
||||
/// </summary>
|
||||
/// <param name="order">订单数据</param>
|
||||
/// <param name="items">货品列表</param>
|
||||
/// <param name="groupId">秒杀团购序列</param>
|
||||
/// <param name="orderType">购物车类型</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> OrderAdd(CoreCmsOrder order, List<CoreCmsOrderItem> items, int groupId, int orderType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.DTO;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 促销结果表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsPromotionResultServices : IBaseServices<CoreCmsPromotionResult>
|
||||
{
|
||||
/// <summary>
|
||||
/// 去计算结果
|
||||
/// </summary>
|
||||
/// <param name="resultInfo"></param>
|
||||
/// <param name="cart"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
Task<bool> toResult(CoreCmsPromotionResult resultInfo, CartDto cart, CoreCmsPromotion promotionInfo);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 订单减固定金额
|
||||
/// </summary>
|
||||
/// <param name="parameters"></param>
|
||||
/// <param name="cart"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
/// <returns></returns>
|
||||
bool result_ORDER_REDUCE(JObject parameters, CartDto cart, CoreCmsPromotion promotionInfo);
|
||||
|
||||
/// <summary>
|
||||
/// 订单打X折
|
||||
/// </summary>
|
||||
/// <param name="parameters"></param>
|
||||
/// <param name="cart"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
/// <returns></returns>
|
||||
bool result_ORDER_DISCOUNT(JObject parameters, CartDto cart, CoreCmsPromotion promotionInfo);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 指定商品减固定金额
|
||||
/// </summary>
|
||||
/// <param name="parameters"></param>
|
||||
/// <param name="cartProducts"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
/// <returns></returns>
|
||||
decimal result_GOODS_REDUCE(JObject parameters, CartProducts cartProducts, CoreCmsPromotion promotionInfo);
|
||||
|
||||
/// <summary>
|
||||
/// 指定商品打X折
|
||||
/// </summary>
|
||||
/// <param name="parameters"></param>
|
||||
/// <param name="cartProducts"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
/// <returns></returns>
|
||||
decimal result_GOODS_DISCOUNT(JObject parameters, CartProducts cartProducts, CoreCmsPromotion promotionInfo);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 商品一口价
|
||||
/// </summary>
|
||||
/// <param name="parameters"></param>
|
||||
/// <param name="cartProducts"></param>
|
||||
/// <param name="promotionInfo"></param>
|
||||
/// <returns></returns>
|
||||
decimal result_GOODS_ONE_PRICE(JObject parameters, CartProducts cartProducts, CoreCmsPromotion promotionInfo);
|
||||
}
|
||||
}
|
||||
85
CoreCms.Net.IServices/Promotion/ICoreCmsPromotionServices.cs
Normal file
85
CoreCms.Net.IServices/Promotion/ICoreCmsPromotionServices.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
/***********************************************************************
|
||||
* 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.Configuration;
|
||||
using CoreCms.Net.Model.Entities;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
using CoreCms.Net.Model.ViewModels.DTO;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 促销表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsPromotionServices : IBaseServices<CoreCmsPromotion>
|
||||
{
|
||||
/// <summary>
|
||||
/// 购物车的数据传过来,然后去算促销
|
||||
/// </summary>
|
||||
/// <param name="cart"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
Task<CartDto> ToPromotion(CartDto cart, int type = (int) GlobalEnumVars.PromotionType.Promotion);
|
||||
|
||||
/// <summary>
|
||||
/// 购物车的数据传过来,然后去算优惠券
|
||||
/// </summary>
|
||||
/// <param name="cart"></param>
|
||||
/// <param name="promotions"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ToCoupon(CartDto cart, List<CoreCmsPromotion> promotions);
|
||||
|
||||
/// <summary>
|
||||
/// 根据促销信息,去计算购物车的促销情况
|
||||
/// </summary>
|
||||
/// <param name="promotion"></param>
|
||||
/// <param name="cartModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> SetPromotion(CoreCmsPromotion promotion, CartDto cartModel);
|
||||
|
||||
/// <summary>
|
||||
/// 获取团购列表数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetGroupList(int type, int userId, int status, int pageIndex, int pageSize);
|
||||
|
||||
/// <summary>
|
||||
/// 获取团购/秒杀商品详情
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetGroupDetail(int goodId = 0, int userId = 0, string type = "group", int groupId = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 获取可领取的优惠券
|
||||
/// </summary>
|
||||
/// <param name="limit">数量</param>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsPromotion>> ReceiveCouponList(int limit = 3);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取可领取的优惠券(分页)
|
||||
/// </summary>
|
||||
/// <param name="page">页码</param>
|
||||
/// <param name="limit">数量</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsPromotion>> GetReceiveCouponList(int page = 1, int limit = 10);
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定id 的优惠券是否可以领取
|
||||
/// </summary>
|
||||
/// <param name="promotionId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ReceiveCoupon(int promotionId);
|
||||
}
|
||||
}
|
||||
39
CoreCms.Net.IServices/Service/ICoreCmsServicesServices.cs
Normal file
39
CoreCms.Net.IServices/Service/ICoreCmsServicesServices.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 ICoreCmsServicesServices : IBaseServices<CoreCmsServices>
|
||||
{
|
||||
/// <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<CoreCmsServices>> TagQueryPageAsync(
|
||||
Expression<Func<CoreCmsServices, bool>> predicate,
|
||||
Expression<Func<CoreCmsServices, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 服务购买表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsUserServicesOrderServices : IBaseServices<CoreCmsUserServicesOrder>
|
||||
{
|
||||
/// <summary>
|
||||
/// 完成服务订单后生成兑换券
|
||||
/// </summary>
|
||||
/// <param name="serviceOrderId"></param>
|
||||
/// <param name="paymentId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> CreateUserServicesTickets(string serviceOrderId, string paymentId);
|
||||
}
|
||||
}
|
||||
@@ -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 ICoreCmsUserServicesTicketServices : IBaseServices<CoreCmsUserServicesTicket>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 服务券核验日志 服务工厂接口
|
||||
/// </summary>
|
||||
public interface
|
||||
ICoreCmsUserServicesTicketVerificationLogServices : IBaseServices<CoreCmsUserServicesTicketVerificationLog>
|
||||
{
|
||||
/// <summary>
|
||||
/// 店铺核销的服务券列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetVerificationLogs(int userId, int page, int limit);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除服务券核销单(软删除)
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> LogDelete(int id, int userId = 0);
|
||||
}
|
||||
}
|
||||
75
CoreCms.Net.IServices/Share/ICoreCmsShareServices.cs
Normal file
75
CoreCms.Net.IServices/Share/ICoreCmsShareServices.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 分享通用接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsShareServices : IBaseServices<CoreCmsSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// 二维码分享
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="userShareCode"></param>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> QrShare(int client, int page, int userShareCode, string url, JObject parameter);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 页面分享
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="userShareCode"></param>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack UrlShare(int client, int page, int userShareCode, string url, JObject parameter);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 海报分享
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="userShareCode"></param>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="parameter"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> PosterShare(int client, int page, int userShareCode, string url, JObject parameter);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 小程序二维码,和业务没关系
|
||||
/// </summary>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetQrCode(string scene, string page = "pages/share/jump");
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// url参数解密
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack de_url(string code);
|
||||
}
|
||||
}
|
||||
128
CoreCms.Net.IServices/Shop/ICoreCmsAreaServices.cs
Normal file
128
CoreCms.Net.IServices/Shop/ICoreCmsAreaServices.cs
Normal file
@@ -0,0 +1,128 @@
|
||||
/***********************************************************************
|
||||
* 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;
|
||||
using CoreCms.Net.Model.ViewModels.DTO;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 地区表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsAreaServices : IBaseServices<CoreCmsArea>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取所有省市区信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<AreaTreeDto>> GetTreeArea(List<PostAreasTreeNode> checkedAreases, int parentId = 0,
|
||||
int currentChecked = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组装地区数据
|
||||
/// </summary>
|
||||
List<AreaTreeDto> resolve2(List<CoreCmsArea> allDatas, int parentId, List<PostAreasTreeNode> checkedAreases,
|
||||
int currentChecked = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取最终地区ID
|
||||
/// </summary>
|
||||
/// <param name="provinceName">省</param>
|
||||
/// <param name="cityName">市</param>
|
||||
/// <param name="countyName">县</param>
|
||||
/// <param name="postalCode">邮编</param>
|
||||
/// <returns></returns>
|
||||
Task<int> GetThreeAreaId(string provinceName, string cityName, string countyName, string postalCode);
|
||||
|
||||
/// <summary>
|
||||
/// 根据areaId获取三级区域名称
|
||||
/// </summary>
|
||||
/// <param name="areaId"></param>
|
||||
/// <param name="cacheAreas"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetAreaFullName(int areaId, List<CoreCmsArea> cacheAreas = null);
|
||||
|
||||
/// <summary>
|
||||
/// 根据id来返回省市区信息,如果没有查到,就返回省的列表
|
||||
/// </summary>
|
||||
List<CoreCmsArea> GetArea(List<CoreCmsArea> cacheAreas, int id = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取最终地区ID
|
||||
/// </summary>
|
||||
/// <param name="provinceName">省</param>
|
||||
/// <param name="cityName">市</param>
|
||||
/// <param name="countyName">县</param>
|
||||
/// <param name="postalCode">邮编</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetAreaId(string provinceName, string cityName, string countyName, string postalCode);
|
||||
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsArea entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsArea entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsArea> 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
|
||||
|
||||
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsArea>> GetCaChe();
|
||||
|
||||
/// <summary>
|
||||
/// 更新cache
|
||||
/// </summary>
|
||||
Task<List<CoreCmsArea>> UpdateCaChe();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
57
CoreCms.Net.IServices/Shop/ICoreCmsClerkServices.cs
Normal file
57
CoreCms.Net.IServices/Shop/ICoreCmsClerkServices.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsClerkServices : IBaseServices<CoreCmsClerk>
|
||||
{
|
||||
/// <summary>
|
||||
/// 判断是不是店员
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> IsClerk(int userId);
|
||||
|
||||
/// <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<StoreClerkDto>> QueryStoreClerkDtoPageAsync(Expression<Func<StoreClerkDto, bool>> predicate,
|
||||
Expression<Func<StoreClerkDto, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取单个门店用户数据
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<StoreClerkDto> QueryStoreClerkDtoByClauseAsync(Expression<Func<StoreClerkDto, bool>> predicate,
|
||||
bool blUseNoLock = false);
|
||||
}
|
||||
}
|
||||
45
CoreCms.Net.IServices/Shop/ICoreCmsLogisticsServices.cs
Normal file
45
CoreCms.Net.IServices/Shop/ICoreCmsLogisticsServices.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 物流公司表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsLogisticsServices : IBaseServices<CoreCmsLogistics>
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据物流编码取物流名称等信息
|
||||
/// </summary>
|
||||
/// <param name="logiCode">物流编码</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetLogiInfo(string logiCode);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 通过接口
|
||||
/// </summary>
|
||||
Task<AdminUiCallBack> DoUpdateCompany();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 通过接口获取快递信息
|
||||
/// </summary>
|
||||
/// <param name="com">来源</param>
|
||||
/// <param name="number">编号</param>
|
||||
/// <param name="phone">手机号码</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> ExpressPoll(string com, string number, string phone);
|
||||
}
|
||||
}
|
||||
53
CoreCms.Net.IServices/Shop/ICoreCmsNoticeServices.cs
Normal file
53
CoreCms.Net.IServices/Shop/ICoreCmsNoticeServices.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
/***********************************************************************
|
||||
* 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 SqlSugar;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 公告表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsNoticeServices : IBaseServices<CoreCmsNotice>
|
||||
{
|
||||
/// <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<CoreCmsNotice>> QueryPageAsync(Expression<Func<CoreCmsNotice, bool>> predicate,
|
||||
Expression<Func<CoreCmsNotice, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
|
||||
|
||||
/// <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<List<CoreCmsNotice>> QueryListAsync(Expression<Func<CoreCmsNotice, bool>> predicate,
|
||||
Expression<Func<CoreCmsNotice, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20);
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/Shop/ICoreCmsPagesItemsServices.cs
Normal file
21
CoreCms.Net.IServices/Shop/ICoreCmsPagesItemsServices.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 ICoreCmsPagesItemsServices : IBaseServices<CoreCmsPagesItems>
|
||||
{
|
||||
}
|
||||
}
|
||||
70
CoreCms.Net.IServices/Shop/ICoreCmsPagesServices.cs
Normal file
70
CoreCms.Net.IServices/Shop/ICoreCmsPagesServices.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
/***********************************************************************
|
||||
* 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.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 单页 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsPagesServices : IBaseServices<CoreCmsPages>
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsPages entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsPages entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DeleteByIdAsync(int id);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新设计
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> UpdateDesignAsync(FmPagesUpdate entity);
|
||||
|
||||
/// <summary>
|
||||
/// 获取首页数据
|
||||
/// </summary>
|
||||
/// <param name="code">查询编码</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetPageConfig(string code);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 复制生成一个新的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> CopyByIdAsync(int id);
|
||||
|
||||
}
|
||||
}
|
||||
102
CoreCms.Net.IServices/Shop/ICoreCmsServiceDescriptionServices.cs
Normal file
102
CoreCms.Net.IServices/Shop/ICoreCmsServiceDescriptionServices.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsServiceDescriptionServices : IBaseServices<CoreCmsServiceDescription>
|
||||
{
|
||||
#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<CoreCmsServiceDescription>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsServiceDescription, bool>> predicate,
|
||||
Expression<Func<CoreCmsServiceDescription, 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(CoreCmsServiceDescription entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsServiceDescription entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsServiceDescription> 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
|
||||
|
||||
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<CoreCmsServiceDescription>> GetCaChe();
|
||||
|
||||
/// <summary>
|
||||
/// 更新cache
|
||||
/// </summary>
|
||||
Task<List<CoreCmsServiceDescription>> UpdateCaChe();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
53
CoreCms.Net.IServices/Shop/ICoreCmsSettingServices.cs
Normal file
53
CoreCms.Net.IServices/Shop/ICoreCmsSettingServices.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
/***********************************************************************
|
||||
* 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.FromBody;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
using CoreCms.Net.Model.ViewModels.Options;
|
||||
using CoreCms.Net.Model.ViewModels.Sms;
|
||||
using CoreCms.Net.Model.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 店铺设置表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsSettingServices : IBaseServices<CoreCmsSetting>
|
||||
{
|
||||
/// <summary>
|
||||
/// 重写异步更新方法方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> UpdateAsync(FMCoreCmsSettingDoSaveModel entity);
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据库整合后配置信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<Dictionary<string, DictionaryKeyValues>> GetConfigDictionaries();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取附件存储的配置信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<FilesStorageOptions> GetFilesStorageOptions();
|
||||
|
||||
/// <summary>
|
||||
/// 获取短信配置实体
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<SMSOptions> GetSmsOptions();
|
||||
}
|
||||
}
|
||||
106
CoreCms.Net.IServices/Shop/ICoreCmsShipServices.cs
Normal file
106
CoreCms.Net.IServices/Shop/ICoreCmsShipServices.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsShipServices : IBaseServices<CoreCmsShip>
|
||||
{
|
||||
/// <summary>
|
||||
/// 设置是否默认
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="isDefault"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> SetIsDefault(int id, bool isDefault);
|
||||
|
||||
|
||||
#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<CoreCmsShip>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsShip, bool>> predicate,
|
||||
Expression<Func<CoreCmsShip, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取配送费用
|
||||
/// </summary>
|
||||
/// <param name="areaId">地区id</param>
|
||||
/// <param name="weight">重量,单位g</param>
|
||||
/// <param name="totalmoney">商品总价</param>
|
||||
/// <returns></returns>
|
||||
decimal GetShipCost(int areaId = 0, decimal weight = 0, decimal totalmoney = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 计算运费
|
||||
/// </summary>
|
||||
/// <param name="ship">配送方式内容</param>
|
||||
/// <param name="weight">订单总重</param>
|
||||
/// <param name="totalmoney">商品总价</param>
|
||||
/// <param name="firstunitAreaPrice"></param>
|
||||
/// <returns></returns>
|
||||
decimal calculate_fee(CoreCmsShip ship, decimal weight, decimal totalmoney = 0, decimal firstunitAreaPrice = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 根据地区获取配送方式
|
||||
/// </summary>
|
||||
CoreCmsShip GetShip(int areaId = 0);
|
||||
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsShip entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsShip entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DeleteByIdAsync(int id);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
67
CoreCms.Net.IServices/Shop/ICoreCmsStoreServices.cs
Normal file
67
CoreCms.Net.IServices/Shop/ICoreCmsStoreServices.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsStoreServices : IBaseServices<CoreCmsStore>
|
||||
{
|
||||
/// <summary>
|
||||
/// 事务重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(CoreCmsStore entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsStore entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sql根据条件查询分页数据带距离
|
||||
/// </summary>
|
||||
/// <param name="predicate">判断集合</param>
|
||||
/// <param name="orderByType">排序方式</param>
|
||||
/// <param name="pageIndex">当前页面索引</param>
|
||||
/// <param name="pageSize">分布大小</param>
|
||||
/// <param name="orderByExpression"></param>
|
||||
/// <param name="latitude">纬度</param>
|
||||
/// <param name="longitude">精度</param>
|
||||
/// <returns></returns>
|
||||
Task<IPageList<CoreCmsStore>> QueryPageAsyncByCoordinate(
|
||||
Expression<Func<CoreCmsStore, bool>> predicate,
|
||||
Expression<Func<CoreCmsStore, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, decimal latitude = 0, decimal longitude = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据用户序列获取单个门店数据
|
||||
/// </summary>
|
||||
/// <param name="userId">用户序列</param>
|
||||
/// <param name="blUseNoLock">是否使用WITH(NOLOCK)</param>
|
||||
/// <returns></returns>
|
||||
Task<CoreCmsStore> GetStoreByUserId(int userId, bool blUseNoLock = false);
|
||||
}
|
||||
}
|
||||
85
CoreCms.Net.IServices/Stock/ICoreCmsStockLogServices.cs
Normal file
85
CoreCms.Net.IServices/Stock/ICoreCmsStockLogServices.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsStockLogServices : IBaseServices<CoreCmsStockLog>
|
||||
{
|
||||
#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<CoreCmsStockLog>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsStockLog, bool>> predicate,
|
||||
Expression<Func<CoreCmsStockLog, 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(CoreCmsStockLog entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsStockLog entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsStockLog> 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
|
||||
}
|
||||
}
|
||||
86
CoreCms.Net.IServices/Stock/ICoreCmsStockServices.cs
Normal file
86
CoreCms.Net.IServices/Stock/ICoreCmsStockServices.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsStockServices : IBaseServices<CoreCmsStock>
|
||||
{
|
||||
#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<CoreCmsStock>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsStock, bool>> predicate,
|
||||
Expression<Func<CoreCmsStock, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> InsertAsync(FMCreateStock entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(CoreCmsStock entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<CoreCmsStock> 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/System/ISysDictionaryDataServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysDictionaryDataServices.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 ISysDictionaryDataServices : IBaseServices<SysDictionaryData>
|
||||
{
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/System/ISysDictionaryServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysDictionaryServices.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 ISysDictionaryServices : IBaseServices<SysDictionary>
|
||||
{
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/System/ISysLoginRecordServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysLoginRecordServices.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 ISysLoginRecordServices : IBaseServices<SysLoginRecord>
|
||||
{
|
||||
}
|
||||
}
|
||||
71
CoreCms.Net.IServices/System/ISysMenuServices.cs
Normal file
71
CoreCms.Net.IServices/System/ISysMenuServices.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
/***********************************************************************
|
||||
* 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 ISysMenuServices : IBaseServices<SysMenu>
|
||||
{
|
||||
#region 重写增删改查操作===========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步插入方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> InsertAsync(SysMenu entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(SysMenu entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写异步更新方法
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
new Task<AdminUiCallBack> UpdateAsync(List<SysMenu> entity);
|
||||
|
||||
/// <summary>
|
||||
/// 重写删除指定ID的数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<AdminUiCallBack> DeleteByIdAsync(int id);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取缓存的所有数据==========================================================
|
||||
|
||||
/// <summary>
|
||||
/// 获取缓存的所有数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<SysMenu>> GetCaChe();
|
||||
|
||||
/// <summary>
|
||||
/// 更新cache
|
||||
/// </summary>
|
||||
Task<List<SysMenu>> UpdateCaChe();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/System/ISysNLogRecordsServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysNLogRecordsServices.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>
|
||||
/// Nlog记录表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ISysNLogRecordsServices : IBaseServices<SysNLogRecords>
|
||||
{
|
||||
}
|
||||
}
|
||||
22
CoreCms.Net.IServices/System/ISysOperRecordServices.cs
Normal file
22
CoreCms.Net.IServices/System/ISysOperRecordServices.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
/***********************************************************************
|
||||
* 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 ISysOperRecordServices : IBaseServices<SysOperRecord>
|
||||
{
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/System/ISysOrganizationServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysOrganizationServices.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 ISysOrganizationServices : IBaseServices<SysOrganization>
|
||||
{
|
||||
}
|
||||
}
|
||||
24
CoreCms.Net.IServices/System/ISysRoleMenuServices.cs
Normal file
24
CoreCms.Net.IServices/System/ISysRoleMenuServices.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
/***********************************************************************
|
||||
* 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;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色菜单关联表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ISysRoleMenuServices : IBaseServices<SysRoleMenu>
|
||||
{
|
||||
Task<List<SysRoleMenu>> RoleModuleMaps();
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/System/ISysRoleServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysRoleServices.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 ISysRoleServices : IBaseServices<SysRole>
|
||||
{
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/System/ISysTaskLogServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysTaskLogServices.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 ISysTaskLogServices : IBaseServices<SysTaskLog>
|
||||
{
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/System/ISysUserRoleServices.cs
Normal file
21
CoreCms.Net.IServices/System/ISysUserRoleServices.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 ISysUserRoleServices : IBaseServices<SysUserRole>
|
||||
{
|
||||
}
|
||||
}
|
||||
23
CoreCms.Net.IServices/System/ISysUserServices.cs
Normal file
23
CoreCms.Net.IServices/System/ISysUserServices.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
/***********************************************************************
|
||||
* 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;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ISysUserServices : IBaseServices<SysUser>
|
||||
{
|
||||
Task<string> GetUserRoleNameStr(string loginName, string loginPwd);
|
||||
}
|
||||
}
|
||||
65
CoreCms.Net.IServices/User/ICoreCmsUserBalanceServices.cs
Normal file
65
CoreCms.Net.IServices/User/ICoreCmsUserBalanceServices.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
/***********************************************************************
|
||||
* 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 ICoreCmsUserBalanceServices : IBaseServices<CoreCmsUserBalance>
|
||||
{
|
||||
/// <summary>
|
||||
/// 余额变动记录
|
||||
/// </summary>
|
||||
/// <param name="userId">当前用户id,当是店铺的时候,取店铺创始人的userId</param>
|
||||
/// <param name="type">类型</param>
|
||||
/// <param name="money">金额,永远是正的</param>
|
||||
/// <param name="sourceId">资源id</param>
|
||||
/// <param name="cateMoney">服务费金额 (提现)</param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Change(int userId, int type, decimal money, string sourceId = "", decimal cateMoney = 0);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户的邀请佣金
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<decimal> GetInviteCommission(int userId);
|
||||
|
||||
|
||||
#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<CoreCmsUserBalance>> QueryPageAsync(
|
||||
Expression<Func<CoreCmsUserBalance, bool>> predicate,
|
||||
Expression<Func<CoreCmsUserBalance, object>> orderByExpression, OrderByType orderByType, int pageIndex = 1,
|
||||
int pageSize = 20, bool blUseNoLock = false);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
77
CoreCms.Net.IServices/User/ICoreCmsUserBankCardServices.cs
Normal file
77
CoreCms.Net.IServices/User/ICoreCmsUserBankCardServices.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 银行卡信息 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsUserBankCardServices : IBaseServices<CoreCmsUserBankCard>
|
||||
{
|
||||
/// <summary>
|
||||
/// 我的银行卡列表
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetMyBankcardsList(int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 我的银行卡列表
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> AddBankCards(CoreCmsUserBankCard entity);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除银行卡
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> Removebankcard(int id, int userId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户默认银行卡信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetDefaultBankCard(int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取银行卡组织信息
|
||||
/// </summary>
|
||||
/// <param name="cardCode"></param>
|
||||
/// <returns></returns>
|
||||
WebApiCallBack BankCardsOrganization(string cardCode);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置默认的银行卡
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> SetDefault(int userId, int id);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取银行卡信息
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> GetBankcardInfo(int userId, int id);
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/User/ICoreCmsUserGradeServices.cs
Normal file
21
CoreCms.Net.IServices/User/ICoreCmsUserGradeServices.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 ICoreCmsUserGradeServices : IBaseServices<CoreCmsUserGrade>
|
||||
{
|
||||
}
|
||||
}
|
||||
21
CoreCms.Net.IServices/User/ICoreCmsUserLogServices.cs
Normal file
21
CoreCms.Net.IServices/User/ICoreCmsUserLogServices.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 ICoreCmsUserLogServices : IBaseServices<CoreCmsUserLog>
|
||||
{
|
||||
}
|
||||
}
|
||||
55
CoreCms.Net.IServices/User/ICoreCmsUserPointLogServices.cs
Normal file
55
CoreCms.Net.IServices/User/ICoreCmsUserPointLogServices.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
/***********************************************************************
|
||||
* 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.ViewModels.UI;
|
||||
|
||||
namespace CoreCms.Net.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户积分记录表 服务工厂接口
|
||||
/// </summary>
|
||||
public interface ICoreCmsUserPointLogServices : IBaseServices<CoreCmsUserPointLog>
|
||||
{
|
||||
/// <summary>
|
||||
/// 积分消费日志设置
|
||||
/// </summary>
|
||||
/// <param name="userId">用户</param>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="remarks"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebApiCallBack> SetPoint(int userId, int num, int type, string remarks);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 订单完成送积分操作
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="money"></param>
|
||||
/// <param name="orderId"></param>
|
||||
Task OrderComplete(int userId, decimal money, string orderId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 判断今天是否签到
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
Task<WebApiCallBack> IsSign(int userId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户签到
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
Task<WebApiCallBack> Sign(int userId);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user