diff --git a/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj b/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj
index 7e565cf64c13b7fc984fecce8d4814c5f59937d2..a9a3b2e9af931770ef9a938a4982d25df75cd82a 100644
--- a/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj
+++ b/CoreCms.Net.Auth/CoreCms.Net.Auth.csproj
@@ -5,9 +5,9 @@
-
+
-
+
diff --git a/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj b/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj
index c4c6ce0b1c6a856e8412944de0741077ffd7add8..7bf66bc6f11a8e01f2000834cc6df4e77b484289 100644
--- a/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj
+++ b/CoreCms.Net.Caching/CoreCms.Net.Caching.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj b/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj
index 4f3e832778a1cdc9ef769104fac784f1d3383747..b25e41ab7a4fa6136eb933a39005fb4da4b1c64f 100644
--- a/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj
+++ b/CoreCms.Net.CodeGenerator/CoreCms.Net.CodeGenerator.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl b/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl
index acc2635215ffd212a6e103156d862f7ed865df2f..36cd062956d8e60c05376cfb18a5a9506cd87d2b 100644
--- a/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl
+++ b/CoreCms.Net.CodeGenerator/CrudTemplete/Controllers/Controller.tpl
@@ -41,7 +41,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
[ApiController]
[RequiredErrorForAdmin]
[Authorize]
- public class {{ModelClassName}}Controller : Controller
+ public class {{ModelClassName}}Controller : ControllerBase
{
private readonly IWebHostEnvironment _webHostEnvironment;
private readonly I{{ModelClassName}}Services _{{ModelClassName}}Services;
@@ -65,7 +65,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("获取列表")]
- public async Task GetPageList()
+ public async Task GetPageList()
{
var jm = new AdminUiCallBack();
var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
@@ -149,7 +149,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
jm.code = 0;
jm.count = list.TotalCount;
jm.msg = "数据调用成功!";
- return Json(jm);
+ return jm;
}
#endregion
@@ -161,11 +161,11 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("首页数据")]
- public JsonResult GetIndex()
+ public AdminUiCallBack GetIndex()
{
//返回数据
var jm = new AdminUiCallBack { code = 0 };
- return Json(jm);
+ return jm;
}
#endregion
@@ -177,11 +177,11 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("创建数据")]
- public JsonResult GetCreate()
+ public AdminUiCallBack GetCreate()
{
//返回数据
var jm = new AdminUiCallBack { code = 0 };
- return Json(jm);
+ return jm;
}
#endregion
@@ -194,10 +194,10 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("创建提交")]
- public async Task DoCreate([FromBody]{{ModelClassName}} entity)
+ public async Task DoCreate([FromBody]{{ModelClassName}} entity)
{
var jm = await _{{ModelClassName}}Services.InsertAsync(entity);
- return Json(jm);
+ return jm;
}
#endregion
@@ -210,7 +210,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("编辑数据")]
- public async Task GetEdit([FromBody]FMIntId entity)
+ public async Task GetEdit([FromBody]FMIntId entity)
{
var jm = new AdminUiCallBack();
@@ -218,12 +218,12 @@ namespace CoreCms.Net.Web.Admin.Controllers
if (model == null)
{
jm.msg = "不存在此信息";
- return Json(jm);
+ return jm;
}
jm.code = 0;
jm.data = model;
- return Json(jm);
+ return jm;
}
#endregion
@@ -236,10 +236,10 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("编辑提交")]
- public async Task DoEdit([FromBody]{{ModelClassName}} entity)
+ public async Task DoEdit([FromBody]{{ModelClassName}} entity)
{
var jm = await _{{ModelClassName}}Services.UpdateAsync(entity);
- return Json(jm);
+ return jm;
}
#endregion
@@ -252,7 +252,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("单选删除")]
- public async Task DoDelete([FromBody]FMIntId entity)
+ public async Task DoDelete([FromBody]FMIntId entity)
{
var jm = new AdminUiCallBack();
@@ -260,11 +260,11 @@ namespace CoreCms.Net.Web.Admin.Controllers
if (!model)
{
jm.msg = GlobalConstVars.DataisNo;
- return Json(jm);
+ return jm;
}
jm = await _{{ModelClassName}}Services.DeleteByIdAsync(entity.id);
- return Json(jm);
+ return jm;
}
#endregion
@@ -277,10 +277,10 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("批量删除")]
- public async Task DoBatchDelete([FromBody]FMArrayIntIds entity)
+ public async Task DoBatchDelete([FromBody]FMArrayIntIds entity)
{
var jm = await _{{ModelClassName}}Services.DeleteByIdsAsync(entity.id);
- return Json(jm);
+ return jm;
}
#endregion
@@ -294,7 +294,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("预览数据")]
- public async Task GetDetails([FromBody]FMIntId entity)
+ public async Task GetDetails([FromBody]FMIntId entity)
{
var jm = new AdminUiCallBack();
@@ -302,12 +302,12 @@ namespace CoreCms.Net.Web.Admin.Controllers
if (model == null)
{
jm.msg = "不存在此信息";
- return Json(jm);
+ return jm;
}
jm.code = 0;
jm.data = model;
- return Json(jm);
+ return jm;
}
#endregion
@@ -320,7 +320,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("选择导出")]
- public async Task SelectExportExcel([FromBody]FMArrayIntIds entity)
+ public async Task SelectExportExcel([FromBody]FMArrayIntIds entity)
{
var jm = new AdminUiCallBack();
@@ -370,7 +370,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
jm.msg = GlobalConstVars.ExcelExportSuccess;
jm.data = tpath + fileName;
- return Json(jm);
+ return jm;
}
#endregion
@@ -382,7 +382,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("查询导出")]
- public async Task QueryExportExcel()
+ public async Task QueryExportExcel()
{
var jm = new AdminUiCallBack();
@@ -474,7 +474,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
jm.msg = GlobalConstVars.ExcelExportSuccess;
jm.data = tpath + fileName;
- return Json(jm);
+ return jm;
}
#endregion
@@ -488,7 +488,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
///
[HttpPost]
[Description("设置{{field.ColumnDescription}}")]
- public async Task DoSet{{field.DbColumnName}}([FromBody]FMUpdateBoolDataByIntId entity)
+ public async Task DoSet{{field.DbColumnName}}([FromBody]FMUpdateBoolDataByIntId entity)
{
var jm = new AdminUiCallBack();
@@ -496,7 +496,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
if (oldModel == null)
{
jm.msg = "不存在此信息";
- return Json(jm);
+ return jm;
}
oldModel.{{field.DbColumnName}} = (bool)entity.data;
@@ -504,7 +504,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
- return Json(jm);
+ return jm;
}
#endregion
{% endif %}{% endfor %}
diff --git a/CoreCms.Net.Configuration/GlobalEnumVars.cs b/CoreCms.Net.Configuration/GlobalEnumVars.cs
index 6e375ed68d523ca5e5fa71f7648fb6b12fec4200..05be22ef6e6e13c23f1c19af1a872f4cc5331bbe 100644
--- a/CoreCms.Net.Configuration/GlobalEnumVars.cs
+++ b/CoreCms.Net.Configuration/GlobalEnumVars.cs
@@ -560,22 +560,33 @@ namespace CoreCms.Net.Configuration
/// 团购
///
[Description("团购")]
- GROUP = 3,
+ Group = 3,
///
/// 秒杀
///
[Description("秒杀")]
- SKILL = 4,
+ Skill = 4,
///
/// 砍价
///
[Description("砍价")]
- BARGAIN = 6,
+ Bargain = 6,
///
/// 赠品
///
[Description("赠品")]
- GIVEAWAY = 7,
+ Giveaway = 7,
+ ///
+ /// 接龙
+ ///
+ [Description("接龙")]
+ Solitaire = 8,
+ ///
+ /// 微信交易组件
+ ///
+ [Description("微信交易组件")]
+ TransactionComponent = 10,
+
}
///
/// 发货单状态
diff --git a/CoreCms.Net.Core/CoreCms.Net.Core.csproj b/CoreCms.Net.Core/CoreCms.Net.Core.csproj
index 1831881e220572ce77c94d1fbd65675901579eb9..b405e9bc7be9907df23526bd6db0606f5072b544 100644
--- a/CoreCms.Net.Core/CoreCms.Net.Core.csproj
+++ b/CoreCms.Net.Core/CoreCms.Net.Core.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/CoreCms.Net.Filter/AdminsControllerPermission.cs b/CoreCms.Net.Filter/AdminsControllerPermission.cs
index c22458db31d6042e35ae9719173df2f40a7f6c45..34810d85f7637ee3fcb86b430d539d6bd7303918 100644
--- a/CoreCms.Net.Filter/AdminsControllerPermission.cs
+++ b/CoreCms.Net.Filter/AdminsControllerPermission.cs
@@ -37,7 +37,7 @@ namespace CoreCms.Net.Filter
var controllers = types.Where(p => p.Name.Contains("Controller") && !noController.Contains(p.Name));
foreach (var type in controllers)
{
- if (type.Name.Length > 10 && type.BaseType.Name == "Controller" && type.Name.EndsWith("Controller")) //如果是Controller
+ if (type.Name.Length > 10 && type.BaseType.Name == "ControllerBase" && type.Name.EndsWith("Controller")) //如果是Controller
{
var members = type.GetMethods();
var cp = new ControllerPermission
@@ -56,12 +56,18 @@ namespace CoreCms.Net.Filter
var newMembers = members.Where(p =>
- p.ReturnType.Name == "ActionResult" || p.ReturnType.Name == "FileResult" ||
- p.ReturnType.Name == "JsonResult" || (p.ReturnType.GenericTypeArguments.Length > 0 && p.ReturnType.GenericTypeArguments[0].Name == "JsonResult")).ToList();
+ p.ReturnType.FullName != null && (p.ReturnType.Name == "ActionResult" ||
+ p.ReturnType.Name == "FileResult" ||
+ p.ReturnType.Name == "JsonResult" ||
+ (p.ReturnType.GenericTypeArguments.Length > 0 && p.ReturnType.GenericTypeArguments[0].Name == "JsonResult") ||
+ p.ReturnType.Name == "AdminUiCallBack" ||
+ p.ReturnType.Name == "IActionResult" ||
+ p.ReturnType.FullName.Contains("CoreCms.Net.Model.ViewModels.UI.AdminUiCallBack"))
+ ).ToList();
foreach (var member in newMembers)
{
- if (member.Name == "ValidationProblem" || member.Name =="Json") continue;
+ if (member.Name == "ValidationProblem" || member.Name == "Json") continue;
//if (member.ReturnType.Name == "ActionResult" || member.ReturnType.Name == "FileResult" || member.ReturnType.Name == "JsonResult" || (member.ReturnType.GenericTypeArguments.Length > 0 && member.ReturnType.GenericTypeArguments[0].Name == "JsonResult")) //如果是Action
//{
diff --git a/CoreCms.Net.IRepository/Solitaire/ICoreCmsSolitaireItemsRepository.cs b/CoreCms.Net.IRepository/Solitaire/ICoreCmsSolitaireItemsRepository.cs
deleted file mode 100644
index 3932efd44523e92995b50ba6405fe51122992e97..0000000000000000000000000000000000000000
--- a/CoreCms.Net.IRepository/Solitaire/ICoreCmsSolitaireItemsRepository.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:18:18
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.ViewModels.Basics;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-
-namespace CoreCms.Net.IRepository
-{
- ///
- /// 接龙活动商品表 工厂接口
- ///
- public interface ICoreCmsSolitaireItemsRepository : IBaseRepository
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsSolitaireItems entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(CoreCmsSolitaireItems entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
- #endregion
-
-
- ///
- /// 重写根据条件查询列表数据
- ///
- /// 判断集合
- /// 排序方式
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryListByClauseAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType,
- bool blUseNoLock = false);
-
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
- }
-}
diff --git a/CoreCms.Net.IRepository/Solitaire/ICoreCmsSolitaireRepository.cs b/CoreCms.Net.IRepository/Solitaire/ICoreCmsSolitaireRepository.cs
deleted file mode 100644
index d8e4c32e68e022bc281a79ce1eb63acfaa931cca..0000000000000000000000000000000000000000
--- a/CoreCms.Net.IRepository/Solitaire/ICoreCmsSolitaireRepository.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:17:57
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.ViewModels.Basics;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-
-namespace CoreCms.Net.IRepository
-{
- ///
- /// 接龙活动表 工厂接口
- ///
- public interface ICoreCmsSolitaireRepository : IBaseRepository
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsSolitaire entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(CoreCmsSolitaire entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- new Task DeleteByIdAsync(object id);
-
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
- #endregion
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
- }
-}
diff --git a/CoreCms.Net.IServices/Cart/ICoreCmsCartServices.cs b/CoreCms.Net.IServices/Cart/ICoreCmsCartServices.cs
index efd8428fd56459683fe15339b88011ce23d073d4..419ba493525b187fbb2ddc0729c34531b1fe6e10 100644
--- a/CoreCms.Net.IServices/Cart/ICoreCmsCartServices.cs
+++ b/CoreCms.Net.IServices/Cart/ICoreCmsCartServices.cs
@@ -50,11 +50,9 @@ namespace CoreCms.Net.IServices
/// 数量
/// 数量类型/1是直接增加/2是赋值
/// 1普通购物/2拼团模式/3团购模式/4秒杀模式/6砍价模式/7赠品
- /// 团队序列
- /// 团购秒杀规则序列
+ /// 关联对象类型
///
- Task Add(int userId, int productId, int nums, int numType, int cartTypes = 1, int teamId = 0,
- int groupId = 0);
+ Task Add(int userId, int productId, int nums, int numType, int cartTypes = 1, int objectId = 0);
///
@@ -73,8 +71,10 @@ namespace CoreCms.Net.IServices
/// 用户序号
/// 已选择货号
/// 购物车类型/同订单类型
+ /// 关联非订单类型数据序列
///
- Task GetCartDtoData(int userId, int[] ids = null, int type = 1);
+ Task GetCartDtoData(int userId, int[] ids = null, int type = 1, int objectId = 0);
+
///
@@ -88,11 +88,11 @@ namespace CoreCms.Net.IServices
/// 优惠券码
/// 是否免运费
/// 关联上面的是否免运费/1=快递配送(要去算运费)生成订单记录快递方式,2=同城配送/3=门店自提(不需要计算运费)生成订单记录门店自提信息
- /// 传团购或秒杀序列
+ /// 关联非普通订单营销类型序列
///
Task GetCartInfos(int userId, int[] ids, int orderType, int areaId, int point,
string couponCode, bool freeFreight = false,
- int deliveryType = (int) GlobalEnumVars.OrderReceiptType.Logistics, int groupId = 0);
+ int deliveryType = (int)GlobalEnumVars.OrderReceiptType.Logistics, int objectId = 0);
///
diff --git a/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs b/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
index 980f1a8deabd8b2cfd9a789d7bc2ccdb1868458e..756471df328f4cf0244e5ba58e9e6dca207597d6 100644
--- a/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
+++ b/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
@@ -60,15 +60,16 @@ namespace CoreCms.Net.IServices
/// 积分
/// 优惠券码
/// 来源平台
+ /// 场景值(一般小程序才有)
/// 发票信息
/// 发票抬头
/// 发票税务编码
- /// 团队序列
- /// 团购秒杀序列
+ /// 关联非普通订单营销功能的序列
+ /// 拼团订单分组序列
///
Task 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 taxType, string taxName, string taxCode, int teamId, int groupId);
+ int source, int scene, int taxType, string taxName, string taxCode, int objectId, int teamId);
///
/// 获取订单信息
diff --git a/CoreCms.Net.IServices/Solitaire/ICoreCmsSolitaireItemsServices.cs b/CoreCms.Net.IServices/Solitaire/ICoreCmsSolitaireItemsServices.cs
deleted file mode 100644
index bfb8d1d3435778717f31d4ef9fb716abf65d7db6..0000000000000000000000000000000000000000
--- a/CoreCms.Net.IServices/Solitaire/ICoreCmsSolitaireItemsServices.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:18:18
- * 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
-{
- ///
- /// 接龙活动商品表 服务工厂接口
- ///
- public interface ICoreCmsSolitaireItemsServices : IBaseServices
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsSolitaireItems entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(CoreCmsSolitaireItems entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- new Task DeleteByIdAsync(object id);
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
- #endregion
-
- ///
- /// 重写根据条件查询列表数据
- ///
- /// 判断集合
- /// 排序方式
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryListByClauseAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType,
- bool blUseNoLock = false);
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
- #endregion
- }
-}
diff --git a/CoreCms.Net.IServices/Solitaire/ICoreCmsSolitaireServices.cs b/CoreCms.Net.IServices/Solitaire/ICoreCmsSolitaireServices.cs
deleted file mode 100644
index e408ee3436d8bb01c09402c2a4a321fbe3d7c6a1..0000000000000000000000000000000000000000
--- a/CoreCms.Net.IServices/Solitaire/ICoreCmsSolitaireServices.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:17:57
- * 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
-{
- ///
- /// 接龙活动表 服务工厂接口
- ///
- public interface ICoreCmsSolitaireServices : IBaseServices
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- new Task InsertAsync(CoreCmsSolitaire entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(CoreCmsSolitaire entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- new Task UpdateAsync(List entity);
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- new Task DeleteByIdAsync(object id);
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- new Task DeleteByIdsAsync(int[] ids);
-
- #endregion
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- new Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
- #endregion
- }
-}
diff --git a/CoreCms.Net.Model/CoreCms.Net.Model.csproj b/CoreCms.Net.Model/CoreCms.Net.Model.csproj
index 836c681bf356b86651f566ccb79b635a219cb1ad..a246a8220b8009e8d977243ef1b25f981b468477 100644
--- a/CoreCms.Net.Model/CoreCms.Net.Model.csproj
+++ b/CoreCms.Net.Model/CoreCms.Net.Model.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/CoreCms.Net.Model/Entities/Cart/CoreCmsCart.cs b/CoreCms.Net.Model/Entities/Cart/CoreCmsCart.cs
index 7e609e2c342ac48df425c5f6791017a9dad0559a..5a8f5662f8ba46a65d157f5b5fbfcd1e24d81eeb 100644
--- a/CoreCms.Net.Model/Entities/Cart/CoreCmsCart.cs
+++ b/CoreCms.Net.Model/Entities/Cart/CoreCmsCart.cs
@@ -60,5 +60,15 @@ namespace CoreCms.Net.Model.Entities
[SugarColumn(ColumnDescription = "购物车类型")]
[Required(ErrorMessage = "请输入{0}")]
public System.Int32 type { get; set; }
+
+
+
+ ///
+ /// 关联对象序列
+ ///
+ [Display(Name = "关联对象序列")]
+ [Required(ErrorMessage = "请输入{0}")]
+ public int objectId { get; set; }
+
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.Model/Entities/Expression/PredicateBuilder.cs b/CoreCms.Net.Model/Entities/Expression/PredicateBuilder.cs
index 0af59b1ac85898d73ea1dc0b2871ae344faa6d54..7961e1acfe4c5a68b7ee715195edcefe0dc4751f 100644
--- a/CoreCms.Net.Model/Entities/Expression/PredicateBuilder.cs
+++ b/CoreCms.Net.Model/Entities/Expression/PredicateBuilder.cs
@@ -51,7 +51,7 @@ namespace CoreCms.Net.Model.Entities.Expression
public static Expression> And(this Expression> first,
Expression> second)
{
- return first.Compose(second, System.Linq.Expressions.Expression.And);
+ return first.Compose(second, System.Linq.Expressions.Expression.AndAlso);
}
public static Expression> Or(this Expression> first,
diff --git a/CoreCms.Net.Model/Entities/Order/CoreCmsOrder.cs b/CoreCms.Net.Model/Entities/Order/CoreCmsOrder.cs
index 0e598d556502a6f4825fffb5dde1f17fe4cddbb1..7f8f666927243166bf6b4d25fe8fb12ed09851f2 100644
--- a/CoreCms.Net.Model/Entities/Order/CoreCmsOrder.cs
+++ b/CoreCms.Net.Model/Entities/Order/CoreCmsOrder.cs
@@ -3,11 +3,13 @@
* ProjectName: 核心内容管理系统
* Web: https://www.corecms.net
* Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021-06-08 22:14:58
+ * Email: jianweie@163.com
+ * CreateTime: 2021/10/18 11:51:30
* Description: 暂无
-***********************************************************************/
+ ***********************************************************************/
+
using SqlSugar;
+using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace CoreCms.Net.Model.Entities
@@ -15,306 +17,507 @@ namespace CoreCms.Net.Model.Entities
///
/// 订单表
///
- [SugarTable("CoreCmsOrder",TableDescription = "订单表")]
public partial class CoreCmsOrder
{
///
- /// 订单表
+ /// 构造函数
///
public CoreCmsOrder()
{
}
-
+
///
/// 订单号
///
[Display(Name = "订单号")]
- [SugarColumn(ColumnDescription = "订单号", IsPrimaryKey = true)]
+
+ [SugarColumn(IsPrimaryKey = true)]
+
[Required(ErrorMessage = "请输入{0}")]
- [StringLength(20, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String orderId { get; set; }
+ [StringLength(maximumLength:20,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String orderId { get; set; }
+
+
///
/// 商品总价
///
[Display(Name = "商品总价")]
- [SugarColumn(ColumnDescription = "商品总价")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal goodsAmount { get; set; }
+
+
+
+ public System.Decimal goodsAmount { get; set; }
+
+
///
/// 已支付的金额
///
[Display(Name = "已支付的金额")]
- [SugarColumn(ColumnDescription = "已支付的金额")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal payedAmount { get; set; }
+
+
+
+ public System.Decimal payedAmount { get; set; }
+
+
///
/// 订单实际销售总额
///
[Display(Name = "订单实际销售总额")]
- [SugarColumn(ColumnDescription = "订单实际销售总额")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal orderAmount { get; set; }
+
+
+
+ public System.Decimal orderAmount { get; set; }
+
+
///
/// 支付状态
///
[Display(Name = "支付状态")]
- [SugarColumn(ColumnDescription = "支付状态")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 payStatus { get; set; }
+
+
+
+ public System.Int32 payStatus { get; set; }
+
+
///
/// 发货状态
///
[Display(Name = "发货状态")]
- [SugarColumn(ColumnDescription = "发货状态")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 shipStatus { get; set; }
+
+
+
+ public System.Int32 shipStatus { get; set; }
+
+
///
/// 订单状态
///
[Display(Name = "订单状态")]
- [SugarColumn(ColumnDescription = "订单状态")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 status { get; set; }
+
+
+
+ public System.Int32 status { get; set; }
+
+
///
/// 订单类型
///
[Display(Name = "订单类型")]
- [SugarColumn(ColumnDescription = "订单类型")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 orderType { get; set; }
+
+
+
+ public System.Int32 orderType { get; set; }
+
+
///
/// 收货方式
///
[Display(Name = "收货方式")]
- [SugarColumn(ColumnDescription = "收货方式")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 receiptType { get; set; }
+
+
+
+ public System.Int32 receiptType { get; set; }
+
+
///
/// 支付方式代码
///
[Display(Name = "支付方式代码")]
- [SugarColumn(ColumnDescription = "支付方式代码", IsNullable = true)]
- [StringLength(20, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String paymentCode { get; set; }
+
+
+ [StringLength(maximumLength:20,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String paymentCode { get; set; }
+
+
///
/// 支付时间
///
[Display(Name = "支付时间")]
- [SugarColumn(ColumnDescription = "支付时间", IsNullable = true)]
- public System.DateTime? paymentTime { get; set; }
+
+
+
+
+
+ public System.DateTime? paymentTime { get; set; }
+
+
///
/// 配送方式ID 关联ship.id
///
[Display(Name = "配送方式ID 关联ship.id")]
- [SugarColumn(ColumnDescription = "配送方式ID 关联ship.id")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 logisticsId { get; set; }
+
+
+
+ public System.Int32 logisticsId { get; set; }
+
+
///
/// 配送方式名称
///
[Display(Name = "配送方式名称")]
- [SugarColumn(ColumnDescription = "配送方式名称", IsNullable = true)]
- [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String logisticsName { get; set; }
+
+
+ [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String logisticsName { get; set; }
+
+
///
/// 配送费用
///
[Display(Name = "配送费用")]
- [SugarColumn(ColumnDescription = "配送费用")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal costFreight { get; set; }
+
+
+
+ public System.Decimal costFreight { get; set; }
+
+
///
/// 用户ID 关联user.id
///
[Display(Name = "用户ID 关联user.id")]
- [SugarColumn(ColumnDescription = "用户ID 关联user.id")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 userId { get; set; }
+
+
+
+ public System.Int32 userId { get; set; }
+
+
///
/// 店铺ID 关联seller.id
///
[Display(Name = "店铺ID 关联seller.id")]
- [SugarColumn(ColumnDescription = "店铺ID 关联seller.id")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 sellerId { get; set; }
+
+
+
+ public System.Int32 sellerId { get; set; }
+
+
///
/// 售后状态
///
[Display(Name = "售后状态")]
- [SugarColumn(ColumnDescription = "售后状态")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 confirmStatus { get; set; }
+
+
+
+ public System.Int32 confirmStatus { get; set; }
+
+
///
/// 确认收货时间
///
[Display(Name = "确认收货时间")]
- [SugarColumn(ColumnDescription = "确认收货时间", IsNullable = true)]
- public System.DateTime? confirmTime { get; set; }
+
+
+
+
+
+ public System.DateTime? confirmTime { get; set; }
+
+
///
/// 自提门店ID,0就是不门店自提
///
[Display(Name = "自提门店ID,0就是不门店自提")]
- [SugarColumn(ColumnDescription = "自提门店ID,0就是不门店自提")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 storeId { get; set; }
+
+
+
+ public System.Int32 storeId { get; set; }
+
+
///
/// 收货地区ID
///
[Display(Name = "收货地区ID")]
- [SugarColumn(ColumnDescription = "收货地区ID")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 shipAreaId { get; set; }
+
+
+
+ public System.Int32 shipAreaId { get; set; }
+
+
///
/// 收货详细地址
///
[Display(Name = "收货详细地址")]
- [SugarColumn(ColumnDescription = "收货详细地址", IsNullable = true)]
- [StringLength(200, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String shipAddress { get; set; }
+
+
+ [StringLength(maximumLength:200,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String shipAddress { get; set; }
+
+
///
/// 收货人姓名
///
[Display(Name = "收货人姓名")]
- [SugarColumn(ColumnDescription = "收货人姓名", IsNullable = true)]
- [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String shipName { get; set; }
+
+
+ [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String shipName { get; set; }
+
+
///
/// 收货电话
///
[Display(Name = "收货电话")]
- [SugarColumn(ColumnDescription = "收货电话", IsNullable = true)]
- [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String shipMobile { get; set; }
+
+
+ [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String shipMobile { get; set; }
+
+
///
/// 商品总重量
///
[Display(Name = "商品总重量")]
- [SugarColumn(ColumnDescription = "商品总重量")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal weight { get; set; }
+
+
+
+ public System.Decimal weight { get; set; }
+
+
///
/// 开发票
///
[Display(Name = "开发票")]
- [SugarColumn(ColumnDescription = "开发票")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 taxType { get; set; }
+
+
+
+ public System.Int32 taxType { get; set; }
+
+
///
/// 税号
///
[Display(Name = "税号")]
- [SugarColumn(ColumnDescription = "税号", IsNullable = true)]
- [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String taxCode { get; set; }
+
+
+ [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String taxCode { get; set; }
+
+
///
/// 发票抬头
///
[Display(Name = "发票抬头")]
- [SugarColumn(ColumnDescription = "发票抬头", IsNullable = true)]
- [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String taxTitle { get; set; }
+
+
+ [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String taxTitle { get; set; }
+
+
///
/// 使用积分
///
[Display(Name = "使用积分")]
- [SugarColumn(ColumnDescription = "使用积分")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 point { get; set; }
+
+
+
+ public System.Int32 point { get; set; }
+
+
///
/// 积分抵扣金额
///
[Display(Name = "积分抵扣金额")]
- [SugarColumn(ColumnDescription = "积分抵扣金额")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal pointMoney { get; set; }
+
+
+
+ public System.Decimal pointMoney { get; set; }
+
+
///
/// 订单优惠金额
///
[Display(Name = "订单优惠金额")]
- [SugarColumn(ColumnDescription = "订单优惠金额")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal orderDiscountAmount { get; set; }
+
+
+
+ public System.Decimal orderDiscountAmount { get; set; }
+
+
///
/// 商品优惠金额
///
[Display(Name = "商品优惠金额")]
- [SugarColumn(ColumnDescription = "商品优惠金额")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal goodsDiscountAmount { get; set; }
+
+
+
+ public System.Decimal goodsDiscountAmount { get; set; }
+
+
///
/// 优惠券优惠额度
///
[Display(Name = "优惠券优惠额度")]
- [SugarColumn(ColumnDescription = "优惠券优惠额度")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Decimal couponDiscountAmount { get; set; }
+
+
+
+ public System.Decimal couponDiscountAmount { get; set; }
+
///
/// 优惠券信息
///
[Display(Name = "优惠券信息")]
- [SugarColumn(ColumnDescription = "优惠券信息", IsNullable = true)]
- public System.String coupon { get; set; }
+
+ public System.String coupon { get; set; }
+
+
///
/// 优惠信息
///
[Display(Name = "优惠信息")]
- [SugarColumn(ColumnDescription = "优惠信息", IsNullable = true)]
- [StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String promotionList { get; set; }
+
+
+ [StringLength(maximumLength:255,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String promotionList { get; set; }
+
+
///
/// 买家备注
///
[Display(Name = "买家备注")]
- [SugarColumn(ColumnDescription = "买家备注", IsNullable = true)]
- [StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String memo { get; set; }
+
+
+ [StringLength(maximumLength:255,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String memo { get; set; }
+
+
///
/// 下单IP
///
[Display(Name = "下单IP")]
- [SugarColumn(ColumnDescription = "下单IP", IsNullable = true)]
- [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String ip { get; set; }
+
+
+ [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String ip { get; set; }
+
+
///
/// 卖家备注
///
[Display(Name = "卖家备注")]
- [SugarColumn(ColumnDescription = "卖家备注", IsNullable = true)]
- [StringLength(510, ErrorMessage = "【{0}】不能超过{1}字符长度")]
- public System.String mark { get; set; }
+
+
+ [StringLength(maximumLength:510,ErrorMessage = "{0}不能超过{1}字")]
+
+
+ public System.String mark { get; set; }
+
+
///
/// 订单来源
///
[Display(Name = "订单来源")]
- [SugarColumn(ColumnDescription = "订单来源")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Int32 source { get; set; }
+ public System.Int32 source { get; set; }
+
///
/// 是否评论
///
[Display(Name = "是否评论")]
- [SugarColumn(ColumnDescription = "是否评论")]
+
[Required(ErrorMessage = "请输入{0}")]
- public System.Boolean isComment { get; set; }
+
+
+
+ public System.Boolean isComment { get; set; }
+
+
///
/// 删除标志
///
[Display(Name = "删除标志")]
- [SugarColumn(ColumnDescription = "删除标志")]
[Required(ErrorMessage = "请输入{0}")]
- public System.Boolean isdel { get; set; }
+
+ public System.Boolean isdel { get; set; }
+
+ ///
+ /// 关联营销类型对象序列
+ ///
+ [Display(Name = "关联营销类型对象序列")]
+
+ [Required(ErrorMessage = "请输入{0}")]
+
+ public System.Int32 objectId { get; set; }
+
+
///
/// 创建时间
///
[Display(Name = "创建时间")]
- [SugarColumn(ColumnDescription = "创建时间")]
[Required(ErrorMessage = "请输入{0}")]
- public System.DateTime createTime { get; set; }
- ///
+ public System.DateTime createTime { get; set; }
+
+ ///
/// 更新时间
///
[Display(Name = "更新时间")]
- [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
- public System.DateTime? updateTime { get; set; }
+ public System.DateTime? updateTime { get; set; }
+
+
}
-}
\ No newline at end of file
+}
diff --git a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaire.cs b/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaire.cs
deleted file mode 100644
index beda78c5b18ec4d0acf62ce8b63d99aec2137d24..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaire.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/28 22:49:48
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.ComponentModel.DataAnnotations;
-using SqlSugar;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 接龙活动表
- ///
- public partial class CoreCmsSolitaire
- {
- ///
- /// 序列没
- ///
- [Display(Name = "序列")]
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
- [Required(ErrorMessage = "请输入{0}")]
- public int id { get; set; }
-
- ///
- /// 活动标题
- ///
- [Display(Name = "活动标题")]
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(250, ErrorMessage = "{0}不能超过{1}字")]
- public string title { get; set; }
-
- ///
- /// 缩略图
- ///
- [Display(Name = "缩略图")]
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(250, ErrorMessage = "{0}不能超过{1}字")]
- public string thumbnail { get; set; }
-
- ///
- /// 活动内容
- ///
- [Display(Name = "活动内容")]
- [Required(ErrorMessage = "请输入{0}")]
- public string contentBody { get; set; }
-
- ///
- /// 开始时间
- ///
- [Display(Name = "开始时间")]
- [Required(ErrorMessage = "请输入{0}")]
- public DateTime startTime { get; set; }
-
- ///
- /// 结束时间
- ///
- [Display(Name = "结束时间")]
- [Required(ErrorMessage = "请输入{0}")]
- public DateTime endTime { get; set; }
-
- ///
- /// 起购价格
- ///
- [Display(Name = "起购价格")]
- [Required(ErrorMessage = "请输入{0}")]
- public decimal startBuyPrice { get; set; }
-
- ///
- /// 起送价格
- ///
- [Display(Name = "起送价格")]
- [Required(ErrorMessage = "请输入{0}")]
- public decimal minDeliveryPrice { get; set; }
-
- ///
- /// 是否显示
- ///
- [Display(Name = "是否显示")]
- [Required(ErrorMessage = "请输入{0}")]
- public bool isShow { get; set; }
-
- ///
- /// 活动状态
- ///
- [Display(Name = "活动状态")]
- [Required(ErrorMessage = "请输入{0}")]
- public int status { get; set; }
-
- ///
- /// 标注删除
- ///
- [Display(Name = "标注删除")]
- [Required(ErrorMessage = "请输入{0}")]
- public bool isDelete { get; set; }
-
- ///
- /// 创建时间
- ///
- [Display(Name = "创建时间")]
- [Required(ErrorMessage = "请输入{0}")]
- public DateTime createTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaireItems.cs b/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaireItems.cs
deleted file mode 100644
index 3d7c4dbab77e8d4b153e3d1b39be26527d4e6a25..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaireItems.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/21 1:16:08
- * Description: 暂无
- ***********************************************************************/
-
-using System.ComponentModel.DataAnnotations;
-using SqlSugar;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 接龙活动商品表
- ///
- public partial class CoreCmsSolitaireItems
- {
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
- [Required(ErrorMessage = "请输入{0}")]
- public int id { get; set; }
-
- ///
- /// 接龙序列
- ///
- [Display(Name = "接龙序列")]
- [Required(ErrorMessage = "请输入{0}")]
- public int solitaireId { get; set; }
-
- ///
- /// 商品序列
- ///
- [Display(Name = "商品序列")]
- [Required(ErrorMessage = "请输入{0}")]
- public int goodId { get; set; }
-
- ///
- /// 货品价格
- ///
- [Display(Name = "货品价格")]
- [Required(ErrorMessage = "请输入{0}")]
- public int productId { get; set; }
-
- ///
- /// 接龙价
- ///
- [Display(Name = "接龙价")]
- [Required(ErrorMessage = "请输入{0}")]
- public decimal price { get; set; }
-
- ///
- /// 活动库存
- ///
- [Display(Name = "活动库存")]
- [Required(ErrorMessage = "请输入{0}")]
- public int activityStock { get; set; }
-
- ///
- /// 每人可买
- ///
- [Display(Name = "每人可买")]
- [Required(ErrorMessage = "请输入{0}")]
- public int oneCanBuy { get; set; }
-
- ///
- /// 排序
- ///
- [Display(Name = "排序")]
- [Required(ErrorMessage = "请输入{0}")]
- public int sortId { get; set; }
-
- ///
- /// 标注删除
- ///
- [Display(Name = "标注删除")]
- [Required(ErrorMessage = "请输入{0}")]
- public bool isDelete { get; set; }
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaireItemsPartial.cs b/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaireItemsPartial.cs
deleted file mode 100644
index 12af81e5430b4f8e69195d7e306dacebafc8c178..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitaireItemsPartial.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/21 1:16:08
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 接龙活动商品表
- ///
- public partial class CoreCmsSolitaireItems
- {
-
- ///
- /// 关联货品
- ///
- [Display(Name = "关联货品")]
- [SqlSugar.SugarColumn(IsIgnore = true)]
- public CoreCmsProducts productObj { get; set; }
-
- ///
- /// 关联商品
- ///
- [Display(Name = "关联商品")]
- [SqlSugar.SugarColumn(IsIgnore = true)]
- public CoreCmsGoods goodObj { get; set; }
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitairePartial.cs b/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitairePartial.cs
deleted file mode 100644
index 66f84c028f0326bda47a8d53e0bc8210300203de..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Model/Entities/Solitaire/CoreCmsSolitairePartial.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:17:57
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using SqlSugar;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 接龙活动表
- ///
- public partial class CoreCmsSolitaire
- {
- ///
- /// 货品明细
- ///
- [Display(Name = "货品明细")]
- [SqlSugar.SugarColumn(IsIgnore = true)]
- public List items { get; set; }
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.Model/FromBody/FMCart.cs b/CoreCms.Net.Model/FromBody/FMCart.cs
index 290bcbad946d097cc3e64a01f66a390bcfdc577b..d5373c5570cc894854dff1810549cd339c7d1db7 100644
--- a/CoreCms.Net.Model/FromBody/FMCart.cs
+++ b/CoreCms.Net.Model/FromBody/FMCart.cs
@@ -40,18 +40,10 @@ namespace CoreCms.Net.Model.FromBody
///
public int cartType { get; set; } = 1;
-
- ///
- /// 如果是拼团,是否带团队id
- ///
- public int teamId { get; set; } = 0;
-
///
- /// 如果是团购秒杀,是否带团购秒杀规则id
+ /// 非普通货品,关联对象序列
///
- public int groupId { get; set; } = 0;
-
-
+ public int objectId { get; set; } = 0;
}
///
@@ -96,9 +88,9 @@ namespace CoreCms.Net.Model.FromBody
///
- /// 如果是团购秒杀,是否带团购秒杀规则id
+ /// 关联非普通订单对象序列
///
- public int groupId { get; set; } = 0;
+ public int objectId { get; set; } = 0;
}
diff --git a/CoreCms.Net.Model/ViewModels/DTO/OrderDTO.cs b/CoreCms.Net.Model/ViewModels/DTO/OrderDTO.cs
index 795dd0dce40dd0fe623bc18c471fdbb6a9538e66..7c204ce55a9111406756f7b468aaf530e2952c68 100644
--- a/CoreCms.Net.Model/ViewModels/DTO/OrderDTO.cs
+++ b/CoreCms.Net.Model/ViewModels/DTO/OrderDTO.cs
@@ -124,14 +124,19 @@ namespace CoreCms.Net.Model.ViewModels.DTO
public string ladingMobile { get; set; }
///
- /// 团队序列
+ /// 非普通订单关联营销对象序列
+ ///
+ public int objectId { get; set; } = 0;
+
+ ///
+ /// 拼团订单分组序列
///
public int teamId { get; set; } = 0;
///
- /// 团购秒杀规则序列
+ /// 场景值
///
- public int groupId { get; set; } = 0;
+ public int scene { get; set; } = 0;
}
///
@@ -222,6 +227,11 @@ namespace CoreCms.Net.Model.ViewModels.DTO
///
public int status { get; set; } = 0;
+ ///
+ /// 收货类型
+ ///
+ public int receiptType { get; set; } = 0;
+
///
/// 门店序列
diff --git a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj
index 79a724215eb5a442d1f6f24ef6172471328eec27..cd08989daebdc4ca438ad25d3c8e632aeaa925fb 100644
--- a/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj
+++ b/CoreCms.Net.RedisMQ/CoreCms.Net.RedisMQ.csproj
@@ -5,10 +5,10 @@
-
+
-
+
diff --git a/CoreCms.Net.Repository/Bill/CoreCmsBillDeliveryRepository.cs b/CoreCms.Net.Repository/Bill/CoreCmsBillDeliveryRepository.cs
index eab19489344e74a78482c1fff69dd157a89561c5..21a31437f997c93963ef77ad07e49296c9883e14 100644
--- a/CoreCms.Net.Repository/Bill/CoreCmsBillDeliveryRepository.cs
+++ b/CoreCms.Net.Repository/Bill/CoreCmsBillDeliveryRepository.cs
@@ -41,30 +41,21 @@ namespace CoreCms.Net.Repository
///
public async Task> Statistics()
{
- var dt = DateTime.Now.AddDays(-8).ToString("yyyy-MM-dd 00:00:00");
+ var dt = DateTime.Now.AddDays(-8);
- var sqlStr = string.Empty;
- string dbTypeString = AppSettingsConstVars.DbDbType;
- if (dbTypeString == DbType.SqlServer.ToString())
- {
- sqlStr = @"SELECT count(1) AS nums,CONVERT(varchar(100),createTime, 23) AS day
- FROM CoreCmsBillDelivery
- WHERE createTime >= '" + dt + @"'
- GROUP BY CONVERT(varchar(100),createTime, 23)";
- }
- else if (dbTypeString == DbType.MySql.ToString())
- {
- sqlStr = @"SELECT count(1) AS nums,date(createTime) AS day
- FROM CoreCmsBillDelivery
- WHERE createTime >= '" + dt + @"'
- GROUP BY date(createTime)";
- }
+ var list = await DbClient.Queryable()
+ .Where(p => p.createTime >= dt)
+ .Select(it => new
+ {
+ it.deliveryId,
+ createTime = it.createTime.Date
+ })
+ .MergeTable()
+ .GroupBy(it => it.createTime)
+ .Select(it => new StatisticsOut { day = it.createTime.ToString("yyyy-MM-dd"), nums = SqlFunc.AggregateCount(it.deliveryId) })
+ .ToListAsync();
- if (string.IsNullOrEmpty(sqlStr))
- {
- return null;
- }
- return await DbClient.SqlQueryable(sqlStr).ToListAsync();
+ return list;
}
}
diff --git a/CoreCms.Net.Repository/Bill/CoreCmsBillPaymentsRepository.cs b/CoreCms.Net.Repository/Bill/CoreCmsBillPaymentsRepository.cs
index d2d20ca27e14ffcba5637f4b1910496865b5bd98..d69dc9238f91d25fdcf7416b558fe0f228590938 100644
--- a/CoreCms.Net.Repository/Bill/CoreCmsBillPaymentsRepository.cs
+++ b/CoreCms.Net.Repository/Bill/CoreCmsBillPaymentsRepository.cs
@@ -41,31 +41,20 @@ namespace CoreCms.Net.Repository
///
public async Task> Statistics()
{
- var dt = DateTime.Now.AddDays(-8).ToString("yyyy-MM-dd 00:00:00");
+ var dt = DateTime.Now.AddDays(-8);
- var sqlStr = string.Empty;
- string dbTypeString = AppSettingsConstVars.DbDbType;
- if (dbTypeString == DbType.SqlServer.ToString())
- {
- sqlStr = @"SELECT count(1) AS nums,CONVERT(varchar(100),createTime, 23) AS day
- FROM CoreCmsBillPayments
- WHERE createTime >= '" + dt + @"' AND status = " + (int)GlobalEnumVars.BillPaymentsStatus.Payed + @" AND type=" + (int)GlobalEnumVars.BillPaymentsType.Order + @"
- GROUP BY CONVERT(varchar(100),createTime, 23)";
- }
- else if (dbTypeString == DbType.MySql.ToString())
- {
- sqlStr = @"SELECT count(1) AS nums,date(createTime) AS day
- FROM CoreCmsBillPayments
- WHERE createTime >= '" + dt + @"' AND status = " + (int)GlobalEnumVars.BillPaymentsStatus.Payed + @" AND type=" + (int)GlobalEnumVars.BillPaymentsType.Order + @"
- GROUP BY date(createTime)";
- }
+ var list = await DbClient.Queryable()
+ .Where(p => p.createTime >= dt && p.status == (int)GlobalEnumVars.BillPaymentsStatus.Payed && p.type == (int)GlobalEnumVars.BillPaymentsType.Order)
+ .Select(it => new
+ {
+ it.paymentId,
+ createTime = it.createTime.Date
+ })
+ .MergeTable()
+ .GroupBy(it => it.createTime)
+ .Select(it => new StatisticsOut { day = it.createTime.ToString("yyyy-MM-dd"), nums = SqlFunc.AggregateCount(it.paymentId) })
+ .ToListAsync();
- if (string.IsNullOrEmpty(sqlStr))
- {
- return null;
- }
-
- var list = await DbClient.SqlQueryable(sqlStr).ToListAsync();
return list;
}
diff --git a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj
index 7236792977677ab298f2e4d8b20ecbd0350064d4..ae24f2b2a4611b5f6fc8b5e3dbb1f7fe844162e7 100644
--- a/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj
+++ b/CoreCms.Net.Repository/CoreCms.Net.Repository.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/CoreCms.Net.Repository/Financial/CoreCmsReportsRepository.cs b/CoreCms.Net.Repository/Financial/CoreCmsReportsRepository.cs
index 871fa3bdfd628954518499958103131fe61a1bcc..7f5f1b8e45339aa87ce29250c2696cb3cc22a148 100644
--- a/CoreCms.Net.Repository/Financial/CoreCmsReportsRepository.cs
+++ b/CoreCms.Net.Repository/Financial/CoreCmsReportsRepository.cs
@@ -8,6 +8,7 @@
* Description: 暂无
***********************************************************************/
+using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using CoreCms.Net.Configuration;
@@ -44,38 +45,45 @@ namespace CoreCms.Net.Repository
///
public async Task> GetGoodsSalesVolumes(string start, string end, string filter, string filterSed, string thesort, int pageIndex = 1, int pageSize = 5000)
{
- var sqlStr = string.Empty;
- string dbTypeString = AppSettingsConstVars.DbDbType;
- if (dbTypeString == DbType.SqlServer.ToString())
- {
- sqlStr = @"select top 1000 sum(oi.nums) as nums,sum(oi.amount) as amount,oi.sn,oi.name,oi.imageUrl,oi.addon
- from CoreCmsOrderItem oi
- left join CoreCmsOrder o on oi.orderId = o.orderId
- where o.payStatus <> 1
- and o.paymentTime > '" + start + @"' and o.paymentTime <= '" + end + @"'
- group by oi.sn,oi.name,oi.imageUrl,oi.addon
- order by sum(oi." + filter + @") " + thesort + @",sum(oi." + filterSed + @") " + thesort + @"";
- }
- else if (dbTypeString == DbType.MySql.ToString())
- {
- sqlStr = @"select sum(oi.nums) as nums,sum(oi.amount) as amount,oi.sn,oi.name,oi.imageUrl,oi.addon
- from CoreCmsOrderItem oi
- left join CoreCmsOrder o on oi.orderId = o.orderId
- where o.payStatus <> 1
- and o.paymentTime > '" + start + @"' and o.paymentTime <= '" + end + @"'
- group by oi.sn,oi.name,oi.imageUrl,oi.addon
- order by sum(oi." + filter + @") " + thesort + @",sum(oi." + filterSed + @") " + thesort + @" LIMIT 1000";
- }
+ RefAsync totalCount = 0;
- if (string.IsNullOrEmpty(sqlStr))
+ var startDt = DateTime.Parse(start);
+ var endDt = DateTime.Parse(end);
+
+ var orderBy = thesort switch
{
- return null;
- }
+ "asc" => OrderByType.Asc,
+ "desc" => OrderByType.Desc,
+ _ => OrderByType.Desc
+ };
+ var data = await DbClient.Queryable()
+ .LeftJoin((oi, o) => oi.orderId == o.orderId)
+ .Where((oi, o) => o.payStatus != 1 && o.paymentTime > startDt && o.paymentTime <= endDt)
+ .GroupBy((oi, o) => new
+ {
+ oi.sn,
+ oi.name,
+ oi.imageUrl,
+ oi.addon
+ })
+ .Select((oi, o) => new GoodsSalesVolume()
+ {
+ nums = SqlFunc.AggregateSum(oi.nums),
+ amount = SqlFunc.AggregateSum(oi.amount),
+ sn = oi.sn,
+ name = oi.name,
+ imageUrl = oi.imageUrl,
+ addon = oi.addon
+ })
+ .MergeTable()
+ .OrderByIF(filter == "nums", p => p.nums, orderBy)
+ .OrderByIF(filter == "amount", p => p.amount, orderBy)
+ .OrderByIF(filterSed == "nums", p => p.nums, orderBy)
+ .OrderByIF(filterSed == "amount", p => p.amount, orderBy)
+ .ToPageListAsync(pageIndex, pageSize, totalCount);
- RefAsync totalCount = 0;
- var page = await DbClient.SqlQueryable(sqlStr).ToPageListAsync(pageIndex, pageSize, totalCount);
- var list = new PageList(page, pageIndex, pageSize, totalCount);
+ var list = new PageList(data, pageIndex, pageSize, totalCount);
return list;
}
@@ -90,36 +98,34 @@ namespace CoreCms.Net.Repository
///
public async Task> GetGoodsCollections(string start, string end, string thesort, int pageIndex = 1, int pageSize = 5000)
{
+ RefAsync totalCount = 0;
- var sqlStr = string.Empty;
- string dbTypeString = AppSettingsConstVars.DbDbType;
- if (dbTypeString == DbType.SqlServer.ToString())
- {
- sqlStr = @"select top 1000 count(gc.goodsId) as nums,gc.goodsId,gc.goodsName,g.images
- from CoreCmsGoodsCollection gc
- left join CoreCmsGoods g on gc.goodsId = g.id
- where gc.createTime > '" + start + @"' and gc.createTime <= '" + end + @"'
- group by gc.goodsId,gc.goodsName,g.images
- order by sum(gc.goodsId) " + thesort + @"";
- }
- else if (dbTypeString == DbType.MySql.ToString())
- {
- sqlStr = @"select count(gc.goodsId) as nums,gc.goodsId,gc.goodsName,g.images
- from CoreCmsGoodsCollection gc
- left join CoreCmsGoods g on gc.goodsId = g.id
- where gc.createTime > '" + start + @"' and gc.createTime <= '" + end + @"'
- group by gc.goodsId,gc.goodsName,g.images
- order by sum(gc.goodsId) " + thesort + @" LIMIT 1000";
- }
+ var startDt = DateTime.Parse(start);
+ var endDt = DateTime.Parse(end);
- if (string.IsNullOrEmpty(sqlStr))
+ var orderBy = thesort switch
{
- return null;
- }
+ "asc" => OrderByType.Asc,
+ "desc" => OrderByType.Desc,
+ _ => OrderByType.Desc
+ };
- RefAsync totalCount = 0;
- var page = await DbClient.SqlQueryable(sqlStr).ToPageListAsync(pageIndex, pageSize, totalCount);
- var list = new PageList(page, pageIndex, pageSize, totalCount);
+ var data = await DbClient.Queryable()
+ .LeftJoin((gc, g) => gc.goodsId == g.id)
+ .Where((gc, g) => gc.createTime > startDt && gc.createTime <= endDt)
+ .GroupBy((gc, g) => new { gc.goodsId, gc.goodsName, g.images })
+ .Select((gc, g) => new GoodsCollection()
+ {
+ nums = SqlFunc.AggregateCount(gc.goodsId),
+ goodsName = gc.goodsName,
+ goodId = gc.goodsId,
+ images = g.images
+ })
+ .MergeTable()
+ .OrderBy(gc => gc.nums, orderBy)
+ .ToPageListAsync(pageIndex, pageSize, totalCount);
+
+ var list = new PageList(data, pageIndex, pageSize, totalCount);
return list;
}
diff --git a/CoreCms.Net.Repository/Shop/CoreCmsStoreRepository.cs b/CoreCms.Net.Repository/Shop/CoreCmsStoreRepository.cs
index 6032a0e6bcedb130d3050eb90082a6c281d0dd37..febaa6c7de6059103203f362813332ded40c47cf 100644
--- a/CoreCms.Net.Repository/Shop/CoreCmsStoreRepository.cs
+++ b/CoreCms.Net.Repository/Shop/CoreCmsStoreRepository.cs
@@ -146,38 +146,57 @@ namespace CoreCms.Net.Repository
RefAsync totalCount = 0;
//MySql与SqlServer查询语句相同
- var sql = string.Empty;
+ List page;
if (latitude > 0 && longitude > 0)
{
var sqrt = "SQRT(power(SIN((" + latitude + "*PI()/180-(CoreCmsStore.latitude)*PI()/180)/2),2)+COS(" + latitude + "*PI()/180)*COS((CoreCmsStore.latitude)*PI()/180)*power(SIN((" + longitude + "*PI()/180-(CoreCmsStore.longitude)*PI()/180)/2),2))";
- sql = "SELECT id, storeName, mobile, linkMan, logoImage, areaId, address, coordinate, latitude, longitude, isDefault, createTime, updateTime, ROUND(6378.138*2*ASIN(" + sqrt + ")*1000,2) AS distance FROM CoreCmsStore";
+ var sql = "SELECT id, storeName, mobile, linkMan, logoImage, areaId, address, coordinate, latitude, longitude, isDefault, createTime, updateTime, ROUND(6378.138*2*ASIN(" + sqrt + ")*1000,2) AS distance FROM CoreCmsStore";
+
+ page = await DbClient.SqlQueryable(sql)
+ .WhereIF(predicate != null, predicate)
+ .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
+ .Select(p => new CoreCmsStore
+ {
+ id = p.id,
+ storeName = p.storeName,
+ mobile = p.mobile,
+ linkMan = p.linkMan,
+ logoImage = p.logoImage,
+ areaId = p.areaId,
+ address = p.address,
+ coordinate = p.coordinate,
+ latitude = p.latitude,
+ longitude = p.longitude,
+ isDefault = p.isDefault,
+ createTime = p.createTime,
+ updateTime = p.updateTime,
+ distance = Convert.ToDecimal(p.distance)
+ }).ToPageListAsync(pageIndex, pageSize, totalCount);
}
else
{
- sql = "SELECT id, storeName, mobile, linkMan, logoImage, areaId, address, coordinate, latitude, longitude, isDefault, createTime, updateTime, distance FROM CoreCmsStore";
+ page = await DbClient.Queryable()
+ .WhereIF(predicate != null, predicate)
+ .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
+ .Select(p => new CoreCmsStore
+ {
+ id = p.id,
+ storeName = p.storeName,
+ mobile = p.mobile,
+ linkMan = p.linkMan,
+ logoImage = p.logoImage,
+ areaId = p.areaId,
+ address = p.address,
+ coordinate = p.coordinate,
+ latitude = p.latitude,
+ longitude = p.longitude,
+ isDefault = p.isDefault,
+ createTime = p.createTime,
+ updateTime = p.updateTime,
+ distance = Convert.ToDecimal(p.distance)
+ }).ToPageListAsync(pageIndex, pageSize, totalCount);
}
- var page = await DbClient.SqlQueryable(sql)
- .WhereIF(predicate != null, predicate)
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .Select(p => new CoreCmsStore
- {
- id = p.id,
- storeName = p.storeName,
- mobile = p.mobile,
- linkMan = p.linkMan,
- logoImage = p.logoImage,
- areaId = p.areaId,
- address = p.address,
- coordinate = p.coordinate,
- latitude = p.latitude,
- longitude = p.longitude,
- isDefault = p.isDefault,
- createTime = p.createTime,
- updateTime = p.updateTime,
- distance = Convert.ToDecimal(p.distance)
- }).ToPageListAsync(pageIndex, pageSize, totalCount);
-
var list = new PageList(page, pageIndex, pageSize, totalCount);
return list;
}
diff --git a/CoreCms.Net.Repository/Solitaire/CoreCmsSolitaireItemsRepository.cs b/CoreCms.Net.Repository/Solitaire/CoreCmsSolitaireItemsRepository.cs
deleted file mode 100644
index 700ee45a32e1409ab72341e5306d8d607ad0588b..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Repository/Solitaire/CoreCmsSolitaireItemsRepository.cs
+++ /dev/null
@@ -1,262 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/19 23:42:28
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.Manual;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.Basics;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 接龙活动商品表 接口实现
- ///
- public class CoreCmsSolitaireItemsRepository : BaseRepository, ICoreCmsSolitaireItemsRepository
- {
- public CoreCmsSolitaireItemsRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public new async Task InsertAsync(CoreCmsSolitaireItems entity)
- {
- var jm = new AdminUiCallBack();
-
- var bl = await DbClient.Insertable(entity).ExecuteReturnIdentityAsync() > 0;
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
-
- return jm;
- }
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public new async Task UpdateAsync(CoreCmsSolitaireItems entity)
- {
- var jm = new AdminUiCallBack();
-
- var oldModel = await DbClient.Queryable().In(entity.id).SingleAsync();
- if (oldModel == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
- //事物处理过程开始
- oldModel.id = entity.id;
- oldModel.solitaireId = entity.solitaireId;
- oldModel.goodId = entity.goodId;
- oldModel.productId = entity.productId;
- oldModel.price = entity.price;
- oldModel.activityStock = entity.activityStock;
- oldModel.oneCanBuy = entity.oneCanBuy;
- oldModel.isDelete = entity.isDelete;
-
- //事物处理过程结束
- var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
-
- return jm;
- }
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public new async Task UpdateAsync(List entity)
- {
- var jm = new AdminUiCallBack();
-
- var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
-
- return jm;
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public new async Task DeleteByIdAsync(object id)
- {
- var jm = new AdminUiCallBack();
-
- var bl = await DbClient.Deleteable(id).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
-
- return jm;
- }
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- public new async Task DeleteByIdsAsync(int[] ids)
- {
- var jm = new AdminUiCallBack();
-
- var bl = await DbClient.Deleteable().In(ids).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
-
- return jm;
- }
-
- #endregion
-
- #region 重写根据条件查询列表数据
- ///
- /// 重写根据条件查询列表数据
- ///
- /// 判断集合
- /// 排序方式
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public new async Task> QueryListByClauseAsync(Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, bool blUseNoLock = false)
- {
- List list;
- if (blUseNoLock)
- {
- list = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new CoreCmsSolitaireItems
- {
- id = p.id,
- solitaireId = p.solitaireId,
- goodId = p.goodId,
- productId = p.productId,
- price = p.price,
- activityStock = p.activityStock,
- oneCanBuy = p.oneCanBuy,
- sortId = p.sortId,
- isDelete = p.isDelete,
- })
- .With(SqlWith.NoLock)
- .MergeTable()
- .Mapper(it => it.productObj, it => it.productId)
- .Mapper(it => it.goodObj, it => it.goodId)
- .ToListAsync();
- }
- else
- {
- list = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new CoreCmsSolitaireItems
- {
- id = p.id,
- solitaireId = p.solitaireId,
- goodId = p.goodId,
- productId = p.productId,
- price = p.price,
- activityStock = p.activityStock,
- oneCanBuy = p.oneCanBuy,
- sortId = p.sortId,
- isDelete = p.isDelete,
-
- })
- .Mapper(it => it.productObj, it => it.productId)
- .Mapper(it => it.goodObj, it => it.goodId)
- .ToListAsync();
- }
- return list;
- }
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public new async Task> QueryPageAsync(Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false)
- {
- RefAsync totalCount = 0;
- List page;
- if (blUseNoLock)
- {
- page = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new CoreCmsSolitaireItems
- {
- id = p.id,
- solitaireId = p.solitaireId,
- goodId = p.goodId,
- productId = p.productId,
- price = p.price,
- activityStock = p.activityStock,
- oneCanBuy = p.oneCanBuy,
- sortId = p.sortId,
- isDelete = p.isDelete,
-
- })
- .With(SqlWith.NoLock)
- .Mapper(it => it.productObj, it => it.productId)
- .ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- else
- {
- page = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new CoreCmsSolitaireItems
- {
- id = p.id,
- solitaireId = p.solitaireId,
- goodId = p.goodId,
- productId = p.productId,
- price = p.price,
- activityStock = p.activityStock,
- oneCanBuy = p.oneCanBuy,
- sortId = p.sortId,
- isDelete = p.isDelete,
-
- })
- .Mapper(it => it.productObj, it => it.productId)
- .ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- var list = new PageList(page, pageIndex, pageSize, totalCount);
- return list;
- }
-
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Repository/Solitaire/CoreCmsSolitaireRepository.cs b/CoreCms.Net.Repository/Solitaire/CoreCmsSolitaireRepository.cs
deleted file mode 100644
index 8bade941181f5b5af5caf748addd7042a4805170..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Repository/Solitaire/CoreCmsSolitaireRepository.cs
+++ /dev/null
@@ -1,334 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:17:57
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.Manual;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.Basics;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 接龙活动表 接口实现
- ///
- public class CoreCmsSolitaireRepository : BaseRepository, ICoreCmsSolitaireRepository
- {
- private readonly IUnitOfWork _unitOfWork;
-
- public CoreCmsSolitaireRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public new async Task InsertAsync(CoreCmsSolitaire entity)
- {
- var jm = new AdminUiCallBack();
-
- if (entity.status != (int)GlobalEnumVars.SolitaireStatus.Close && entity.status != (int)GlobalEnumVars.SolitaireStatus.Open)
- {
- jm.msg = "请设置活动状态";
- return jm;
- }
- if (entity.endTime < entity.startTime)
- {
- jm.msg = "活动开始时间不能大于结束时间";
- return jm;
- }
- if (entity.items == null || entity.items.Count <= 0)
- {
- jm.msg = "请设置商品sku";
- return jm;
- }
- var bl = false;
- try
- {
- _unitOfWork.BeginTran();
-
- entity.createTime = DateTime.Now;
-
- var id = await DbClient.Insertable(entity).ExecuteReturnIdentityAsync();
- if (id > 0)
- {
- entity.items.ForEach(p =>
- {
- p.solitaireId = id;
- });
- }
- await DbClient.Insertable(entity.items).ExecuteCommandAsync();
-
- _unitOfWork.CommitTran();
- bl = true;
- }
- catch (Exception e)
- {
- bl = false;
- _unitOfWork.RollbackTran();
- jm.msg = GlobalConstVars.DataHandleEx;
- jm.data = e;
- }
-
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
-
- return jm;
- }
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public new async Task UpdateAsync(CoreCmsSolitaire entity)
- {
- var jm = new AdminUiCallBack();
-
- if (entity.status != (int)GlobalEnumVars.SolitaireStatus.Close && entity.status != (int)GlobalEnumVars.SolitaireStatus.Open)
- {
- jm.msg = "请设置活动状态";
- return jm;
- }
- if (entity.endTime < entity.startTime)
- {
- jm.msg = "活动开始时间不能大于结束时间";
- return jm;
- }
- if (entity.items == null || entity.items.Count <= 0)
- {
- jm.msg = "请设置商品sku";
- return jm;
- }
-
- var oldModel = await DbClient.Queryable().In(entity.id).SingleAsync();
- if (oldModel == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
-
- var bl = false;
- try
- {
- _unitOfWork.BeginTran();
-
- //事物处理过程开始
- //oldModel.id = entity.id;
- oldModel.title = entity.title;
- oldModel.contentBody = entity.contentBody;
- oldModel.startTime = entity.startTime;
- oldModel.endTime = entity.endTime;
- oldModel.startBuyPrice = entity.startBuyPrice;
- oldModel.minDeliveryPrice = entity.minDeliveryPrice;
- oldModel.isShow = entity.isShow;
- oldModel.status = entity.status;
- oldModel.thumbnail = entity.thumbnail;
-
- //oldModel.isDelete = entity.isDelete;
- //oldModel.createTime = entity.createTime;
-
- await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
-
- //获取数据库存在的数据
- var oldList = await DbClient.Queryable().Where(p => p.solitaireId == oldModel.id && p.isDelete == false).ToListAsync();
- var oldProductIds = oldList.Select(p => p.productId).ToList();
-
- //获取提交的数据有货品序列
- var newProductIds = entity.items.Select(p => p.productId).ToList();
-
- //标记已经不存在新数据里面的货品数据为假删除状态
- await DbClient.Updateable(p => p.isDelete == true)
- .Where(p => !newProductIds.Contains(p.productId) && p.solitaireId == oldModel.id && p.isDelete == false)
- .ExecuteCommandAsync();
-
- //获取老数据并进行更新
- var oldItems = oldList.Where(p => newProductIds.Contains(p.productId)).ToList();
- if (oldItems.Any())
- {
- oldItems.ForEach(o =>
- {
- var newOne = entity.items.Find(p => p.productId == o.productId);
- o.price = newOne.price;
- o.activityStock = newOne.activityStock;
- o.oneCanBuy = newOne.oneCanBuy;
- o.sortId = newOne.sortId;
- });
- await DbClient.Updateable(oldItems).ExecuteCommandAsync();
- }
-
- //获取新数据并进行增加
- var newItems = entity.items.Where(p => !oldProductIds.Contains(p.productId)).ToList();
- if (newItems.Any())
- {
- var newList = new List();
- newItems.ForEach(p =>
- {
- newList.Add(new CoreCmsSolitaireItems()
- {
- solitaireId = oldModel.id,
- goodId = p.goodId,
- productId = p.productId,
- price = p.price,
- activityStock = p.activityStock,
- oneCanBuy = p.oneCanBuy,
- sortId = p.sortId,
- isDelete = false,
- });
- });
- await DbClient.Insertable(newList).ExecuteCommandAsync();
- }
- //事物处理过程结束
- _unitOfWork.CommitTran();
- bl = true;
-
- }
- catch (Exception e)
- {
- bl = false;
- _unitOfWork.RollbackTran();
- jm.msg = GlobalConstVars.DataHandleEx;
- jm.data = e;
- }
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
-
- return jm;
- }
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public new async Task UpdateAsync(List entity)
- {
- var jm = new AdminUiCallBack();
-
- var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
-
- return jm;
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public new async Task DeleteByIdAsync(object id)
- {
- var jm = new AdminUiCallBack();
-
- var bl = await DbClient.Deleteable(id).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
-
- return jm;
- }
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- public new async Task DeleteByIdsAsync(int[] ids)
- {
- var jm = new AdminUiCallBack();
-
- var bl = await DbClient.Deleteable().In(ids).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.DeleteSuccess : GlobalConstVars.DeleteFailure;
-
- return jm;
- }
-
- #endregion
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public new async Task> QueryPageAsync(Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false)
- {
- RefAsync totalCount = 0;
- List page;
- if (blUseNoLock)
- {
- page = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new CoreCmsSolitaire
- {
- id = p.id,
- title = p.title,
- //contentBody = p.contentBody,
- startTime = p.startTime,
- endTime = p.endTime,
- startBuyPrice = p.startBuyPrice,
- minDeliveryPrice = p.minDeliveryPrice,
- isShow = p.isShow,
- status = p.status,
- isDelete = p.isDelete,
- createTime = p.createTime,
-
- }).With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- else
- {
- page = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new CoreCmsSolitaire
- {
- id = p.id,
- title = p.title,
- //contentBody = p.contentBody,
- startTime = p.startTime,
- endTime = p.endTime,
- startBuyPrice = p.startBuyPrice,
- minDeliveryPrice = p.minDeliveryPrice,
- isShow = p.isShow,
- status = p.status,
- isDelete = p.isDelete,
- createTime = p.createTime,
-
- }).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- var list = new PageList(page, pageIndex, pageSize, totalCount);
- return list;
- }
-
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Repository/System/SysMenuRepository.cs b/CoreCms.Net.Repository/System/SysMenuRepository.cs
index 370dc7803add9abb3d2794bce4ea4e234dcb71a6..e4174b01aa5359d043b79bd62136a3277681ec7d 100644
--- a/CoreCms.Net.Repository/System/SysMenuRepository.cs
+++ b/CoreCms.Net.Repository/System/SysMenuRepository.cs
@@ -83,12 +83,12 @@ namespace CoreCms.Net.Repository
oldModel.iconColor = entity.iconColor;
oldModel.hide = entity.hide;
//oldModel.deleted = entity.deleted;
- //oldModel.createTime = entity.createTime;
+ //oldModel.createTime = oldModel.createTime;
oldModel.updateTime = DateTime.Now;
oldModel.identificationCode = entity.identificationCode;
//事物处理过程结束
- var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
+ var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
if (bl)
diff --git a/CoreCms.Net.Repository/User/CoreCmsUserRepository.cs b/CoreCms.Net.Repository/User/CoreCmsUserRepository.cs
index 295704d5a8d6ec3c8195215568f361db640d03c1..0fc8bb9f5bdb607b9c226d0ffd9790c95ea831be 100644
--- a/CoreCms.Net.Repository/User/CoreCmsUserRepository.cs
+++ b/CoreCms.Net.Repository/User/CoreCmsUserRepository.cs
@@ -150,30 +150,19 @@ namespace CoreCms.Net.Repository
///
public async Task> Statistics(int day)
{
- var dt = DateTime.Now.AddDays(-day).ToString("yyyy-MM-dd");
-
- var sqlStr = string.Empty;
- string dbTypeString = AppSettingsConstVars.DbDbType;
- if (dbTypeString == DbType.SqlServer.ToString())
- {
- sqlStr = @"SELECT count(1) AS nums,CONVERT(varchar(100),createTime, 23) AS day
- FROM CoreCmsUser
- WHERE createTime > '" + dt + @"'
- GROUP BY CONVERT(varchar(100),createTime, 23)";
- }
- else if (dbTypeString == DbType.MySql.ToString())
- {
- sqlStr = @"SELECT count(1) AS nums,date(createTime) AS day
- FROM CoreCmsUser
- WHERE createTime > '" + dt + @"'
- GROUP BY date(createTime)";
- }
- if (string.IsNullOrEmpty(sqlStr))
- {
- return null;
- }
+ var dt = DateTime.Now.AddDays(-day);
+ var list = await DbClient.Queryable()
+ .Where(p => p.createTime >= dt)
+ .Select(it => new
+ {
+ it.id,
+ createTime = it.createTime.Date
+ })
+ .MergeTable()
+ .GroupBy(it => it.createTime)
+ .Select(it => new StatisticsOut { day = it.createTime.ToString("yyyy-MM-dd"), nums = SqlFunc.AggregateCount(it.id) })
+ .ToListAsync();
- var list = await DbClient.SqlQueryable(sqlStr).ToListAsync();
return list;
}
diff --git a/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs b/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs
index b1f49f90fa80f7c344548365d4cee50274bb05e7..02edc97503157dfd04d1a6f5c60f08ee51981b5d 100644
--- a/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs
+++ b/CoreCms.Net.Repository/User/CoreCmsUserShipRepository.cs
@@ -85,7 +85,7 @@ namespace CoreCms.Net.Repository
}
//事物处理过程结束
- var bl = await DbClient.Updateable(entity).ExecuteCommandHasChangeAsync();
+ var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
jm.code = bl ? 0 : 1;
jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
diff --git a/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs b/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs
index 2ef1cc1502fe73b0c919201501914e44e943f8a4..6fd7f6790b29b613c6c2d5389fa9918e2a59dd63 100644
--- a/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs
+++ b/CoreCms.Net.Services/Cart/CoreCmsCartServices.cs
@@ -159,7 +159,6 @@ namespace CoreCms.Net.Services
#endregion
#region 添加单个货品到购物车
-
///
/// 添加单个货品到购物车
///
@@ -168,10 +167,9 @@ namespace CoreCms.Net.Services
/// 数量
/// 数量类型/1是直接增加/2是赋值
/// 1普通购物还是2团购秒杀3团购模式4秒杀模式6砍价模式7赠品
- /// 团队序列
- /// 团购秒杀规则序列
+ /// 关联对象类型
///
- public async Task Add(int userId, int productId, int nums, int numType, int cartTypes = 1, int teamId = 0, int groupId = 0)
+ public async Task Add(int userId, int productId, int nums, int numType, int cartTypes = 1, int objectId = 0)
{
var jm = new WebApiCallBack();
@@ -181,7 +179,7 @@ namespace CoreCms.Net.Services
var productsServices = container.ServiceProvider.GetService();
var goodsServices = container.ServiceProvider.GetService();
- //获取数据
+ //获取数据
if (nums == 0)
{
jm.msg = "请选择货品数量";
@@ -209,7 +207,7 @@ namespace CoreCms.Net.Services
//剩余库存可购判定
var canBuyNum = products.stock;
//获取是否存在记录
- var catInfo = await _dal.QueryByClauseAsync(p => p.userId == userId && p.productId == productId);
+ var catInfo = await _dal.QueryByClauseAsync(p => p.userId == userId && p.productId == productId && p.objectId == objectId);
//根据购物车存储类型匹配数据
switch (cartTypes)
@@ -220,7 +218,7 @@ namespace CoreCms.Net.Services
case (int)GlobalEnumVars.OrderType.PinTuan:
numType = (int)GlobalEnumVars.OrderType.PinTuan;
//拼团模式去判断是否开启拼团,是否存在
- var callBack = await AddCartHavePinTuan(products.id, userId, nums, teamId);
+ var callBack = await AddCartHavePinTuan(products.id, userId, nums, objectId);
if (callBack.status == false)
{
return callBack;
@@ -229,14 +227,14 @@ namespace CoreCms.Net.Services
await _dal.DeleteAsync(p => p.type == (int)GlobalEnumVars.OrderType.PinTuan && p.userId == userId);
catInfo = null;
break;
- case (int)GlobalEnumVars.OrderType.GROUP or (int)GlobalEnumVars.OrderType.SKILL:
+ case (int)GlobalEnumVars.OrderType.Group or (int)GlobalEnumVars.OrderType.Skill:
//标准模式不需要做什么判断
//判断商品是否做团购秒杀
- if (goodsServices.IsInGroup((int)products.goodsId, out var promotionsModel, groupId) == true)
+ if (goodsServices.IsInGroup((int)products.goodsId, out var promotionsModel, objectId) == true)
{
jm.msg = "进入判断商品是否做团购秒杀";
- var typeIds = new int[] { (int)GlobalEnumVars.OrderType.GROUP, (int)GlobalEnumVars.OrderType.SKILL };
+ var typeIds = new int[] { (int)GlobalEnumVars.OrderType.Group, (int)GlobalEnumVars.OrderType.Skill };
//此人的购物车中的所有购物车拼团商品都删掉,因为立即购买也是要加入购物车的,所以需要清空之前历史的加入过购物车的商品
await _dal.DeleteAsync(p => typeIds.Contains(p.type) && p.productId == products.id && p.userId == userId);
catInfo = null;
@@ -263,9 +261,11 @@ namespace CoreCms.Net.Services
}
break;
- case (int)GlobalEnumVars.OrderType.BARGAIN:
+ case (int)GlobalEnumVars.OrderType.Bargain:
+ break;
+ case (int)GlobalEnumVars.OrderType.Solitaire:
break;
default:
@@ -286,7 +286,8 @@ namespace CoreCms.Net.Services
userId = userId,
productId = productId,
nums = nums,
- type = cartTypes
+ type = cartTypes,
+ objectId = objectId
};
var outId = await _dal.InsertAsync(catInfo);
jm.status = outId > 0;
@@ -407,14 +408,16 @@ namespace CoreCms.Net.Services
#endregion
#region 获取购物车原始列表(未核算)
+
///
/// 获取购物车原始列表(未核算)
///
/// 用户序号
/// 已选择货号
/// 购物车类型/同订单类型
+ /// 关联非订单类型数据序列
///
- public async Task GetCartDtoData(int userId, int[] ids = null, int type = 1)
+ public async Task GetCartDtoData(int userId, int[] ids = null, int type = 1, int objectId = 0)
{
var jm = new WebApiCallBack() { methodDescription = "获取购物车原始列表(未核算)" };
@@ -486,16 +489,19 @@ namespace CoreCms.Net.Services
return result;
}
break;
- case (int)GlobalEnumVars.OrderType.GROUP:
+ case (int)GlobalEnumVars.OrderType.Group:
//团购模式不需要修改订单数据和商品数据
break;
- case (int)GlobalEnumVars.OrderType.SKILL:
+ case (int)GlobalEnumVars.OrderType.Skill:
//秒杀模式不需要修改订单数据和商品数据
break;
- case (int)GlobalEnumVars.OrderType.BARGAIN:
+ case (int)GlobalEnumVars.OrderType.Bargain:
//砍价模式
break;
+ case (int)GlobalEnumVars.OrderType.Solitaire:
+ //接龙模式,去获取接龙商品价格。
+ break;
default:
jm.msg = GlobalErrorCodeVars.Code10000;
@@ -524,13 +530,13 @@ namespace CoreCms.Net.Services
/// 优惠券码
/// 是否免运费
/// 关联上面的是否免运费/1=快递配送(要去算运费)生成订单记录快递方式 2=门店自提(不需要计算运费)生成订单记录门店自提信息
- /// 传团购或秒杀序列
+ /// 关联非普通订单营销类型序列
///
- public async Task GetCartInfos(int userId, int[] ids, int orderType, int areaId, int point, string couponCode, bool freeFreight = false, int deliveryType = (int)GlobalEnumVars.OrderReceiptType.Logistics, int groupId = 0)
+ public async Task 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)
{
var jm = new WebApiCallBack() { methodDescription = "获取处理后的购物车信息" };
var cartDto = new CartDto(); //必须初始化
- var cartDtoData = await GetCartDtoData(userId, ids, orderType);
+ var cartDtoData = await GetCartDtoData(userId, ids, orderType, objectId);
if (!cartDtoData.status)
{
jm.msg = "1";
@@ -581,11 +587,11 @@ namespace CoreCms.Net.Services
jm.data = await _promotionServices.ToPromotion(cartDto);
jm.msg = "订单促销金额计算";
}
- else if ((orderType == (int)GlobalEnumVars.OrderType.GROUP || orderType == (int)GlobalEnumVars.OrderType.SKILL) && groupId > 0)
+ else if ((orderType == (int)GlobalEnumVars.OrderType.Group || orderType == (int)GlobalEnumVars.OrderType.Skill) && objectId > 0)
{
//团购秒杀默认时间过期后,不可以下单
var dt = DateTime.Now;
- var promotionInfo = await _promotionServices.QueryByClauseAsync(p => p.startTime < dt && p.endTime > dt && p.id == groupId);
+ var promotionInfo = await _promotionServices.QueryByClauseAsync(p => p.startTime < dt && p.endTime > dt && p.id == objectId);
var checkRes = await _promotionServices.SetPromotion(promotionInfo, cartDto);
if (checkRes == false)
diff --git a/CoreCms.Net.Services/CoreCms.Net.Services.csproj b/CoreCms.Net.Services/CoreCms.Net.Services.csproj
index e8a57be0ec7d897634ab7143c11ee32a8746ccdc..53bb1847322e8727ab692a279fe2bbd4e7bf2a3e 100644
--- a/CoreCms.Net.Services/CoreCms.Net.Services.csproj
+++ b/CoreCms.Net.Services/CoreCms.Net.Services.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs b/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs
index 979dfb9a1693281dbbecd39affc496144f0bb66a..79985e174cbff4609c44e295a71e3268b407e15e 100644
--- a/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs
+++ b/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs
@@ -189,13 +189,14 @@ namespace CoreCms.Net.Services
/// 积分
/// 优惠券码
/// 来源平台
+ /// 场景值(一般小程序才有)
/// 发票信息
/// 发票抬头
/// 发票税务编码
- /// 团队序列
- /// 团购秒杀序列
+ /// 关联非普通订单营销功能的序列
+ /// 拼团订单分组序列
///
- public async Task 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 taxType, string taxName, string taxCode, int teamId, int groupId)
+ public async Task 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)
{
var jm = new WebApiCallBack() { methodDescription = "创建订单" };
@@ -206,7 +207,8 @@ namespace CoreCms.Net.Services
orderType = orderType,
point = point,
coupon = couponCode,
- receiptType = receiptType
+ receiptType = receiptType,
+ objectId = objectId
};
//生成收货信息
@@ -224,7 +226,7 @@ namespace CoreCms.Net.Services
//通过购物车生成订单信息和订单明细信息
List orderItems;
var ids = CommonHelper.StringToIntArray(cartIds);
- var orderRes = await FormatOrder(order, userId, ids, areaId, point, couponCode, false, receiptType, groupId);
+ var orderRes = await FormatOrder(order, userId, ids, areaId, point, couponCode, false, receiptType, objectId);
if (!orderRes.status)
{
return orderRes;
@@ -308,21 +310,21 @@ namespace CoreCms.Net.Services
return pinTuanRes;
}
break;
- case (int)GlobalEnumVars.OrderType.GROUP:
- var groupRes = await _promotionRecordServices.OrderAdd(order, orderItems, groupId, orderType);
+ case (int)GlobalEnumVars.OrderType.Group:
+ var groupRes = await _promotionRecordServices.OrderAdd(order, orderItems, objectId, orderType);
if (groupRes.status == false)
{
return groupRes;
}
break;
- case (int)GlobalEnumVars.OrderType.SKILL:
- var rskillRes = await _promotionRecordServices.OrderAdd(order, orderItems, groupId, orderType);
+ case (int)GlobalEnumVars.OrderType.Skill:
+ var rskillRes = await _promotionRecordServices.OrderAdd(order, orderItems, objectId, orderType);
if (rskillRes.status == false)
{
return rskillRes;
}
break;
- case (int)GlobalEnumVars.OrderType.BARGAIN:
+ case (int)GlobalEnumVars.OrderType.Bargain:
//砍价模式
break;
@@ -388,6 +390,7 @@ namespace CoreCms.Net.Services
//推送消息
await _messageCenterServices.SendMessage(order.userId, GlobalEnumVars.PlatformMessageTypes.CreateOrder.ToString(), JObject.FromObject(order));
+
jm.status = true;
jm.data = order;
@@ -751,7 +754,7 @@ namespace CoreCms.Net.Services
foreach (var item in order.refundItem)
{
item.paymentCodeName = EnumHelper.GetEnumDescriptionByKey(item.paymentCode);
- item.statusName = EnumHelper.GetEnumDescriptionByValue(item.status);
+ item.statusName = EnumHelper.GetEnumDescriptionByValue(item.status);
}
}
//发货单
diff --git a/CoreCms.Net.Services/Solitaire/CoreCmsSolitaireItemsServices.cs b/CoreCms.Net.Services/Solitaire/CoreCmsSolitaireItemsServices.cs
deleted file mode 100644
index ffe5e046adafe2ddc6192ce8a25d1766b4bcd710..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Services/Solitaire/CoreCmsSolitaireItemsServices.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:18:18
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.ViewModels.Basics;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-
-namespace CoreCms.Net.Services
-{
- ///
- /// 接龙活动商品表 接口实现
- ///
- public class CoreCmsSolitaireItemsServices : BaseServices, ICoreCmsSolitaireItemsServices
- {
- private readonly ICoreCmsSolitaireItemsRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public CoreCmsSolitaireItemsServices(IUnitOfWork unitOfWork, ICoreCmsSolitaireItemsRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public new async Task InsertAsync(CoreCmsSolitaireItems entity)
- {
- return await _dal.InsertAsync(entity);
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public new async Task UpdateAsync(CoreCmsSolitaireItems entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public new async Task UpdateAsync(List entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public new async Task DeleteByIdAsync(object id)
- {
- return await _dal.DeleteByIdAsync(id);
- }
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- public new async Task DeleteByIdsAsync(int[] ids)
- {
- return await _dal.DeleteByIdsAsync(ids);
- }
-
- #endregion
-
-
- ///
- /// 重写根据条件查询列表数据
- ///
- /// 判断集合
- /// 排序方式
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public new Task> QueryListByClauseAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType,
- bool blUseNoLock = false)
- {
- return _dal.QueryListByClauseAsync(predicate, orderByExpression, orderByType, blUseNoLock);
- }
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public new async Task> QueryPageAsync(Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false)
- {
- return await _dal.QueryPageAsync(predicate, orderByExpression, orderByType, pageIndex, pageSize, blUseNoLock);
- }
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Services/Solitaire/CoreCmsSolitaireServices.cs b/CoreCms.Net.Services/Solitaire/CoreCmsSolitaireServices.cs
deleted file mode 100644
index 06a8b055f1948dd69372ec33349647d37fc1113a..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Services/Solitaire/CoreCmsSolitaireServices.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/6/14 23:17:57
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.ViewModels.Basics;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Services
-{
- ///
- /// 接龙活动表 接口实现
- ///
- public class CoreCmsSolitaireServices : BaseServices, ICoreCmsSolitaireServices
- {
- private readonly ICoreCmsSolitaireRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public CoreCmsSolitaireServices(IUnitOfWork unitOfWork, ICoreCmsSolitaireRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public new async Task InsertAsync(CoreCmsSolitaire entity)
- {
- return await _dal.InsertAsync(entity);
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public new async Task UpdateAsync(CoreCmsSolitaire entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public new async Task UpdateAsync(List entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public new async Task DeleteByIdAsync(object id)
- {
- return await _dal.DeleteByIdAsync(id);
- }
-
- ///
- /// 重写删除指定ID集合的数据(批量删除)
- ///
- ///
- ///
- public new async Task DeleteByIdsAsync(int[] ids)
- {
- return await _dal.DeleteByIdsAsync(ids);
- }
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public new async Task> QueryPageAsync(Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false)
- {
- return await _dal.QueryPageAsync(predicate, orderByExpression, orderByType, pageIndex, pageSize, blUseNoLock);
- }
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj b/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj
index e980e4271ca3fe434f0fef3a67a607f50c88253e..8c4f0af51935eb40b59e80946e84c889a0926d24 100644
--- a/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj
+++ b/CoreCms.Net.Swagger/CoreCms.Net.Swagger.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/CoreCms.Net.Uni-App/CoreShop/components/coreshop-navbar-slot/coreshop-navbar-slot.vue b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-navbar-slot/coreshop-navbar-slot.vue
new file mode 100644
index 0000000000000000000000000000000000000000..02ce59cda7826fa6adbacbb8b233ec62aba7ddc0
--- /dev/null
+++ b/CoreCms.Net.Uni-App/CoreShop/components/coreshop-navbar-slot/coreshop-navbar-slot.vue
@@ -0,0 +1,328 @@
+
+
+
+
+
+
+
diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/activity/groupBuying/details/details.vue b/CoreCms.Net.Uni-App/CoreShop/pages/activity/groupBuying/details/details.vue
index e44d63dc98f73c7756b3cd3a424d701e76829838..cc582027ff815cc619d2e738bb06af0d6f206055 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/activity/groupBuying/details/details.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/activity/groupBuying/details/details.vue
@@ -1,11 +1,9 @@
-
-
-
-
-
+
+
+
@@ -364,7 +362,7 @@
- 立即{{ typeName || '' }}
+ 立即{{ typeName || '' }}
@@ -380,6 +378,7 @@
import { mapMutations, mapActions, mapState } from 'vuex';
import coreshopFab from '@/components/coreshop-fab/coreshop-fab.vue';
import { goods, articles, commonUse, tools } from '@/common/mixins/mixinsHelper.js'
+ import coreshopNavbarSlot from '@/components/coreshop-navbar-slot/coreshop-navbar-slot.vue';
import spec from '@/components/coreshop-spec/coreshop-spec.vue';
// #ifdef H5
import shareByH5 from '@/components/coreshop-share/shareByh5.vue';
@@ -400,6 +399,7 @@
mixins: [goods, articles, commonUse, tools],
components: {
coreshopFab,
+ coreshopNavbarSlot,
spec,
// #ifdef H5
shareByH5,
@@ -419,8 +419,13 @@
},
data() {
return {
+ background: {
+ backgroundColor: '#f37b1d'
+ },
customStyle: {
width: '100%',
+ borderColor:'#f37b1d',
+ backgroundColor:'#f37b1d',
},
bannerCur: 0,
current: 0, // init tab位
@@ -435,7 +440,8 @@
otherRecommendData: [], // 其他数据
buyNum: 1, // 选定的购买数量
minBuyNum: 1, // 最小可购买数量
- type: 1,
+ type: 2,
+ cartType: 3,
isfav: false, // 商品是否收藏
//拼团列表滑动数据
swiperSet: {
@@ -764,14 +770,15 @@
let data = {
ProductId: this.product.id,
Nums: this.buyNum,
- cartType: this.type,
- groupId: this.groupId
+ type: this.type,
+ cartType: this.cartType,
+ objectId: this.groupId
};
this.$u.api.addCart(data).then(res => {
if (res.status) {
this.hideModal(); // 关闭弹出层
let cartIds = res.data;
- this.$u.route('/pages/placeOrder/index/index?cartIds=' + JSON.stringify(cartIds) + '&orderType=' + this.type + '&groupId=' + this.groupId);
+ this.$u.route('/pages/placeOrder/index/index?cartIds=' + JSON.stringify(cartIds) + '&orderType=' + this.cartType + '&objectId=' + this.groupId);
} else {
this.$u.toast(res.msg);
diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/activity/pinTuan/details/details.vue b/CoreCms.Net.Uni-App/CoreShop/pages/activity/pinTuan/details/details.vue
index 66a97e6246049b947e6df33666f952482d6640e5..dfb376aa51de3820fbf480df37345fec713fa0cc 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/activity/pinTuan/details/details.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/activity/pinTuan/details/details.vue
@@ -1,11 +1,9 @@
-
-
-
-
-
+
+
+
@@ -511,7 +509,7 @@
+
+
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/details.html
deleted file mode 100644
index 0b7b0cb2953cb47b787339e246c323fe0afc11d2..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/details.html
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/edit.html
deleted file mode 100644
index b0f5b2ac588fb53f6dbce1edd0c84822b73c243c..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/edit.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/index.html
deleted file mode 100644
index c779f1c32c33fd15baaf79ef63c154f7166b89da..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaireitems/index.html
+++ /dev/null
@@ -1,406 +0,0 @@
-接龙活动商品表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/create.html
deleted file mode 100644
index 883fd137d7aba88ce30f732e446c5305c32a1207..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/create.html
+++ /dev/null
@@ -1,430 +0,0 @@
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/details.html
deleted file mode 100644
index 6482470a343bffbb8979096a611e29dadaf7fe00..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/details.html
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/edit.html
deleted file mode 100644
index e7e0cddd3fb8c606edadef72b8383e2567a83e4a..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/edit.html
+++ /dev/null
@@ -1,505 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/index.html
deleted file mode 100644
index 626be6931452c2227a745018d92c5c808c8eea22..0000000000000000000000000000000000000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/promotion/solitaire/solitaires/index.html
+++ /dev/null
@@ -1,416 +0,0 @@
-接龙活动表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticket/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticket/index.html
index 13754e83e2b112b100aab813de795796e7104327..84cf5d31826d4e25552610532684e1bd2e50fb65 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticket/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticket/index.html
@@ -268,7 +268,7 @@
area: ['600px', '500px'],
id: 'LAY-popup-CoreCmsUserServicesTicket-create',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsUserServicesTicket/create', { data: e.data }).done(function () {
+ view(this.id).render('serviceGoods/servicesTicketcreate', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-CoreCmsUserServicesTicket-createForm-submit)',
function(data) {
@@ -308,7 +308,7 @@
area: ['600px', '500px'],
id: 'LAY-popup-CoreCmsUserServicesTicket-edit',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsUserServicesTicket/edit', { data: e.data }).done(function () {
+ view(this.id).render('serviceGoods/servicesTicketedit', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-CoreCmsUserServicesTicket-editForm-submit)',
function(data) {
@@ -348,7 +348,7 @@
area: ['600px', '500px'],
id: 'LAY-popup-CoreCmsUserServicesTicket-details',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsUserServicesTicket/details', { data: e.data }).done(function () {
+ view(this.id).render('serviceGoods/servicesTicketdetails', { data: e.data }).done(function () {
form.render();
});
// 禁止弹窗出现滚动条
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticketverificationlog/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticketverificationlog/index.html
index 1706c91ad71565f07ce17d62ed7771b1793ace1a..95c1c810c29aa06e6a72b43a04b03e1ec2f8f609 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticketverificationlog/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/serviceGoods/servicesticketverificationlog/index.html
@@ -200,7 +200,7 @@
area: ['600px', '500px'],
id: 'LAY-popup-CoreCmsUserServicesTicketVerificationLog-create',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsUserServicesTicketVerificationLog/create', { data: e.data }).done(function () {
+ view(this.id).render('serviceGoods/servicesticketverificationlog/create', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-CoreCmsUserServicesTicketVerificationLog-createForm-submit)',
function(data) {
@@ -238,7 +238,7 @@
area: ['600px', '500px'],
id: 'LAY-popup-CoreCmsUserServicesTicketVerificationLog-edit',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsUserServicesTicketVerificationLog/edit', { data: e.data }).done(function () {
+ view(this.id).render('serviceGoods/servicesticketverificationlog/edit', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-CoreCmsUserServicesTicketVerificationLog-editForm-submit)',
function(data) {
@@ -276,7 +276,7 @@
area: ['600px', '500px'],
id: 'LAY-popup-CoreCmsUserServicesTicketVerificationLog-details',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsUserServicesTicketVerificationLog/details', { data: e.data }).done(function () {
+ view(this.id).render('serviceGoods/servicesticketverificationlog/details', { data: e.data }).done(function () {
form.render();
});
// 禁止弹窗出现滚动条
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/shop/pagesitems/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/shop/pagesitems/index.html
index 3cc205d39723218c469ab76201929057a8ee1d64..25c6ccd1fa2280d0e8d6578aa9875d130b9d0c09 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/shop/pagesitems/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/shop/pagesitems/index.html
@@ -183,7 +183,7 @@
area: ['600px', '400px'],
id: 'LAY-popup-CoreCmsPagesItems-create',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsPagesItems/create', { data: e.data }).done(function () {
+ view(this.id).render('shop/pagesitems/create', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-CoreCmsPagesItems-createForm-submit)',
function(data) {
@@ -219,7 +219,7 @@
area: ['600px', '400px'],
id: 'LAY-popup-CoreCmsPagesItems-edit',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsPagesItems/edit', { data: e.data }).done(function () {
+ view(this.id).render('shop/pagesitems/edit', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-CoreCmsPagesItems-editForm-submit)',
function(data) {
@@ -255,7 +255,7 @@
area: ['600px', '400px'],
id: 'LAY-popup-CoreCmsPagesItems-details',
success: function (layero, index) {
- view(this.id).render('base/CoreCmsPagesItems/details', { data: e.data }).done(function () {
+ view(this.id).render('shop/pagesitems/details', { data: e.data }).done(function () {
form.render();
});
}
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysloginrecord/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysloginrecord/index.html
index 7beee4b22963af4882bc7b516e901b50809d2055..72ebbe6b57d7b9515cf7daceffe523358b999516 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysloginrecord/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysloginrecord/index.html
@@ -172,7 +172,7 @@
area: ['700px', '550px'],
id: 'LAY-popup-SysLoginRecord-details',
success: function (layero, index) {
- view(this.id).render('system/logs/sysLoginRecord/details', { data: e.data }).done(function () {
+ view(this.id).render('system/logs/sysloginrecord/details', { data: e.data }).done(function () {
form.render();
});
// 禁止弹窗出现滚动条
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysnlogrecords/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysnlogrecords/index.html
index 3b0991d04679e5d3b698d8f1370a03e0799588e6..7b6fc700e09e5ed8f5f4b15af8e5bb703ed74ae7 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysnlogrecords/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/sysnlogrecords/index.html
@@ -184,7 +184,7 @@
area: ['1000px', '90%'],
id: 'LAY-popup-SysNLogRecords-details',
success: function (layero, index) {
- view(this.id).render('system/logs/SysNLogRecords/details', { data: e.data }).done(function () {
+ view(this.id).render('system/logs/sysnlogrecords/details', { data: e.data }).done(function () {
form.render();
});
// 禁止弹窗出现滚动条
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/systasklog/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/systasklog/index.html
index cde8865398ea74c40011cb7b12c0b58027c12b34..f70bb6990aca2f2b6f9c0909e1ca3272b7e76346 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/systasklog/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/logs/systasklog/index.html
@@ -188,7 +188,7 @@
area: ['600px', '550px'],
id: 'LAY-popup-SysTaskLog-details',
success: function (layero, index) {
- view(this.id).render('system/logs/SysTaskLog/details', { data: e.data }).done(function () {
+ view(this.id).render('system/logs/systasklog/details', { data: e.data }).done(function () {
form.render();
});
// 禁止弹窗出现滚动条
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysdictionary/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysdictionary/index.html
index bc962ef4854c1d2f032a44e69ea2195748449ed2..4305bdfb96e85b329d3e29eaf70b6291dc0f4690 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysdictionary/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysdictionary/index.html
@@ -168,7 +168,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysDictionary-create',
success: function (layero, index) {
- view(this.id).render('system/SysDictionary/create', { data: e.data }).done(function () {
+ view(this.id).render('system/sysdictionary/create', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysDictionary-createForm-submit)',
function (data) {
@@ -208,7 +208,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysDictionary-edit',
success: function (layero, index) {
- view(this.id).render('System/SysDictionary/edit', { data: e.data }).done(function () {
+ view(this.id).render('system/sysdictionary/edit', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysDictionary-editForm-submit)',
function (data) {
@@ -306,7 +306,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysDictionaryData-create',
success: function (layero, index) {
- view(this.id).render('System/SysDictionary/createData', { data: e.data }).done(function () {
+ view(this.id).render('system/sysdictionary/createData', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysDictionaryData-createForm-submit)',
function (data) {
@@ -347,7 +347,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysDictionaryData-edit',
success: function (layero, index) {
- view(this.id).render('System/SysDictionary/editData', { data: e.data }).done(function () {
+ view(this.id).render('system/sysdictionary/editData', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysDictionaryData-editForm-submit)',
function (data) {
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html
index e19dd7bf18d600d9320fcea4375ebb3ec076d8e7..86db6c19f4a80028f3e367bac78bb2cf6d0a6570 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysmenu/index.html
@@ -158,7 +158,7 @@
area: ['1000px', '500px'],
id: 'LAY-popup-SysMenu-create',
success: function (layero, index) {
- view(this.id).render('System/SysMenu/create', { data: e.data,treeData:insTb.options.data }).done(function () {
+ view(this.id).render('system/sysmenu/create', { data: e.data,treeData:insTb.options.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysMenu-createForm-submit)',
function (data) {
@@ -207,7 +207,7 @@
area: ['1000px', '500px'],
id: 'LAY-popup-SysMenu-edit',
success: function (layero, index) {
- view(this.id).render('System/SysMenu/edit', { data: e.data, treeData: insTb.options.data }).done(function() {
+ view(this.id).render('system/sysmenu/edit', { data: e.data, treeData: insTb.options.data }).done(function() {
//监听提交
form.on('submit(LAY-app-SysMenu-editForm-submit)',
function(data) {
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysorganization/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysorganization/index.html
index 2f8d0cd503e5763f93e8a88d2a9343cac836ca36..42dba066ab451b458cce7e4d8f8ea8c0a0e6c06b 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysorganization/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysorganization/index.html
@@ -174,7 +174,7 @@
area: ['700px', '350px'],
id: 'LAY-popup-SysOrganization-create',
success: function (layero, index) {
- view(this.id).render('system/SysOrganization/create', { data: e.data, treeData: treeData, parentId: parentId }).done(function () {
+ view(this.id).render('system/sysorganization/create', { data: e.data, treeData: treeData, parentId: parentId }).done(function () {
//监听提交
form.on('submit(LAY-app-SysOrganization-createForm-submit)',
function (data) {
@@ -219,7 +219,7 @@
area: ['700px', '350px'],
id: 'LAY-popup-SysOrganization-edit',
success: function (layero, index) {
- view(this.id).render('system/SysOrganization/edit', { data: e.data, treeData: treeData }).done(function () {
+ view(this.id).render('system/sysorganization/edit', { data: e.data, treeData: treeData }).done(function () {
//监听提交
form.on('submit(LAY-app-SysOrganization-editForm-submit)',
function (data) {
@@ -360,7 +360,7 @@
area: ['380px', '450px'],
id: 'LAY-popup-SysUser-create',
success: function (layero, index) {
- view(this.id).render('System/sysorganization/createUser', { data: e.data, treeData: treeData }).done(function () {
+ view(this.id).render('system/sysorganization/createUser', { data: e.data, treeData: treeData }).done(function () {
//监听提交
form.on('submit(LAY-app-SysUser-createForm-submit)',
function (data) {
@@ -407,7 +407,7 @@
area: ['380px', '450px'],
id: 'LAY-popup-SysUser-edit',
success: function (layero, index) {
- view(this.id).render('System/sysorganization/editUser', { data: e.data, treeData: treeData }).done(function () {
+ view(this.id).render('system/sysorganization/editUser', { data: e.data, treeData: treeData }).done(function () {
//监听提交
form.on('submit(LAY-app-SysUser-editForm-submit)',
function (data) {
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysrole/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysrole/index.html
index 382a500715196e127a9d505aed316dac4665ff6a..7dac77c3e54e25b708d7e6416f0f39f31264214d 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysrole/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysrole/index.html
@@ -161,7 +161,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysRole-create',
success: function (layero, index) {
- view(this.id).render('System/SysRole/create', { data: e.data }).done(function () {
+ view(this.id).render('system/sysrole/create', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysRole-createForm-submit)',
function (data) {
@@ -206,7 +206,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysRole-edit',
success: function (layero, index) {
- view(this.id).render('System/SysRole/edit', { data: e.data }).done(function () {
+ view(this.id).render('system/sysrole/edit', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysRole-editForm-submit)',
function (data) {
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysuser/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysuser/index.html
index 8673f3d1d47fd3a461ff97936f09e8cca35cfa28..f51c8ae66402377427ba433b3d8327233211c307 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/system/sysuser/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/system/sysuser/index.html
@@ -175,7 +175,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysUser-create',
success: function (layero, index) {
- view(this.id).render('System/SysUser/create', { data: e.data }).done(function () {
+ view(this.id).render('system/sysuser/create', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysUser-createForm-submit)',
function (data) {
@@ -220,7 +220,7 @@
area: ['380px', '400px'],
id: 'LAY-popup-SysUser-edit',
success: function (layero, index) {
- view(this.id).render('System/SysUser/edit', { data: e.data }).done(function () {
+ view(this.id).render('system/sysuser/edit', { data: e.data }).done(function () {
//监听提交
form.on('submit(LAY-app-SysUser-editForm-submit)',
function (data) {
diff --git a/CoreCms.Net.Web.WebApi/Controllers/AdvertController.cs b/CoreCms.Net.Web.WebApi/Controllers/AdvertController.cs
index c1c17d782100610480689d394502f865158ea130..1c1f57fd50e5344852d39b61969d0f87bde10800 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/AdvertController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/AdvertController.cs
@@ -29,7 +29,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class AdvertController : Controller
+ public class AdvertController : ControllerBase
{
private IHttpContextUser _user;
@@ -63,7 +63,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetAdvertList([FromBody] FMPageByIntId entity)
+ public async Task GetAdvertList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -72,7 +72,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = list;
- return Json(jm);
+ return jm;
}
#endregion
@@ -84,14 +84,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetPositionList([FromBody] WxAdvert entity)
+ public async Task GetPositionList([FromBody] WxAdvert entity)
{
var jm = new WebApiCallBack();
var position = await _advertPositionServices.QueryListByClauseAsync(p => p.isEnable && p.code == entity.codes);
if (!position.Any())
{
- return Json(jm);
+ return jm;
}
var ids = position.Select(p => p.id).ToList();
var isement = await _advertisementServices.QueryListByClauseAsync(p => ids.Contains(p.positionId));
@@ -102,7 +102,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = list;
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/AgentController.cs b/CoreCms.Net.Web.WebApi/Controllers/AgentController.cs
index c67e798a85cb5a3ba7490000caa43b94d30515e8..37bbbf17cb8e1ff6ee22160270e60d9b62ec9f3f 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/AgentController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/AgentController.cs
@@ -34,7 +34,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class AgentController : Controller
+ public class AgentController : ControllerBase
{
private IHttpContextUser _user;
private readonly ICoreCmsAgentServices _agentServices;
@@ -73,23 +73,23 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetStoreInfo([FromBody] FMIntId entity)
+ public async Task GetStoreInfo([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
if (entity.id == 0)
{
jm.msg = "店铺信息丢失";
- return Json(jm);
+ return jm;
}
var store = UserHelper.GetUserIdByShareCode(entity.id);
if (store <= 0)
{
jm.msg = "店铺信息丢失";
- return Json(jm);
+ return jm;
}
jm = await _agentServices.GetStore(store);
- return Json(jm);
+ return jm;
}
#endregion
@@ -101,7 +101,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetGoodsPageList([FromBody] FMPageByWhereOrder entity)
+ public async Task GetGoodsPageList([FromBody] FMPageByWhereOrder entity)
{
var jm = new WebApiCallBack();
@@ -192,7 +192,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
};
jm.msg = "数据调用成功!";
- return Json(jm);
+ return jm;
}
#endregion
@@ -207,10 +207,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task Info()
+ public async Task Info()
{
var jm = await _agentServices.GetInfo(_user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -222,14 +222,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task ApplyAgent([FromBody] FMAgentApply entity)
+ public async Task ApplyAgent([FromBody] FMAgentApply entity)
{
var jm = new WebApiCallBack();
if (entity.agreement != "on")
{
jm.msg = "请勾选代理商协议";
- return Json(jm);
+ return jm;
}
var iData = new CoreCmsAgent();
iData.mobile = entity.mobile;
@@ -238,7 +238,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
iData.qq = entity.qq;
jm = await _agentServices.AddData(iData, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -250,7 +250,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetTeamSum()
+ public async Task GetTeamSum()
{
var jm = new WebApiCallBack();
@@ -286,7 +286,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
monthSecond
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -298,7 +298,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetOrderSum()
+ public async Task GetOrderSum()
{
var jm = new WebApiCallBack();
@@ -344,7 +344,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
monthOrderMoney
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -356,10 +356,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task MyOrder([FromBody] FMPageByIntId entity)
+ public async Task MyOrder([FromBody] FMPageByIntId entity)
{
var jm = await _agentServices.GetMyOrderList(_user.ID, entity.page, entity.limit, entity.id);
- return Json(jm);
+ return jm;
}
#endregion
@@ -370,24 +370,24 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task SetStore([FromBody] FMSetAgentStorePost entity)
+ public async Task SetStore([FromBody] FMSetAgentStorePost entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.storeName))
{
jm.msg = "请填写店铺名称";
- return Json(jm);
+ return jm;
}
if (string.IsNullOrEmpty(entity.storeLogo))
{
jm.msg = "请上传店铺logo";
- return Json(jm);
+ return jm;
}
if (string.IsNullOrEmpty(entity.storeBanner))
{
jm.msg = "请上传店铺banner";
- return Json(jm);
+ return jm;
}
var info = await _agentServices.QueryByClauseAsync(p => p.userId == _user.ID);
@@ -402,7 +402,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.msg = "保存成功";
- return Json(jm);
+ return jm;
}
#endregion
@@ -414,7 +414,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetAgentRanking([FromBody] FMPageByIntId entity)
+ public async Task GetAgentRanking([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -433,7 +433,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
};
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs b/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs
index f237b23a4a7e97804d9da22507892c5f55af2214..c158c17993dde334e0880a9ecc5680687e935f3d 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/ArticleController.cs
@@ -24,7 +24,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class ArticleController : Controller
+ public class ArticleController : ControllerBase
{
private IHttpContextUser _user;
@@ -52,7 +52,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task NoticeList([FromBody] FMPageByIntId entity)
+ public async Task NoticeList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -61,7 +61,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = list;
- return Json(jm);
+ return jm;
}
#endregion
@@ -73,7 +73,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetArticleList([FromBody] FMPageByIntId entity)
+ public async Task GetArticleList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -96,7 +96,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
count = list.TotalCount
};
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/CartController.cs b/CoreCms.Net.Web.WebApi/Controllers/CartController.cs
index 108367ec85a59371926fe1287bd13e3a70966107..6a4a93c13a8d6bc0b1b72becdea49f3a909767fb 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/CartController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/CartController.cs
@@ -25,7 +25,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class CartController : Controller
+ public class CartController : ControllerBase
{
private readonly IHttpContextUser _user;
private readonly ICoreCmsCartServices _cartServices;
@@ -53,10 +53,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task AddCart([FromBody] FMCartAdd entity)
+ public async Task AddCart([FromBody] FMCartAdd entity)
{
- var jm = await _cartServices.Add(_user.ID, entity.ProductId, entity.Nums, entity.type, entity.cartType, entity.teamId, entity.groupId);
- return Json(jm);
+ var jm = await _cartServices.Add(_user.ID, entity.ProductId, entity.Nums, entity.type, entity.cartType, entity.objectId);
+ return jm;
}
#endregion 添加单个货品到购物车
@@ -69,15 +69,15 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetList([FromBody] FMCartGetList entity)
+ public async Task GetList([FromBody] FMCartGetList entity)
{
var ids = CommonHelper.StringToIntArray(entity.ids);
//判断免费运费
var freeFreight = entity.receiptType != 1;
//获取数据
- var jm = await _cartServices.GetCartInfos(_user.ID, ids, entity.type, entity.areaId, entity.point, entity.couponCode, freeFreight, entity.receiptType, entity.groupId);
+ var jm = await _cartServices.GetCartInfos(_user.ID, ids, entity.type, entity.areaId, entity.point, entity.couponCode, freeFreight, entity.receiptType, entity.objectId);
- return Json(jm);
+ return jm;
}
#endregion 获取购物车列表======================================================================
@@ -90,18 +90,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task DoDelete([FromBody] FMIntId entity)
+ public async Task DoDelete([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
if (entity.id <= 0)
{
jm.msg = "请提交要删除的货品";
- return Json(jm);
+ return jm;
}
jm = await _cartServices.DeleteByIdsAsync(entity.id, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion 删除购物车信息
@@ -114,10 +114,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task SetCartNum([FromBody] FMSetCartNum entity)
+ public async Task SetCartNum([FromBody] FMSetCartNum entity)
{
var jm = await _cartServices.SetCartNum(entity.id, entity.nums, _user.ID, 2, 1);
- return Json(jm);
+ return jm;
}
#endregion 设置购物车商品数量
@@ -130,11 +130,11 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetCartAvailableCoupon([FromBody] FMCouponForUserCouponPost entity)
+ public async Task GetCartAvailableCoupon([FromBody] FMCouponForUserCouponPost entity)
{
var ids = CommonHelper.StringToIntArray(entity.ids);
var jm = await _cartServices.GetCartAvailableCoupon(_user.ID, ids);
- return Json(jm);
+ return jm;
}
#endregion 根据提交的数据判断哪些购物券可以使用==================================================
diff --git a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
index 8c929ba9c10d87bee8184e5fd7ed006ef930dac6..6f2bcdd336de87d3ba31262a506d50d07a2abad5 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/CommonController.cs
@@ -40,7 +40,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class CommonController : Controller
+ public class CommonController : ControllerBase
{
private readonly IWebHostEnvironment _webHostEnvironment;
private readonly ICoreCmsSettingServices _settingServices;
@@ -73,10 +73,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public JsonResult InterFaceTest()
+ public WebApiCallBack InterFaceTest()
{
var jm = new WebApiCallBack { status = true, msg = "接口访问正常", data = DateTime.Now };
- return Json(jm);
+ return jm;
}
#endregion
@@ -87,7 +87,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetConfigV2()
+ public async Task GetConfigV2()
{
var jm = new WebApiCallBack { status = true, msg = "接口访问正常", data = DateTime.Now };
var allConfigs = await _settingServices.GetConfigDictionaries();
@@ -198,7 +198,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
agentAgreement
};
jm.data = model;
- return Json(jm);
+ return jm;
}
#endregion
@@ -209,7 +209,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetAreas()
+ public async Task GetAreas()
{
var jm = new WebApiCallBack();
@@ -217,7 +217,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = AreaHelper.GetList(areas);
- return Json(jm);
+ return jm;
}
#endregion
@@ -229,7 +229,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetServiceDescription()
+ public async Task GetServiceDescription()
{
var jm = new WebApiCallBack();
@@ -241,7 +241,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
service = caCheList.Where(p => p.type == (int)GlobalEnumVars.ShopServiceNoteType.Service && p.isShow == true).OrderBy(p => p.sortId).ToList(),
delivery = caCheList.Where(p => p.type == (int)GlobalEnumVars.ShopServiceNoteType.Delivery && p.isShow == true).OrderBy(p => p.sortId).ToList()
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -256,7 +256,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Authorize]
[HttpPost]
- public async Task UploadImages()
+ public async Task UploadImages()
{
var jm = new WebApiCallBack();
@@ -271,7 +271,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (file == null)
{
jm.msg = "请选择文件";
- return Json(jm);
+ return jm;
}
string fileName = file.FileName;
string fileExt = Path.GetExtension(fileName).ToLowerInvariant();
@@ -280,7 +280,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (file.Length > maxSize)
{
jm.msg = "上传文件大小超过限制,最大允许上传" + filesStorageOptions.MaxSize + "M";
- return Json(jm);
+ return jm;
}
//检查文件扩展名
@@ -288,7 +288,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
Array.IndexOf(filesStorageOptions.FileTypes.Split(','), fileExt.Substring(1).ToLower()) == -1)
{
jm.msg = "上传文件扩展名是不允许的扩展名,请上传后缀名为:" + filesStorageOptions.FileTypes;
- return Json(jm);
+ return jm;
}
string dts = DateTime.Now.ToString("yyyyMMddHHmmss_ffff", DateTimeFormatInfo.InvariantInfo);
@@ -351,7 +351,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
src = filesStorageOptions.BucketBindUrl + filePath,
imageId = dts
};
- return Json(jm);
+ return jm;
}
}
else if (filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.QCloudOSS.ToString())
@@ -396,7 +396,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
- return Json(jm);
+ return jm;
}
#endregion
}
diff --git a/CoreCms.Net.Web.WebApi/Controllers/CouponController.cs b/CoreCms.Net.Web.WebApi/Controllers/CouponController.cs
index 5bdc3fd5b934d1113c4c4732be5808fdf88e5127..b3dfa725d7474aaf24d2debd38b9b6625596946b 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/CouponController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/CouponController.cs
@@ -27,7 +27,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class CouponController : Controller
+ public class CouponController : ControllerBase
{
private readonly IHttpContextUser _user;
@@ -56,7 +56,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
//[Authorize]
- public async Task CouponList([FromBody] FMCouponForUserCouponPost entity)
+ public async Task CouponList([FromBody] FMCouponForUserCouponPost entity)
{
var jm = new WebApiCallBack() { msg = "获取失败" };
@@ -78,7 +78,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
list.TotalPages
};
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -91,7 +91,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task CouponDetail([FromBody] FMIntId entity)
+ public async Task CouponDetail([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack() { msg = "获取失败" };
@@ -99,7 +99,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
jm.status = false;
jm.msg = GlobalErrorCodeVars.Code15006;
- return Json(jm);
+ return jm;
}
var promotionModel = await _promotionServices.QueryByClauseAsync(p => p.id == entity.id);
@@ -109,7 +109,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.data = promotionModel;
jm.msg = "获取成功";
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -121,10 +121,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task UserCoupon([FromBody] FMCouponForUserCouponPost entity)
+ public async Task UserCoupon([FromBody] FMCouponForUserCouponPost entity)
{
var jm = await _couponServices.GetMyCoupon(_user.ID, 0, entity.display, entity.page, entity.limit);
- return Json(jm);
+ return jm;
}
#endregion
@@ -135,27 +135,27 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetCoupon([FromBody] FMIntId entity)
+ public async Task GetCoupon([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
if (entity.id == 0)
{
jm.msg = GlobalErrorCodeVars.Code15006;
- return Json(jm);
+ return jm;
}
//判断优惠券是否可以领取?
var promotionModel = await _promotionServices.ReceiveCoupon(entity.id);
if (promotionModel.status == false)
{
- return Json(promotionModel);
+ return promotionModel;
}
var promotion = (CoreCmsPromotion)promotionModel.data;
if (promotion == null)
{
jm.msg = GlobalErrorCodeVars.Code15019;
- return Json(jm);
+ return jm;
}
if (promotion.maxNums > 0)
@@ -165,12 +165,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (couponResult.status && couponResult.code >= promotion.maxNums)
{
jm.msg = GlobalErrorCodeVars.Code15018;
- return Json(jm);
+ return jm;
}
}
jm = await _couponServices.AddData(_user.ID, entity.id, promotion);
jm.otherData = promotionModel;
- return Json(jm);
+ return jm;
}
#endregion
@@ -181,28 +181,28 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetCouponKey([FromBody] FMCouponForGetCouponKeyPost entity)
+ public async Task GetCouponKey([FromBody] FMCouponForGetCouponKeyPost entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.key))
{
jm.msg = GlobalErrorCodeVars.Code15006;
- return Json(jm);
+ return jm;
}
var coupon = await _couponServices.QueryByClauseAsync(p => p.couponCode == entity.key);
if (coupon == null || coupon.promotionId <= 0)
{
jm.msg = GlobalErrorCodeVars.Code15009;
- return Json(jm);
+ return jm;
}
//判断优惠券是否可以领取?
var promotionModel = await _promotionServices.ReceiveCoupon(coupon.promotionId);
if (promotionModel.status == false)
{
- return Json(promotionModel);
+ return promotionModel;
}
//判断用户是否已领取?
if (promotionModel.data is CoreCmsPromotion { maxNums: > 0 } info)
@@ -212,13 +212,13 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (couponResult.status && couponResult.code > info.maxNums)
{
jm.msg = GlobalErrorCodeVars.Code15018;
- return Json(jm);
+ return jm;
}
}
//
jm = await _couponServices.ReceiveCoupon(_user.ID, entity.key);
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/DemoController.cs b/CoreCms.Net.Web.WebApi/Controllers/DemoController.cs
index a645bd8ba4be86f27552c7f917e923c61a53a30d..88cefb8a43aa49c0e8163998e573cea868e1451b 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/DemoController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/DemoController.cs
@@ -15,7 +15,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
/// 默认接口示例
///
- public class DemoController : Controller
+ public class DemoController : ControllerBase
{
///
/// 默认首页
diff --git a/CoreCms.Net.Web.WebApi/Controllers/DistributionController.cs b/CoreCms.Net.Web.WebApi/Controllers/DistributionController.cs
index ed79fa13f2ba7225b8fcc2413267f8be071d8338..bdf07cc7487aa69e0a904383447db043d69f5c0a 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/DistributionController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/DistributionController.cs
@@ -26,7 +26,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class DistributionController : Controller
+ public class DistributionController : ControllerBase
{
private readonly ICoreCmsDistributionOrderServices _distributionOrderServices;
private readonly ICoreCmsDistributionServices _distributionServices;
@@ -57,25 +57,25 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetStoreInfo([FromBody] FMIntId entity)
+ public async Task GetStoreInfo([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
if (entity.id == 0)
{
jm.msg = "店铺信息丢失";
- return Json(jm);
+ return jm;
}
var store = UserHelper.GetUserIdByShareCode(entity.id);
if (store <= 0)
{
jm.msg = "店铺信息丢失";
- return Json(jm);
+ return jm;
}
jm = await _distributionServices.GetStore(store);
- return Json(jm);
+ return jm;
}
#endregion
@@ -90,10 +90,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task Info()
+ public async Task Info()
{
var jm = await _distributionServices.GetInfo(_user.ID, true);
- return Json(jm);
+ return jm;
}
#endregion
@@ -106,14 +106,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task ApplyDistribution([FromBody] FMDistributionApply entity)
+ public async Task ApplyDistribution([FromBody] FMDistributionApply entity)
{
var jm = new WebApiCallBack();
if (entity.agreement != "on")
{
jm.msg = "请勾选分销协议";
- return Json(jm);
+ return jm;
}
var iData = new CoreCmsDistribution();
@@ -123,7 +123,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
iData.qq = entity.qq;
jm = await _distributionServices.AddData(iData, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -136,10 +136,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task MyOrder([FromBody] FMPageByIntId entity)
+ public async Task MyOrder([FromBody] FMPageByIntId entity)
{
var jm = await _distributionServices.GetMyOrderList(_user.ID, entity.page, entity.limit, entity.id);
- return Json(jm);
+ return jm;
}
#endregion
@@ -152,26 +152,26 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task SetStore([FromBody] FMSetDistributionStorePost entity)
+ public async Task SetStore([FromBody] FMSetDistributionStorePost entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.storeName))
{
jm.msg = "请填写店铺名称";
- return Json(jm);
+ return jm;
}
if (string.IsNullOrEmpty(entity.storeLogo))
{
jm.msg = "请上传店铺logo";
- return Json(jm);
+ return jm;
}
if (string.IsNullOrEmpty(entity.storeBanner))
{
jm.msg = "请上传店铺banner";
- return Json(jm);
+ return jm;
}
var info = await _distributionServices.QueryByClauseAsync(p => p.userId == _user.ID);
@@ -187,7 +187,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.msg = "保存成功";
- return Json(jm);
+ return jm;
}
#endregion
@@ -200,7 +200,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetOrderSum()
+ public async Task GetOrderSum()
{
var jm = new WebApiCallBack();
@@ -236,7 +236,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
monthOrderMoney
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -249,7 +249,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetTeamSum()
+ public async Task GetTeamSum()
{
var jm = new WebApiCallBack();
@@ -274,7 +274,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
monthSecond
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -287,7 +287,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetDistributionRanking([FromBody] FMPageByIntId entity)
+ public async Task GetDistributionRanking([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -305,7 +305,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
list.TotalCount
};
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/FormController.cs b/CoreCms.Net.Web.WebApi/Controllers/FormController.cs
index 891b5a46a57d51d032d18a5b37bfeb9260483bd4..e0a5d08a49e0101667e11c5302ef170f1e5f89df 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/FormController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/FormController.cs
@@ -28,7 +28,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class FormController : Controller
+ public class FormController : ControllerBase
{
private readonly ICoreCmsFormServices _formServices;
@@ -49,10 +49,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetFormDetial([FromBody] FmGetForm entity)
+ public async Task GetFormDetial([FromBody] FmGetForm entity)
{
var jm = await _formServices.GetFormInfo(entity.id, entity.token);
- return Json(jm);
+ return jm;
}
#endregion
@@ -64,13 +64,13 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task AddSubmit([FromBody] FmAddSubmit entity)
+ public async Task AddSubmit([FromBody] FmAddSubmit entity)
{
var jm = await _formServices.AddSubmit(entity);
jm.otherData = entity;
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/GoodController.cs b/CoreCms.Net.Web.WebApi/Controllers/GoodController.cs
index 89a22b5f3ecb2ea6f71ba1670440d41b0a043e8b..55816c82e768505ddf75f0fe7c788d9f9dcb634b 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/GoodController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/GoodController.cs
@@ -38,7 +38,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class GoodController : Controller
+ public class GoodController : ControllerBase
{
private IMapper _mapper;
private readonly IHttpContextUser _user;
@@ -94,7 +94,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetAllCategories()
+ public async Task GetAllCategories()
{
var jm = new WebApiCallBack() { status = true };
@@ -135,7 +135,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = wxGoodCategoryDto;
- return Json(jm);
+ return jm;
}
#endregion
@@ -146,7 +146,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetGoodsPageList([FromBody] FMPageByWhereOrder entity)
+ public async Task GetGoodsPageList([FromBody] FMPageByWhereOrder entity)
{
var jm = new WebApiCallBack();
@@ -263,7 +263,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
};
jm.msg = "数据调用成功!";
- return Json(jm);
+ return jm;
}
#endregion
@@ -274,7 +274,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetDetial([FromBody] FMIntId entity)
+ public async Task GetDetial([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -288,7 +288,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (model == null)
{
jm.msg = "商品获取失败";
- return Json(jm);
+ return jm;
}
jm.status = true;
@@ -296,7 +296,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.data = model;
jm.methodDescription = JsonConvert.SerializeObject(_user);
- return Json(jm);
+ return jm;
}
#endregion
@@ -307,7 +307,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetProductInfo([FromBody] FMGetProductInfo entity)
+ public async Task GetProductInfo([FromBody] FMGetProductInfo entity)
{
var jm = new WebApiCallBack();
@@ -323,14 +323,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (getProductInfo == null)
{
jm.msg = "获取单个货品失败";
- return Json(jm);
+ return jm;
}
jm.status = true;
jm.msg = "获取单个货品成功";
jm.data = getProductInfo;
- return Json(jm);
+ return jm;
}
#endregion
@@ -342,7 +342,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetGoodsComment([FromBody] FMPageByIntId entity)
+ public async Task GetGoodsComment([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -366,7 +366,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
totalPages = list.TotalPages
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -377,7 +377,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetGoodsParams([FromBody] FMIntId entity)
+ public async Task GetGoodsParams([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -386,7 +386,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (goods == null)
{
jm.msg = GlobalConstVars.DataisNo;
- return Json(jm);
+ return jm;
}
var list = new List();
var goodsParams = await _goodsParamsServices.QueryAsync();
@@ -418,7 +418,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = "获取商品参数成功";
jm.data = list;
- return Json(jm);
+ return jm;
}
#endregion
@@ -428,7 +428,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetGoodsRecommendList([FromBody] FMIntId entity)
+ public async Task GetGoodsRecommendList([FromBody] FMIntId entity)
{
if (entity.id <= 0)
{
@@ -444,7 +444,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
msg = "获取成功",
data = await _goodsServices.GetGoodsRecommendList(entity.id, bl)
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -459,7 +459,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetDetialByToken([FromBody] FMIntId entity)
+ public async Task GetDetialByToken([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -473,7 +473,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (model == null)
{
jm.msg = "商品获取失败";
- return Json(jm);
+ return jm;
}
await _goodsServices.UpdateAsync(p => new CoreCmsGoods() { viewCount = p.viewCount + 1 },
@@ -485,7 +485,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.data = model;
jm.methodDescription = JsonConvert.SerializeObject(_user);
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/GroupController.cs b/CoreCms.Net.Web.WebApi/Controllers/GroupController.cs
index b2bc6ebfb7b5a4d96b6ef39a0405c0cbd12dfa58..cbeab977b6774efc0f9919eb947a6a400b23e5c7 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/GroupController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/GroupController.cs
@@ -29,7 +29,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class GroupController : Controller
+ public class GroupController : ControllerBase
{
private readonly IHttpContextUser _user;
@@ -56,11 +56,11 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetList([FromBody] FMGroupGetListPost entity)
+ public async Task GetList([FromBody] FMGroupGetListPost entity)
{
var jm = await _coreCmsPromotionServices.GetGroupList(entity.type, _user.ID, entity.status, entity.page, entity.limit);
- return Json(jm);
+ return jm;
}
#endregion
@@ -70,10 +70,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetGoodsDetial([FromBody] FMGetGoodsDetial entity)
+ public async Task GetGoodsDetial([FromBody] FMGetGoodsDetial entity)
{
var jm = await _coreCmsPromotionServices.GetGroupDetail(entity.id, 0, "group", entity.groupId);
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs b/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs
index 289cb1b49e4f43f2a261eee7769439fb5e7634cb..b33dbcbcbcda2c3c4702a84838b9b02ab08e8428 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/NoticeController.cs
@@ -30,7 +30,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class NoticeController : Controller
+ public class NoticeController : ControllerBase
{
private IHttpContextUser _user;
private ICoreCmsNoticeServices _noticeServices;
@@ -53,7 +53,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task NoticeList([FromBody] FMPageByIntId entity)
+ public async Task NoticeList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -62,7 +62,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = list;
- return Json(jm);
+ return jm;
}
diff --git a/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs b/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs
index 7b939d924d812c326ceda82c187bfa837b8afbc1..02d24721f298f2adf5d85f49670d76c54364f776 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/OrderController.cs
@@ -33,7 +33,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class OrderController : Controller
+ public class OrderController : ControllerBase
{
private readonly IHttpContextUser _user;
private readonly ICoreCmsOrderServices _orderServices;
@@ -84,10 +84,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetTaxCode([FromBody] GetTaxCodePost entity)
+ public async Task GetTaxCode([FromBody] GetTaxCodePost entity)
{
var jm = await _orderServices.GetTaxCode(entity.name);
- return Json(jm);
+ return jm;
}
#endregion
@@ -98,7 +98,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task CreateOrder([FromBody] CreateOrder entity)
+ public async Task CreateOrder([FromBody] CreateOrder entity)
{
var jm = new WebApiCallBack();
@@ -145,11 +145,11 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
jm = await _orderServices.ToAdd(_user.ID, entity.orderType, entity.cartIds, entity.receiptType,
entity.ushipId, entity.storeId, entity.ladingName, entity.ladingMobile, entity.memo,
- entity.point, entity.couponCode, entity.source, entity.taxType, entity.taxName,
- entity.taxCode, entity.teamId, entity.groupId);
+ entity.point, entity.couponCode, entity.source, entity.scene, entity.taxType, entity.taxName,
+ entity.taxCode, entity.objectId, entity.teamId);
jm.otherData = entity;
- return Json(jm);
+ return jm;
}
#endregion
@@ -160,7 +160,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task OrderDetails([FromBody] FMStringId entity)
+ public async Task OrderDetails([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
@@ -172,7 +172,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
jm.status = false;
jm.msg = "你不是店员";
- return Json(jm);
+ return jm;
}
else
{
@@ -180,7 +180,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
}
jm = await _orderServices.GetOrderInfoByOrderId(entity.id, userId);
- return Json(jm);
+ return jm;
}
#endregion
@@ -191,7 +191,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetOrderStatusNum([FromBody] GetOrderStatusNumPost entity)
+ public async Task GetOrderStatusNum([FromBody] GetOrderStatusNumPost entity)
{
var jm = new WebApiCallBack();
@@ -201,7 +201,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
var ids = CommonHelper.StringToIntArray(entity.ids);
jm = await _orderServices.GetOrderStatusNum(_user.ID, ids, entity.isAfterSale);
- return Json(jm);
+ return jm;
}
#endregion
@@ -214,10 +214,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetOrderList([FromBody] GetOrderListPost entity)
+ public async Task GetOrderList([FromBody] GetOrderListPost entity)
{
var jm = await _orderServices.GetOrderList(entity.status, _user.ID, entity.page, entity.limit);
- return Json(jm);
+ return jm;
}
#endregion
@@ -230,18 +230,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task CancelOrder([FromBody] FMStringId entity)
+ public async Task CancelOrder([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = "请提交要取消的订单号";
- return Json(jm);
+ return jm;
}
var ids = entity.id.Split(",");
jm = await _orderServices.CancelOrder(ids, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -254,19 +254,19 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task DeleteOrder([FromBody] FMStringId entity)
+ public async Task DeleteOrder([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = "请提交要取消的订单号";
- return Json(jm);
+ return jm;
}
var ids = entity.id.Split(",");
jm.status = await _orderServices.DeleteAsync(p => ids.Contains(p.orderId) && p.userId == _user.ID);
jm.msg = jm.status ? "删除成功" : "删除失败";
- return Json(jm);
+ return jm;
}
#endregion
@@ -278,17 +278,17 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task OrderConfirm([FromBody] FMStringId entity)
+ public async Task OrderConfirm([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = "请提交要确认签收的订单号";
- return Json(jm);
+ return jm;
}
jm = await _orderServices.ConfirmOrder(entity.id, Convert.ToInt32(entity.data));
- return Json(jm);
+ return jm;
}
#endregion
@@ -301,7 +301,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task AddAftersales([FromBody] ToAddBillAfterSalesPost entity)
+ public async Task AddAftersales([FromBody] ToAddBillAfterSalesPost entity)
{
var jm = new WebApiCallBack();
@@ -310,17 +310,17 @@ namespace CoreCms.Net.Web.WebApi.Controllers
{
jm.msg = GlobalErrorCodeVars.Code13100;
jm.code = 13100;
- return Json(jm);
+ return jm;
}
if (entity.type == 0)
{
jm.msg = GlobalErrorCodeVars.Code10051;
jm.code = 10051;
- return Json(jm);
+ return jm;
}
jm = await _aftersalesServices.ToAdd(_user.ID, entity.orderId, entity.type, entity.items, entity.images,
entity.reason, entity.refund);
- return Json(jm);
+ return jm;
}
@@ -334,7 +334,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task AftersalesList([FromBody] FMPageByStringId entity)
+ public async Task AftersalesList([FromBody] FMPageByStringId entity)
{
var jm = new WebApiCallBack();
@@ -357,7 +357,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
hasNextPage = data.HasNextPage
};
- return Json(jm);
+ return jm;
}
@@ -371,7 +371,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task Aftersalesinfo([FromBody] FMStringId entity)
+ public async Task Aftersalesinfo([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack { status = true, msg = "数据获取成功" };
@@ -405,7 +405,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
info,
reship
};
- return Json(jm);
+ return jm;
}
@@ -419,24 +419,24 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task SendReship([FromBody] FMBillReshipForSendReshipPost entity)
+ public async Task SendReship([FromBody] FMBillReshipForSendReshipPost entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.reshipId))
{
jm.data = jm.msg = GlobalErrorCodeVars.Code13212;
- return Json(jm);
+ return jm;
}
else if (string.IsNullOrEmpty(entity.logiCode))
{
jm.data = jm.msg = GlobalErrorCodeVars.Code13213;
- return Json(jm);
+ return jm;
}
else if (string.IsNullOrEmpty(entity.logiNo))
{
jm.data = jm.msg = GlobalErrorCodeVars.Code13214;
- return Json(jm);
+ return jm;
}
@@ -444,7 +444,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (model == null)
{
jm.data = jm.msg = GlobalErrorCodeVars.Code13211;
- return Json(jm);
+ return jm;
}
var up = await _reshipServices.UpdateAsync(
@@ -458,7 +458,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.msg = "数据保存成功";
- return Json(jm);
+ return jm;
}
#endregion
@@ -471,7 +471,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public JsonResult GetShip([FromBody] FMIntId entity)
+ public WebApiCallBack GetShip([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -484,7 +484,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.data = ship;
jm.msg = "获取成功";
}
- return Json(jm);
+ return jm;
}
@@ -498,14 +498,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task LogisticsByApi([FromBody] FMApiLogisticsByApiPost entity)
+ public async Task LogisticsByApi([FromBody] FMApiLogisticsByApiPost entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.code) || string.IsNullOrEmpty(entity.no))
{
jm.msg = GlobalErrorCodeVars.Code13225;
- return Json(jm);
+ return jm;
}
var systemLogistics = SystemSettingDictionary.GetSystemLogistics();
@@ -514,12 +514,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (entity.code == p.sKey)
{
jm.msg = p.sDescription + "不支持轨迹查询";
- return Json(jm);
+ return jm;
}
}
jm = await _logisticsServices.ExpressPoll(entity.code, entity.no, entity.mobile);
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/PageController.cs b/CoreCms.Net.Web.WebApi/Controllers/PageController.cs
index ee8cac162592e6ff825d855c99c415b500638d08..236e5051a7d6396037229d837c0118e214b84e0b 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/PageController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/PageController.cs
@@ -35,7 +35,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class PageController : Controller
+ public class PageController : ControllerBase
{
private IMapper _mapper;
private readonly ICoreCmsSettingServices _settingServices;
@@ -70,10 +70,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Description("获取页面布局数据")]
- public async Task GetPageConfig([FromBody] FMWxPost entity)
+ public async Task GetPageConfig([FromBody] FMWxPost entity)
{
var jm = await _pagesServices.GetPageConfig(entity.code);
- return Json(jm);
+ return jm;
}
#endregion
@@ -84,7 +84,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Description("获取用户购买记录")]
- public async Task GetRecod([FromBody] FMGetRecodPost entity)
+ public async Task GetRecod([FromBody] FMGetRecodPost entity)
{
var jm = new WebApiCallBack() { status = true, msg = "获取成功", otherData = entity };
@@ -148,7 +148,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.data = listUsers[listI];
}
}
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs
index fabbd8559a13681d0d8a34068795f5596f06f6db..60060680778514c0d5a4569d5293ab2519903f4d 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/AliPayController.cs
@@ -23,7 +23,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
/// 支付宝异步通知
///
[Route("Notify/[controller]/[action]")]
- public class AliPayController : Controller
+ public class AliPayController : ControllerBase
{
private readonly IAlipayNotifyClient _client;
private readonly IOptions _optionsAccessor;
diff --git a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs
index b7ea80d2d56b17133b8d3a483bfe5d62affa2a36..c8fd7ffcb59d570c683dc905ab4381088b410e8b 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs
@@ -29,7 +29,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
/// 微信支付异步通知
///
[Route("Notify/[controller]/[action]")]
- public class WeChatPayController : Controller
+ public class WeChatPayController : ControllerBase
{
private readonly ICoreCmsBillPaymentsServices _billPaymentsServices;
private readonly ICoreCmsBillRefundServices _billRefundServices;
diff --git a/CoreCms.Net.Web.WebApi/Controllers/PaymentsController.cs b/CoreCms.Net.Web.WebApi/Controllers/PaymentsController.cs
index abb4d20e89606e4d0a46d4891252b4423caea7a3..1499c08b6a26d7ec24b0957c5a0fd2a98dcd926e 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/PaymentsController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/PaymentsController.cs
@@ -33,7 +33,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class PaymentsController : Controller
+ public class PaymentsController : ControllerBase
{
private IHttpContextUser _user;
@@ -64,14 +64,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetList()
+ public async Task GetList()
{
var jm = new WebApiCallBack();
var list = await _paymentsServices.QueryListByClauseAsync(p => p.isEnable == true, p => p.sort, OrderByType.Asc);
jm.status = true;
jm.data = list;
- return Json(jm);
+ return jm;
}
#endregion
@@ -85,18 +85,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task CheckPay([FromBody] CheckPayPost entity)
+ public async Task CheckPay([FromBody] CheckPayPost entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.ids))
{
jm.msg = GlobalErrorCodeVars.Code13100;
- return Json(jm);
+ return jm;
}
jm = await _billPaymentsServices.FormatPaymentRel(entity.ids, entity.paymentType, entity.@params);
- return Json(jm);
+ return jm;
}
#endregion
@@ -109,17 +109,17 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetInfo([FromBody] FMStringId entity)
+ public async Task GetInfo([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = GlobalErrorCodeVars.Code13100;
- return Json(jm);
+ return jm;
}
var userId = entity.data.ObjectToInt(0);
jm = await _billPaymentsServices.GetInfo(entity.id, userId);
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/PinTuanController.cs b/CoreCms.Net.Web.WebApi/Controllers/PinTuanController.cs
index dfc22709a432002dedba10ffcf504a0d99374f82..05d66f618d6bcd5a963cf35e4863da010e3c976a 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/PinTuanController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/PinTuanController.cs
@@ -31,7 +31,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class PinTuanController : Controller
+ public class PinTuanController : ControllerBase
{
private readonly IHttpContextUser _user;
@@ -66,7 +66,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetList([FromBody] FMIntId entity)
+ public async Task GetList([FromBody] FMIntId entity)
{
WebApiCallBack jm;
@@ -81,7 +81,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
id = entity.id;
}
jm = await _pinTuanRuleServices.GetPinTuanList(id, userId);
- return Json(jm);
+ return jm;
}
@@ -93,7 +93,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetGoodsInfo([FromBody] FMIntId entity)
+ public async Task GetGoodsInfo([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -108,7 +108,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = "获取详情成功";
jm.data = await _pinTuanGoodsServices.GetGoodsInfo(entity.id, userId, pinTuanStatus);
- return Json(jm);
+ return jm;
}
@@ -120,7 +120,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetProductInfo([FromBody] FMGetProductInfo entity)
+ public async Task GetProductInfo([FromBody] FMGetProductInfo entity)
{
var jm = new WebApiCallBack();
@@ -128,7 +128,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (products == null)
{
jm.msg = GlobalErrorCodeVars.Code10000;
- return Json(jm);
+ return jm;
}
//把拼团的一些属性等加上
var info = await _pinTuanRuleServices.QueryMuchFirstAsync(
@@ -138,12 +138,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (info == null)
{
jm.msg = GlobalErrorCodeVars.Code10000;
- return Json(jm);
+ return jm;
}
products.pinTuanRule = info;
jm.status = true;
jm.data = products;
- return Json(jm);
+ return jm;
}
@@ -155,18 +155,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetPinTuanTeam([FromBody] FMGetPinTuanTeamPost entity)
+ public async Task GetPinTuanTeam([FromBody] FMGetPinTuanTeamPost entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.orderId) && entity.teamId == 0)
{
jm.msg = GlobalErrorCodeVars.Code15606;
- return Json(jm);
+ return jm;
}
jm = await _pinTuanRecordServices.GetTeamList(entity.teamId, entity.orderId);
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs b/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs
index 2589c2cf9699d51121df0abb80dadd659d472903..422911eaeffccac6eccb66e00a3de31894ff9d87 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/ServiceController.cs
@@ -34,7 +34,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class ServiceController : Controller
+ public class ServiceController : ControllerBase
{
private readonly ICoreCmsServicesServices _servicesServices;
private readonly ICoreCmsUserServicesOrderServices _userServicesOrderServices;
@@ -81,7 +81,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
//[Authorize]
- public async Task GetPageList([FromBody] FMPageByIntId entity)
+ public async Task GetPageList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -134,7 +134,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
list = list,
count = list.TotalCount,
};
- return Json(jm);
+ return jm;
}
@@ -147,7 +147,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
//[Authorize]
- public async Task GetDetails([FromBody] FMIntId entity)
+ public async Task GetDetails([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -184,7 +184,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = data;
- return Json(jm);
+ return jm;
}
@@ -199,7 +199,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task AddServiceOrder([FromBody] FMIntId entity)
+ public async Task AddServiceOrder([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -208,20 +208,20 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (data == null)
{
jm.msg = "服务数据获取失败";
- return Json(jm);
+ return jm;
}
var user = await _userServices.QueryByIdAsync(_user.ID);
if (user == null)
{
jm.msg = "用户数据获取失败";
- return Json(jm);
+ return jm;
}
if (!data.allowedMembership.Contains("," + user.grade + ","))
{
jm.msg = "您所在的用户级别不支持购买";
- return Json(jm);
+ return jm;
}
var order = new CoreCmsUserServicesOrder();
@@ -236,7 +236,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = bl;
jm.data = order.serviceOrderId;
- return Json(jm);
+ return jm;
}
@@ -251,10 +251,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task VerificationPageList([FromBody] FMPageByIntId entity)
+ public async Task VerificationPageList([FromBody] FMPageByIntId entity)
{
var jm = await _ticketVerificationLogServices.GetVerificationLogs(_user.ID, entity.page, entity.limit);
- return Json(jm);
+ return jm;
}
#endregion
@@ -265,10 +265,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task LogDelete([FromBody] FMIntId entity)
+ public async Task LogDelete([FromBody] FMIntId entity)
{
var jm = await _ticketVerificationLogServices.LogDelete(entity.id, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -280,21 +280,21 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetTicketInfo([FromBody] FMStringId entity)
+ public async Task GetTicketInfo([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = "请提交查询数据关键词";
- return Json(jm);
+ return jm;
}
var ticket = await _userServicesTicketServices.QueryByClauseAsync(p => p.redeemCode == entity.id);
if (ticket == null)
{
jm.msg = "未查询到服务券";
- return Json(jm);
+ return jm;
}
ticket.statusStr = EnumHelper.GetEnumDescriptionByValue(ticket.status);
@@ -311,7 +311,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
serviceOrder
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -322,53 +322,53 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task VerificationTicket([FromBody] FMStringId entity)
+ public async Task VerificationTicket([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = "请提交查询数据关键词";
- return Json(jm);
+ return jm;
}
var ticket = await _userServicesTicketServices.QueryByClauseAsync(p => p.redeemCode == entity.id);
if (ticket == null)
{
jm.msg = "未查询到服务券";
- return Json(jm);
+ return jm;
}
if (ticket.status != (int)GlobalEnumVars.ServicesTicketStatus.Normal)
{
jm.msg = "服务券状态不支持核销";
- return Json(jm);
+ return jm;
}
var service = await _servicesServices.QueryByIdAsync(ticket.serviceId);
if (service == null)
{
jm.msg = "服务项目获取失败";
- return Json(jm);
+ return jm;
}
var user = await _userServices.QueryByIdAsync(_user.ID);
if (user == null)
{
jm.msg = "未获取到审核权限";
- return Json(jm);
+ return jm;
}
var clerk = await _clerkServices.QueryByClauseAsync(p => p.userId == user.id);
if (clerk == null)
{
jm.msg = "非门店店员无权限核验";
- return Json(jm);
+ return jm;
}
if (!service.consumableStore.Contains("," + clerk.storeId + ","))
{
jm.msg = "您所在的门店无权核销此券";
- return Json(jm);
+ return jm;
}
//开始更新数据
@@ -395,7 +395,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = up && bl;
jm.msg = jm.status ? "核销成功" : "核销失败";
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/StoreController.cs b/CoreCms.Net.Web.WebApi/Controllers/StoreController.cs
index 1abca4582b5189c5fc6600edd8fac587f7deda20..b3f6710d771b16b0c7f4b42bea03fdacfb3bf1dc 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/StoreController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/StoreController.cs
@@ -35,7 +35,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class StoreController : Controller
+ public class StoreController : ControllerBase
{
private readonly IHttpContextUser _user;
private readonly ICoreCmsStoreServices _storeServices;
@@ -70,7 +70,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetDefaultStore()
+ public async Task GetDefaultStore()
{
var jm = new WebApiCallBack();
@@ -78,7 +78,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = ship;
- return Json(jm);
+ return jm;
}
#endregion
@@ -88,7 +88,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetStoreList([FromBody] FMGetStoreQueryPageByCoordinate entity)
+ public async Task GetStoreList([FromBody] FMGetStoreQueryPageByCoordinate entity)
{
var jm = new WebApiCallBack();
try
@@ -135,7 +135,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = GlobalConstVars.DataHandleEx;
jm.data = e.ToString();
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -145,7 +145,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetRecommendKeys()
+ public async Task GetRecommendKeys()
{
var jm = new WebApiCallBack();
@@ -155,7 +155,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = "获取成功";
jm.data = !string.IsNullOrEmpty(recommendKeysStr) ? recommendKeysStr.Split("|") : new string[] { };
- return Json(jm);
+ return jm;
}
#endregion
@@ -165,13 +165,13 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetStoreSwitch()
+ public async Task GetStoreSwitch()
{
var jm = new WebApiCallBack { status = true, msg = "获取成功" };
var allConfigs = await _settingServices.GetConfigDictionaries();
jm.data = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.StoreSwitch).ObjectToInt(2); ;
- return Json(jm);
+ return jm;
}
#endregion
@@ -181,7 +181,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetStoreById([FromBody] FMIntId entity)
+ public async Task GetStoreById([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack
{
@@ -189,7 +189,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
msg = "获取成功",
data = await _storeServices.QueryByClauseAsync(p => p.id == entity.id)
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -202,10 +202,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task IsClerk()
+ public async Task IsClerk()
{
var jm = await _clerkServices.IsClerk(_user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -216,7 +216,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetStoreByUserId()
+ public async Task GetStoreByUserId()
{
var jm = new WebApiCallBack
{
@@ -224,7 +224,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
msg = "获取成功",
data = await _storeServices.GetStoreByUserId(_user.ID)
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -236,7 +236,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetOrderPageByMerchant([FromBody] GetOrderPageByMerchantPost entity)
+ public async Task GetOrderPageByMerchant([FromBody] GetOrderPageByMerchantPost entity)
{
var jm = new WebApiCallBack();
@@ -251,7 +251,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = "你不是店员";
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -263,10 +263,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task StoreLadingList([FromBody] FMPageByIntId entity)
+ public async Task StoreLadingList([FromBody] FMPageByIntId entity)
{
var jm = await _billLadingServices.GetStoreLadingList(_user.ID, entity.page, entity.limit);
- return Json(jm);
+ return jm;
}
#endregion
@@ -277,10 +277,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task LadingDelete([FromBody] FMStringId entity)
+ public async Task LadingDelete([FromBody] FMStringId entity)
{
var jm = await _billLadingServices.LadingDelete(entity.id, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -291,18 +291,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task LadingInfo([FromBody] FMStringId entity)
+ public async Task LadingInfo([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = "请提交查询数据关键词";
- return Json(jm);
+ return jm;
}
jm = await _billLadingServices.GetInfo(entity.id, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -313,21 +313,21 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task Lading([FromBody] FMStringId entity)
+ public async Task Lading([FromBody] FMStringId entity)
{
var jm = new WebApiCallBack();
if (string.IsNullOrEmpty(entity.id))
{
jm.msg = "请提交查询数据关键词";
- return Json(jm);
+ return jm;
}
var array = entity.id.Split(",");
var result = await _billLadingServices.LadingOperating(array, _user.ID);
jm.status = result.code == 0;
jm.msg = result.msg;
- return Json(jm);
+ return jm;
}
#endregion
diff --git a/CoreCms.Net.Web.WebApi/Controllers/UserController.cs b/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
index 5a372e9016f3fe6f51c6a4b8a156eb782e342f7d..5ba43244719986da6ae2882dc4446c6ed3f7ae00 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/UserController.cs
@@ -51,7 +51,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Route("api/[controller]/[action]")]
[ApiController]
- public class UserController : Controller
+ public class UserController : ControllerBase
{
private readonly ICoreCmsUserWeChatInfoServices _userWeChatInfoServices;
@@ -163,7 +163,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task OnLogin([FromBody] FMWxPost entity)
+ public async Task OnLogin([FromBody] FMWxPost entity)
{
var jm = new WebApiCallBack();
@@ -230,12 +230,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
log.parameters = GlobalEnumVars.UserLogTypes.登录.ToString();
await _userLogServices.InsertAsync(log);
- return Json(jm);
+ return jm;
}
}
//注意:生产环境下SessionKey属于敏感信息,不能进行传输!
- //return Json(new { success = true, msg = "OK", sessionAuthId = sessionBag.Key, sessionKey = sessionBag.SessionKey, data = jsonResult, sessionBag = sessionBag });
+ //return new JsonResult(new { success = true, msg = "OK", sessionAuthId = sessionBag.Key, sessionKey = sessionBag.SessionKey, data = jsonResult, sessionBag = sessionBag });
jm.status = true;
jm.data = response.OpenId;
jm.otherData = response.OpenId;
@@ -247,7 +247,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = response.ErrorMessage;
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -258,7 +258,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task DecodeEncryptedData([FromBody] FMWxLoginDecodeEncryptedData entity)
+ public async Task DecodeEncryptedData([FromBody] FMWxLoginDecodeEncryptedData entity)
{
var jm = new WebApiCallBack();
@@ -324,7 +324,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
await _userWeChatInfoServices.UpdateAsync(p => new CoreCmsUserWeChatInfo() { mobile = user.mobile }, p => p.id == userInfo.id);
}
- return Json(jm);
+ return jm;
}
}
}
@@ -334,7 +334,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
token,
sessionAuthId = userWxId
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -345,13 +345,13 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task SendSms([FromBody] FMWxSendSMS entity)
+ public async Task SendSms([FromBody] FMWxSendSMS entity)
{
var jm = new WebApiCallBack();
if (!CommonHelper.IsMobile(entity.mobile))
{
jm.msg = "请输入合法的手机号码";
- return Json(jm);
+ return jm;
}
if (entity.code == "login")
{
@@ -359,11 +359,11 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (shave)
{
jm.msg = "手机号码已被绑定,请更换";
- return Json(jm);
+ return jm;
}
}
jm = await _smsServices.DoSendSms(entity.code, entity.mobile);
- return Json(jm);
+ return jm;
}
#endregion
@@ -374,10 +374,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task SmsLogin([FromBody] FMWxAccountCreate entity)
+ public async Task SmsLogin([FromBody] FMWxAccountCreate entity)
{
var jm = await _userServices.SmsLogin(entity, 2, entity.platform);
- return Json(jm);
+ return jm;
}
#endregion
@@ -390,7 +390,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task DecryptPhoneNumber([FromBody] FMWxLoginDecryptPhoneNumber entity)
+ public async Task DecryptPhoneNumber([FromBody] FMWxLoginDecryptPhoneNumber entity)
{
var jm = new WebApiCallBack();
@@ -410,7 +410,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = false;
jm.code = 500;
NLogUtil.WriteAll(LogLevel.Error, LogType.Web, "小程序接口", "微信小程序授权拉取手机号码", ex);
- return Json(jm);
+ return jm;
}
var data = new FMWxAccountCreate
@@ -422,7 +422,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm = await _userServices.SmsLogin(data, (int)GlobalEnumVars.LoginType.WeChatPhoneNumber, 1);
- return Json(jm);
+ return jm;
}
@@ -436,20 +436,20 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Obsolete]
[HttpPost]
- public async Task SmsLogin2([FromBody] FMWxAccountCreate entity)
+ public async Task SmsLogin2([FromBody] FMWxAccountCreate entity)
{
var jm = new WebApiCallBack();
if (!CommonHelper.IsMobile(entity.mobile))
{
jm.msg = "请输入合法的手机号码";
- return Json(jm);
+ return jm;
}
var user = await _userServices.QueryByClauseAsync(p => p.mobile == entity.mobile);
if (user != null)
{
jm.msg = "此号码已经绑定,请更换";
- return Json(jm);
+ return jm;
}
var wxUserInfo = new CoreCmsUserWeChatInfo();
//1就是h5登陆(h5端和微信公众号端),2就是微信小程序登陆,3是支付宝小程序,4是app,5是pc
@@ -458,7 +458,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (string.IsNullOrEmpty(entity.sessionAuthId))
{
jm.msg = "用户未正确登陆";
- return Json(jm);
+ return jm;
}
wxUserInfo = await _userWeChatInfoServices.QueryByClauseAsync(p => p.openid == entity.sessionAuthId);
}
@@ -466,19 +466,19 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (sms == null)
{
jm.msg = "验证码核验失败";
- return Json(jm);
+ return jm;
}
if (sms.isUsed)
{
jm.msg = "验证码已被使用";
- return Json(jm);
+ return jm;
}
var dt = DateTime.Now;
var endDt = sms.createTime.AddMinutes(10);
if (dt > endDt)
{
jm.msg = "验证码已过期,请重新获取";
- return Json(jm);
+ return jm;
}
user = new CoreCmsUser();
user.mobile = entity.mobile;
@@ -536,7 +536,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = "注册失败";
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -548,11 +548,11 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task GetAreaId([FromBody] GetAreaIdPost entity)
+ public async Task GetAreaId([FromBody] GetAreaIdPost entity)
{
var jm = await _areaServices.GetAreaId(entity.provinceName, entity.cityName, entity.countyName, entity.postalCode);
- return Json(jm);
+ return jm;
}
#endregion
@@ -562,7 +562,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public JsonResult LogOut()
+ public WebApiCallBack LogOut()
{
var jm = new WebApiCallBack
{
@@ -573,7 +573,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -583,14 +583,14 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public async Task IsPoint()
+ public async Task IsPoint()
{
var jm = new WebApiCallBack { status = true, msg = "获取成功" };
var allConfigs = await _settingServices.GetConfigDictionaries();
jm.data = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.PointSwitch).ObjectToInt(2); ;
- return Json(jm);
+ return jm;
}
#endregion
@@ -619,7 +619,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
/// array
[HttpPost]
- public async Task Share([FromBody] FMShare entity)
+ public async Task Share([FromBody] FMShare entity)
{
var jm = new WebApiCallBack();
@@ -641,7 +641,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm = await _shareServices.PosterShare(entity.client, entity.page, userShareCode, entity.url, entity.@params);
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -653,7 +653,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
///
[HttpPost]
- public JsonResult DeShare([FromBody] FMDeShare entity)
+ public WebApiCallBack DeShare([FromBody] FMDeShare entity)
{
var jm = new WebApiCallBack();
@@ -663,7 +663,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
jm = _shareServices.de_url(entity.code);
- return Json(jm);
+ return jm;
}
#endregion
@@ -678,7 +678,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[Authorize]
[HttpPost]
- public async Task SyncWeChatInfo([FromBody] FMWxSync entity)
+ public async Task SyncWeChatInfo([FromBody] FMWxSync entity)
{
var jm = new WebApiCallBack();
@@ -720,7 +720,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = user;
- return Json(jm);
+ return jm;
}
#endregion
@@ -732,7 +732,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetUserInfo()
+ public async Task GetUserInfo()
{
var jm = new WebApiCallBack() { status = true };
var user = await _userServices.QueryByIdAsync(_user.ID);
@@ -741,7 +741,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = false;
jm.msg = "用户信息获取失败";
jm.code = 14007;
- return Json(jm);
+ return jm;
}
//获取用户等级
var userGrade = await _userGradeServices.QueryByClauseAsync(p => p.id == user.grade);
@@ -778,7 +778,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
footPrintCount,
collectionCount
};
- return Json(jm);
+ return jm;
}
#endregion
@@ -789,7 +789,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetCartNumber()
+ public async Task GetCartNumber()
{
var jm = new WebApiCallBack();
@@ -798,7 +798,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = jm.status ? GlobalConstVars.GetDataSuccess : GlobalConstVars.GetDataFailure;
jm.data = count;
- return Json(jm);
+ return jm;
}
#endregion
@@ -809,7 +809,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GoodsCollectionCreateOrDelete([FromBody] FMIntId entity)
+ public async Task GoodsCollectionCreateOrDelete([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -820,7 +820,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
if (goods == null)
{
jm.msg = GlobalErrorCodeVars.Code17001;
- return Json(jm);
+ return jm;
}
collection = new CoreCmsGoodsCollection()
@@ -840,7 +840,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
jm.status = true;
- return Json(jm);
+ return jm;
}
@@ -853,7 +853,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetUserDefaultShip()
+ public async Task GetUserDefaultShip()
{
var jm = new WebApiCallBack();
@@ -871,7 +871,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = ship;
- return Json(jm);
+ return jm;
}
#endregion
@@ -882,7 +882,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task SetDefShip([FromBody] FMIntId entity)
+ public async Task SetDefShip([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -900,7 +900,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = "该地址不存在";
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -912,7 +912,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetUserPoint([FromBody] GetUserPointPost entity)
+ public async Task GetUserPoint([FromBody] GetUserPointPost entity)
{
var jm = new WebApiCallBack();
@@ -920,7 +920,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = ship;
- return Json(jm);
+ return jm;
}
#endregion
@@ -931,7 +931,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetUserShip()
+ public async Task GetUserShip()
{
var jm = new WebApiCallBack();
@@ -950,7 +950,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = ship;
- return Json(jm);
+ return jm;
}
#endregion
@@ -962,7 +962,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task SaveUserShip([FromBody] SaveUserShipPost entity)
+ public async Task SaveUserShip([FromBody] SaveUserShipPost entity)
{
var jm = new WebApiCallBack();
@@ -1008,7 +1008,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.msg = "地址保存成功";
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -1020,7 +1020,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetShipDetail([FromBody] FMIntId entity)
+ public async Task GetShipDetail([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -1037,7 +1037,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm.status = true;
jm.data = ship;
- return Json(jm);
+ return jm;
}
#endregion
@@ -1048,7 +1048,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task RemoveShip([FromBody] FMIntId entity)
+ public async Task RemoveShip([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
@@ -1064,7 +1064,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
await _userShipServices.UpdateAsync(p => new CoreCmsUserShip() { isDefault = true }, p => p.userId == _user.ID);
}
}
- return Json(jm);
+ return jm;
}
#endregion
@@ -1076,7 +1076,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task Pay([FromBody] PayPost entity)
+ public async Task Pay([FromBody] PayPost entity)
{
var jm = new WebApiCallBack();
@@ -1099,7 +1099,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
jm = await _billPaymentsServices.Pay(entity.ids, entity.payment_code, _user.ID, entity.payment_type,
entity.@params);
- return Json(jm);
+ return jm;
}
#endregion
@@ -1112,7 +1112,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task OrderEvaluate([FromBody] OrderEvaluatePost entity)
+ public async Task OrderEvaluate([FromBody] OrderEvaluatePost entity)
{
var jm = new WebApiCallBack();
@@ -1128,7 +1128,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
}
jm = await _goodsCommentServices.AddComment(entity.orderId, entity.items, _user.ID);
jm.otherData = entity;
- return Json(jm);
+ return jm;
}
#endregion
@@ -1140,10 +1140,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetMyBankcardsList()
+ public async Task GetMyBankcardsList()
{
var jm = await _userBankCardServices.GetMyBankcardsList(_user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -1155,13 +1155,13 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task AddBankCards([FromBody] CoreCmsUserBankCard entity)
+ public async Task AddBankCards([FromBody] CoreCmsUserBankCard entity)
{
var jm = new WebApiCallBack();
entity.userId = _user.ID;
jm = await _userBankCardServices.AddBankCards(entity);
- return Json(jm);
+ return jm;
}
@@ -1174,18 +1174,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task SetDefaultBankCard([FromBody] FMIntId entity)
+ public async Task SetDefaultBankCard([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
if (entity.id == 0)
{
jm.msg = GlobalErrorCodeVars.Code10051;
- return Json(jm);
+ return jm;
}
jm = await _userBankCardServices.SetDefault(_user.ID, entity.id);
- return Json(jm);
+ return jm;
}
@@ -1198,18 +1198,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetBankCardInfo([FromBody] FMIntId entity)
+ public async Task GetBankCardInfo([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
if (entity.id == 0)
{
jm.msg = GlobalErrorCodeVars.Code10051;
- return Json(jm);
+ return jm;
}
jm = await _userBankCardServices.GetBankcardInfo(_user.ID, entity.id);
- return Json(jm);
+ return jm;
}
@@ -1222,10 +1222,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GetDefaultBankCard()
+ public async Task GetDefaultBankCard()
{
var jm = await _userBankCardServices.GetDefaultBankCard(_user.ID);
- return Json(jm);
+ return jm;
}
@@ -1238,10 +1238,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task Removebankcard([FromBody] FMIntId entity)
+ public async Task Removebankcard([FromBody] FMIntId entity)
{
var jm = await _userBankCardServices.Removebankcard(entity.id, _user.ID);
- return Json(jm);
+ return jm;
}
#endregion
@@ -1253,10 +1253,10 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public JsonResult GetBankCardsOrganization([FromBody] FMStringId entity)
+ public WebApiCallBack GetBankCardsOrganization([FromBody] FMStringId entity)
{
var jm = _userBankCardServices.BankCardsOrganization(entity.id);
- return Json(jm);
+ return jm;
}
#endregion
@@ -1268,13 +1268,13 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task Cash([FromBody] FMIntId entity)
+ public async Task Cash([FromBody] FMIntId entity)
{
var jm = new WebApiCallBack();
var money = entity.data.ObjectToDecimal(0);
jm = await _userTocashServices.Tocash(_user.ID, money, entity.id);
- return Json(jm);
+ return jm;
}
#endregion
@@ -1286,12 +1286,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task CashList([FromBody] FMPageByIntId entity)
+ public async Task CashList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
jm = await _userTocashServices.UserToCashList(_user.ID, entity.page, entity.limit, entity.id);
- return Json(jm);
+ return jm;
}
@@ -1304,7 +1304,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task UserBalance([FromBody] FMGetBalancePost entity)
+ public async Task UserBalance([FromBody] FMGetBalancePost entity)
{
var jm = new WebApiCallBack();
@@ -1357,7 +1357,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
data.TotalPages,
sunMoney
};
- return Json(jm);
+ return jm;
}
@@ -1370,7 +1370,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task UserInvoiceList([FromBody] FMPageByIntId entity)
+ public async Task UserInvoiceList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -1404,7 +1404,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
data.TotalCount,
data.TotalPages
};
- return Json(jm);
+ return jm;
}
@@ -1417,7 +1417,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task UserPointLog([FromBody] FMPageByIntId entity)
+ public async Task UserPointLog([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -1439,7 +1439,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
data.TotalCount,
data.TotalPages
};
- return Json(jm);
+ return jm;
}
@@ -1452,7 +1452,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///
[HttpPost]
[Authorize]
- public async Task GoodsCollectionList([FromBody] FMPageByIntId entity)
+ public async Task GoodsCollectionList([FromBody] FMPageByIntId entity)
{
var jm = new WebApiCallBack();
@@ -1465,7 +1465,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers
count = data.TotalCount,
};
- return Json(jm);
+ return jm;
}
@@ -1478,12 +1478,12 @@ namespace CoreCms.Net.Web.WebApi.Controllers
///