mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 17:23:26 +08:00
添加项目文件。
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user