diff --git a/CoreCms.Net.Configuration/GlobalEnumVars.cs b/CoreCms.Net.Configuration/GlobalEnumVars.cs
index fa1c5e53..21ef2068 100644
--- a/CoreCms.Net.Configuration/GlobalEnumVars.cs
+++ b/CoreCms.Net.Configuration/GlobalEnumVars.cs
@@ -2957,158 +2957,6 @@ namespace CoreCms.Net.Configuration
}
- #endregion
-
- #region 自定义交易组件
-
- ///
- /// 售后订单状态
- ///
- public enum ShopAftersaleAddStatus
- {
- 未受理 = 0,
- 用户取消 = 1,
- 商家受理中 = 2,
- 商家逾期未处理 = 3,
- 商家拒绝退款 = 4,
- 商家拒绝退货退款 = 5,
- 待买家退货 = 6,
- 退货退款关闭 = 7,
- 待商家收货 = 8,
- 商家退款中 = 11,
- 商家逾期未退款 = 12,
- 退款完成 = 13,
- 退货退款完成 = 14,
- 换货完成 = 15,
- 待商家发货 = 16,
- 待用户确认收货 = 17,
- 商家拒绝换货 = 18,
- 商家已收到货 = 19
- }
- ///
- /// 售后类型
- ///
- public enum ShopAftersaleAddType
- {
- 退款 = 0,
- 退款退货 = 1,
- 换货 = 2
- }
-
-
- ///
- /// 品牌审核-认证审核类型
- ///
- public enum RegisterType
- {
- 国内品牌申请R标 = 1,
- 国内品牌申请TM标 = 2,
- 海外品牌申请R标 = 3,
- 海外品牌申请TM标 = 4
- }
-
- ///
- /// 品牌审核-商标分类
- ///
- public enum TrademarkType
- {
- 第1类 = 1,
- 第2类 = 2,
- 第3类 = 3,
- 第4类 = 4,
- 第5类 = 5,
- 第6类 = 6,
- 第7类 = 7,
- 第8类 = 8,
- 第9类 = 9,
- 第10类 = 10,
- 第11类 = 11,
- 第12类 = 12,
- 第13类 = 13,
- 第14类 = 14,
- 第15类 = 15,
- 第16类 = 16,
- 第17类 = 17,
- 第18类 = 18,
- 第19类 = 19,
- 第20类 = 20,
- 第21类 = 21,
- 第22类 = 22,
- 第23类 = 23,
- 第24类 = 24,
- 第25类 = 25,
- 第26类 = 26,
- 第27类 = 27,
- 第28类 = 28,
- 第29类 = 29,
- 第30类 = 30,
- 第31类 = 31,
- 第32类 = 32,
- 第33类 = 33,
- 第34类 = 34,
- 第35类 = 35,
- 第36类 = 36,
- 第37类 = 37,
- 第38类 = 38,
- 第39类 = 39,
- 第40类 = 40,
- 第41类 = 41,
- 第42类 = 42,
- 第43类 = 43,
- 第44类 = 44,
- 第45类 = 45,
- }
-
- ///
- /// 品牌审核-品牌经营类型
- ///
- public enum BrandManagementType
- {
- 自有品牌 = 1,
- 代理品牌 = 2,
- 无品牌 = 3
- }
-
- ///
- /// 品牌审核-商品产地是否进口
- ///
- public enum CommodityOriginType
- {
- 是 = 1,
- 否 = 2
- }
-
-
- ///
- /// 下单前置检查-是否需要推单
- ///
- public enum RequireOrderType
- {
- 需要 = 1,
- 不需要 = 2
- }
-
- ///
- /// 下单前置检查-商户订单类型(原则上只能是1,应为官方文档说以后只有1,所以我们也只是用1)
- ///
- public enum RequiredFundType
- {
- 非二级商户号订单 = 0,
- 二级商户号订单 = 1,
- 两种方式皆可 = 2,
- }
-
- ///
- /// 下单前置检查-商户订单类型(原则上只能是1,应为官方文档说以后只有1,所以我们也只是用1)
- ///
- public enum PayMethodType
- {
- 微信支付 = 0,
- 货到付款 = 1,
- 商家会员储蓄卡 = 2,
- }
-
-
#endregion
#region 佣金相关
@@ -3169,7 +3017,6 @@ namespace CoreCms.Net.Configuration
#endregion
-
#region 公众号
///
/// 公众号所属类型
diff --git a/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs b/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs
index 1f901957..853e7a90 100644
--- a/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs
+++ b/CoreCms.Net.Core/Config/RedisMessageQueueSetup.cs
@@ -34,10 +34,6 @@ namespace CoreCms.Net.Core.Config
typeof(OrderAutomaticDeliverySubscribe),
typeof(OrderFinishCommandSubscribe),
typeof(OrderPrintSubscribe),
- typeof(TCOrderAfterSaleCreateSyncSubscribe),
- typeof(TCOrderDeliveryRecieveSyncSubscribe),
- typeof(TCOrderShipSyncSubscribe),
- //typeof(TCPayOrderSyncSubscribe),
typeof(UserSubscribe),
typeof(WeChatPayNoticeSubscribe),
typeof(SendWxTemplateMessageSubscribe),
diff --git a/CoreCms.Net.IRepository/Order/ICoreCmsCheckBeforeAddOrderRepository.cs b/CoreCms.Net.IRepository/Order/ICoreCmsCheckBeforeAddOrderRepository.cs
deleted file mode 100644
index 30ac56a5..00000000
--- a/CoreCms.Net.IRepository/Order/ICoreCmsCheckBeforeAddOrderRepository.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/6/29 16:22:45
- * 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 ICoreCmsCheckBeforeAddOrderRepository : IBaseRepository
- {
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentAuditCategoryAuditLogRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentAuditCategoryAuditLogRepository.cs
deleted file mode 100644
index 0cf14b4e..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentAuditCategoryAuditLogRepository.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:53:11
- * Description: 暂无
- ***********************************************************************/
-
-using CoreCms.Net.Model.Entities;
-
-namespace CoreCms.Net.IRepository
-{
- ///
- /// 工厂接口
- ///
- public interface
- IWeChatTransactionComponentAuditCategoryAuditLogRepository : IBaseRepository<
- WeChatTransactionComponentAuditCategoryAuditLog>
- {
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentAuditCategoryRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentAuditCategoryRepository.cs
deleted file mode 100644
index c4204a92..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentAuditCategoryRepository.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/14 23:14:23
- * 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 IWeChatTransactionComponentAuditCategoryRepository : IBaseRepository
- {
- #region 重写增删改查操作===========================================================
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(WeChatTransactionComponentAuditCategory entity);
-
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- Task DeleteByIdAsync(object id);
-
- #endregion
-
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentBrandAuditLogRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentBrandAuditLogRepository.cs
deleted file mode 100644
index 7c5bd2db..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentBrandAuditLogRepository.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/21 3:30: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 IWeChatTransactionComponentBrandAuditLogRepository : IBaseRepository
- {
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentBrandAuditRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentBrandAuditRepository.cs
deleted file mode 100644
index f006d14b..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentBrandAuditRepository.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/20 1:01:47
- * 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 IWeChatTransactionComponentBrandAuditRepository : IBaseRepository
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- Task InsertAsync(WeChatTransactionComponentBrandAudit entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(WeChatTransactionComponentBrandAudit entity);
-
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- Task DeleteByIdAsync(object id);
-
- #endregion
-
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentDeliveryCompanyRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentDeliveryCompanyRepository.cs
deleted file mode 100644
index 7c65db5e..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentDeliveryCompanyRepository.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/11 23:48:58
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.ViewModels.Basics;
-using SqlSugar;
-
-
-namespace CoreCms.Net.IRepository
-{
- ///
- /// 自定义交易组件快递公司 工厂接口
- ///
- public interface IWeChatTransactionComponentDeliveryCompanyRepository : IBaseRepository
- {
-
- #region 获取缓存的所有数据==========================================================
-
- ///
- /// 获取缓存的所有数据
- ///
- ///
- Task> GetCaChe();
-
- #endregion
-
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodAuditLogRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodAuditLogRepository.cs
deleted file mode 100644
index 44f11679..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodAuditLogRepository.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:18:06
- * Description: 暂无
- ***********************************************************************/
-
-using CoreCms.Net.Model.Entities;
-
-namespace CoreCms.Net.IRepository
-{
- ///
- /// 自定义交易组件商品审核回调 工厂接口
- ///
- public interface
- IWeChatTransactionComponentGoodAuditLogRepository : IBaseRepository
- {
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodRepository.cs
deleted file mode 100644
index 112619dc..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodRepository.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/4 1:24:53
- * 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 IWeChatTransactionComponentGoodRepository : IBaseRepository
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- Task InsertAsync(WeChatTransactionComponentGood entity);
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(WeChatTransactionComponentGood entity);
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- Task DeleteByIdAsync(object id);
-
- #endregion
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodSKURepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodSKURepository.cs
deleted file mode 100644
index 5da7b51d..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentGoodSKURepository.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/5 23:23:30
- * 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
-{
- ///
- /// 自定义交易组件商品关联sku列表 工厂接口
- ///
- public interface IWeChatTransactionComponentGoodSKURepository : IBaseRepository
- {
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(List entity);
-
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentOrderRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentOrderRepository.cs
deleted file mode 100644
index 8c399d3a..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentOrderRepository.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 23:44:16
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Model.Entities;
-using SqlSugar;
-
-
-namespace CoreCms.Net.IRepository
-{
- ///
- /// 自定义交易组件提交订单 工厂接口
- ///
- public interface IWeChatTransactionComponentOrderRepository : IBaseRepository
- {
- }
-}
diff --git a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentThirdCategoryRepository.cs b/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentThirdCategoryRepository.cs
deleted file mode 100644
index 7c782407..00000000
--- a/CoreCms.Net.IRepository/WeChat/IWeChatTransactionComponentThirdCategoryRepository.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/3 16:30:55
- * 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 IWeChatTransactionComponentThirdCategoryRepository : IBaseRepository
- {
-
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
-
- }
-}
diff --git a/CoreCms.Net.IServices/Bill/ICoreCmsBillDeliveryServices.cs b/CoreCms.Net.IServices/Bill/ICoreCmsBillDeliveryServices.cs
index 6fca4f60..e5aeb596 100644
--- a/CoreCms.Net.IServices/Bill/ICoreCmsBillDeliveryServices.cs
+++ b/CoreCms.Net.IServices/Bill/ICoreCmsBillDeliveryServices.cs
@@ -34,7 +34,7 @@ namespace CoreCms.Net.IServices
/// 省市区id
/// 收货地址
/// 发货描述
- /// 直播物流编码
+ /// 第三方对接物流编码
///
Task BatchShip(string[] orderId, string logiCode, string logiNo, Dictionary items,
int storeId = 0, string shipName = "", string shipMobile = "", int shipAreaId = 0, string shipAddress = "",
@@ -54,7 +54,7 @@ namespace CoreCms.Net.IServices
/// 省市区id
/// 收货地址
/// 发货描述
- /// 直播物流编码
+ /// 第三方对接物流编码
///
Task Ship(string orderId, string logiCode, string logiNo, Dictionary items,
int storeId = 0, string shipName = "", string shipMobile = "", int shipAreaId = 0, string shipAddress = "",
diff --git a/CoreCms.Net.IServices/Order/ICoreCmsCheckBeforeAddOrderServices.cs b/CoreCms.Net.IServices/Order/ICoreCmsCheckBeforeAddOrderServices.cs
deleted file mode 100644
index c410ee4d..00000000
--- a/CoreCms.Net.IServices/Order/ICoreCmsCheckBeforeAddOrderServices.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/6/29 16:22:45
- * 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 ICoreCmsCheckBeforeAddOrderServices : IBaseServices
- {
- }
-}
diff --git a/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs b/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
index 27062b78..5c7cec56 100644
--- a/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
+++ b/CoreCms.Net.IServices/Order/ICoreCmsOrderServices.cs
@@ -213,7 +213,7 @@ namespace CoreCms.Net.IServices
/// 发货描述
/// 店铺收货地址
/// 省市区id
- /// 直播物流编码
+ /// 第三方对接物流编码
///
Task BatchShip(string[] ids, string logiCode, string logiNo,
Dictionary items, string shipName, string shipMobile, string shipAddress, string memo,
@@ -232,7 +232,7 @@ namespace CoreCms.Net.IServices
/// 发货描述
/// 店铺收货地址
/// 省市区id
- /// 直播物流编码
+ /// 第三方对接物流编码
///
Task Ship(string ids, string logiCode, string logiNo,
Dictionary items, string shipName, string shipMobile, string shipAddress, string memo,
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentAuditCategoryAuditLogServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentAuditCategoryAuditLogServices.cs
deleted file mode 100644
index e26085df..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentAuditCategoryAuditLogServices.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:54:37
- * 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 IWeChatTransactionComponentAuditCategoryAuditLogServices : IBaseServices
- {
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentAuditCategoryServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentAuditCategoryServices.cs
deleted file mode 100644
index e6e2de24..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentAuditCategoryServices.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/14 23:14:23
- * 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 IWeChatTransactionComponentAuditCategoryServices : IBaseServices
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- Task InsertAsync(WeChatTransactionComponentAuditCategory entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(WeChatTransactionComponentAuditCategory entity);
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- Task DeleteByIdAsync(object id);
-
- #endregion
-
-
- ///
- /// 刷新审核状态
- ///
- /// 实体数据
- ///
- Task RefreshStatus(WeChatTransactionComponentAuditCategory entity);
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
- #endregion
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentBrandAuditLogServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentBrandAuditLogServices.cs
deleted file mode 100644
index 593758df..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentBrandAuditLogServices.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/21 3:30: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 IWeChatTransactionComponentBrandAuditLogServices : IBaseServices
- {
-
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentBrandAuditServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentBrandAuditServices.cs
deleted file mode 100644
index 136c9aaf..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentBrandAuditServices.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/20 1:01:47
- * 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 IWeChatTransactionComponentBrandAuditServices : IBaseServices
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- Task InsertAsync(WeChatTransactionComponentBrandAudit entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(WeChatTransactionComponentBrandAudit entity);
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- Task DeleteByIdAsync(object id);
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
- #endregion
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentDeliveryCompanyServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentDeliveryCompanyServices.cs
deleted file mode 100644
index 2dfd6a41..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentDeliveryCompanyServices.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/11 23:48:58
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.ViewModels.Basics;
-using SqlSugar;
-
-namespace CoreCms.Net.IServices
-{
- ///
- /// 自定义交易组件快递公司 服务工厂接口
- ///
- public interface IWeChatTransactionComponentDeliveryCompanyServices : IBaseServices
- {
-
- #region 获取缓存的所有数据==========================================================
-
- ///
- /// 获取缓存的所有数据
- ///
- ///
- Task> GetCaChe();
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
- #endregion
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodAuditLogServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodAuditLogServices.cs
deleted file mode 100644
index f061ffc9..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodAuditLogServices.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:18:06
- * 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 IWeChatTransactionComponentGoodAuditLogServices : IBaseServices
- {
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodSKUServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodSKUServices.cs
deleted file mode 100644
index 46a2b929..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodSKUServices.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/5 23:23:30
- * 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
-{
- ///
- /// 自定义交易组件商品关联sku列表 服务工厂接口
- ///
- public interface IWeChatTransactionComponentGoodSKUServices : IBaseServices
- {
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(List entity);
-
-
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodServices.cs
deleted file mode 100644
index 7f454aed..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentGoodServices.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/4 1:24:53
- * 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 IWeChatTransactionComponentGoodServices : IBaseServices
- {
- #region 重写增删改查操作===========================================================
-
- ///
- /// 重写异步插入方法
- ///
- ///
- ///
- Task InsertAsync(WeChatTransactionComponentGood entity);
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- Task UpdateAsync(WeChatTransactionComponentGood entity);
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- Task DeleteByIdAsync(object id);
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
- #endregion
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentOrderServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentOrderServices.cs
deleted file mode 100644
index 0af7c98a..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentOrderServices.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 23:44:16
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Model.Entities;
-using SqlSugar;
-
-namespace CoreCms.Net.IServices
-{
- ///
- /// 自定义交易组件提交订单 服务工厂接口
- ///
- public interface IWeChatTransactionComponentOrderServices : IBaseServices
- {
- }
-}
diff --git a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentThirdCategoryServices.cs b/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentThirdCategoryServices.cs
deleted file mode 100644
index 22287dce..00000000
--- a/CoreCms.Net.IServices/WeChat/IWeChatTransactionComponentThirdCategoryServices.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/3 16:30:55
- * 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 IWeChatTransactionComponentThirdCategoryServices : IBaseServices
- {
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- Task> QueryPageAsync(
- Expression> predicate,
- Expression> orderByExpression, OrderByType orderByType, int pageIndex = 1,
- int pageSize = 20, bool blUseNoLock = false);
- #endregion
- }
-}
diff --git a/CoreCms.Net.Model/Entities/Order/CoreCmsOrderPartial.cs b/CoreCms.Net.Model/Entities/Order/CoreCmsOrderPartial.cs
index f9c65560..2643e7cd 100644
--- a/CoreCms.Net.Model/Entities/Order/CoreCmsOrderPartial.cs
+++ b/CoreCms.Net.Model/Entities/Order/CoreCmsOrderPartial.cs
@@ -227,12 +227,5 @@ namespace CoreCms.Net.Model.Entities
[SugarColumn(IsIgnore = true)]
public string userNickName { get; set; }
-
- ///
- /// 交易组件订单
- ///
- [SugarColumn(IsIgnore = true)]
- public WeChatTransactionComponentOrder tcOrder { get; set; }
-
}
}
\ No newline at end of file
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentAuditCategory.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentAuditCategory.cs
deleted file mode 100644
index 4d2debe3..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentAuditCategory.cs
+++ /dev/null
@@ -1,200 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/14 23:14:23
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件上传类目资质
- ///
- public partial class WeChatTransactionComponentAuditCategory
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentAuditCategory()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 营业执照或组织机构代码证
- ///
- [Display(Name = "营业执照或组织机构代码证")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:255,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String licenseImage { get; set; }
-
-
- ///
- /// 一级类目
- ///
- [Display(Name = "一级类目")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 level1 { get; set; }
-
-
- ///
- /// 一级类目名称
- ///
- [Display(Name = "一级类目名称")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String level1Name { get; set; }
-
-
- ///
- /// 二级类目
- ///
- [Display(Name = "二级类目")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 level2 { get; set; }
-
-
- ///
- /// 二级类目名称
- ///
- [Display(Name = "二级类目名称")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String level2Name { get; set; }
-
-
- ///
- /// 三级类目
- ///
- [Display(Name = "三级类目")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 level3 { get; set; }
-
-
- ///
- /// 三级类目名称
- ///
- [Display(Name = "三级类目名称")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String level3Name { get; set; }
-
-
- ///
- /// 资质材料
- ///
- [Display(Name = "资质材料")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.String certificateImage { get; set; }
-
-
- ///
- /// 审核单
- ///
- [Display(Name = "审核单")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String auditId { get; set; }
-
-
- ///
- /// 审核状态
- ///
- [Display(Name = "审核状态")]
-
-
-
-
-
- public System.Int32? status { get; set; }
-
-
- ///
- /// 品牌id
- ///
- [Display(Name = "品牌id")]
-
-
-
-
-
- public System.Int32? brandId { get; set; }
-
-
- ///
- /// 拒绝原因
- ///
- [Display(Name = "拒绝原因")]
-
-
- [StringLength(maximumLength:255,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String rejectReason { get; set; }
-
-
- ///
- /// 创建时间
- ///
- [Display(Name = "创建时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime createTime { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentAuditCategoryAuditLog.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentAuditCategoryAuditLog.cs
deleted file mode 100644
index 5b439630..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentAuditCategoryAuditLog.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:54:37
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件类目审核回调
- ///
- public partial class WeChatTransactionComponentAuditCategoryAuditLog
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentAuditCategoryAuditLog()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 审核id
- ///
- [Display(Name = "审核id")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String auditId { get; set; }
-
-
- ///
- /// 审核状态,1:已通过,9:拒绝
- ///
- [Display(Name = "审核状态,1:已通过,9:拒绝")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 status { get; set; }
-
-
- ///
- /// 审核类型,本接口固定为2
- ///
- [Display(Name = "审核类型,本接口固定为2")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 auditType { get; set; }
-
-
- ///
- /// 相关信息
- ///
- [Display(Name = "相关信息")]
-
-
- [StringLength(maximumLength:250,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String rejectReason { get; set; }
-
-
- ///
- /// 数据创建时间
- ///
- [Display(Name = "数据创建时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime createTime { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentBrandAudit.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentBrandAudit.cs
deleted file mode 100644
index 066d3676..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentBrandAudit.cs
+++ /dev/null
@@ -1,308 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/21 3:39:55
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件上传品牌信息
- ///
- public partial class WeChatTransactionComponentBrandAudit
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentBrandAudit()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 营业执照或组织机构代码证
- ///
- [Display(Name = "营业执照或组织机构代码证")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String license { get; set; }
-
-
- ///
- /// 认证审核类型
- ///
- [Display(Name = "认证审核类型")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 brand_audit_type { get; set; }
-
-
- ///
- /// 商标分类
- ///
- [Display(Name = "商标分类")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:10,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String trademark_type { get; set; }
-
-
- ///
- /// 经营类型
- ///
- [Display(Name = "经营类型")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 brand_management_type { get; set; }
-
-
- ///
- /// 商品产地是否进口
- ///
- [Display(Name = "商品产地是否进口")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 commodity_origin_type { get; set; }
-
-
- ///
- /// 商标/品牌词
- ///
- [Display(Name = "商标/品牌词")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String brand_wording { get; set; }
-
-
- ///
- /// 销售授权书
- ///
- [Display(Name = "销售授权书")]
-
-
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String sale_authorization { get; set; }
-
-
- ///
- /// 商标注册证书
- ///
- [Display(Name = "商标注册证书")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String trademark_registration_certificate { get; set; }
-
-
- ///
- /// 商标变更证明
- ///
- [Display(Name = "商标变更证明")]
-
-
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String trademark_change_certificate { get; set; }
-
-
- ///
- /// 商标注册人姓名
- ///
- [Display(Name = "商标注册人姓名")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:100,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String trademark_registrant { get; set; }
-
-
- ///
- /// 商标注册号/申请号
- ///
- [Display(Name = "商标注册号/申请号")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:10,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String trademark_registrant_nu { get; set; }
-
-
- ///
- /// 商标有效期
- ///
- [Display(Name = "商标有效期")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime trademark_authorization_period { get; set; }
-
-
- ///
- /// 商标注册申请受理通知书
- ///
- [Display(Name = "商标注册申请受理通知书")]
-
-
- [StringLength(maximumLength:100,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String trademark_registration_application { get; set; }
-
-
- ///
- /// 商标申请人姓名
- ///
- [Display(Name = "商标申请人姓名")]
-
-
- [StringLength(maximumLength:100,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String trademark_applicant { get; set; }
-
-
- ///
- /// 商标申请时间
- ///
- [Display(Name = "商标申请时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime trademark_application_time { get; set; }
-
-
- ///
- /// 中华人民共和国海关进口货物报关单
- ///
- [Display(Name = "中华人民共和国海关进口货物报关单")]
-
-
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String imported_goods_form { get; set; }
-
-
- ///
- /// 商品使用场景
- ///
- [Display(Name = "商品使用场景")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 scene_group_list { get; set; }
-
-
- ///
- /// 审核单id
- ///
- [Display(Name = "审核单id")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String audit_id { get; set; }
-
-
- ///
- /// 审核状态
- ///
- [Display(Name = "审核状态")]
-
-
-
-
-
- public System.Int32? status { get; set; }
-
-
- ///
- /// 品牌id
- ///
- [Display(Name = "品牌id")]
-
-
-
-
-
- public System.Int32? brandId { get; set; }
-
-
- ///
- /// 拒绝原因
- ///
- [Display(Name = "拒绝原因")]
-
-
- [StringLength(maximumLength:255,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String rejectReason { get; set; }
-
-
- ///
- /// 创建时间
- ///
- [Display(Name = "创建时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime createTime { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentBrandAuditLog.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentBrandAuditLog.cs
deleted file mode 100644
index c62d2fda..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentBrandAuditLog.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/21 3:30:18
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件上传品牌信息审核结果日志
- ///
- public partial class WeChatTransactionComponentBrandAuditLog
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentBrandAuditLog()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 审核Id
- ///
- [Display(Name = "审核Id")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String audit_id { get; set; }
-
-
- ///
- /// 审核状态,1:已通过,9:拒绝
- ///
- [Display(Name = "审核状态,1:已通过,9:拒绝")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 status { get; set; }
-
-
- ///
- /// 审核类型,本接口固定为1
- ///
- [Display(Name = "审核类型,本接口固定为1")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 audit_type { get; set; }
-
-
- ///
- /// 相关信息
- ///
- [Display(Name = "相关信息")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String reject_reason { get; set; }
-
-
- ///
- /// 品牌id
- ///
- [Display(Name = "品牌id")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 brand_id { get; set; }
-
-
- ///
- /// 回调时间
- ///
- [Display(Name = "回调时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime createTime { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentDeliveryCompany.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentDeliveryCompany.cs
deleted file mode 100644
index a62f81d5..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentDeliveryCompany.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/11 23:48:58
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件快递公司
- ///
- public partial class WeChatTransactionComponentDeliveryCompany
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentDeliveryCompany()
- {
- }
-
- ///
- /// 快递公司id
- ///
- [Display(Name = "快递公司id")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String deliveryId { get; set; }
-
-
- ///
- /// 快递公司名称
- ///
- [Display(Name = "快递公司名称")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String deliveryName { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGood.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGood.cs
deleted file mode 100644
index c53f66e7..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGood.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/5 13:04:13
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件商品列表
- ///
- public partial class WeChatTransactionComponentGood
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentGood()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
- [Required(ErrorMessage = "请输入{0}")]
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 交易组件平台内部商品ID
- ///
- [Display(Name = "交易组件平台内部商品ID")]
- [Required(ErrorMessage = "请输入{0}")]
-
-
- public System.Int64 productId { get; set; }
-
-
- ///
- /// 交易组件创建时间
- ///
- [Display(Name = "交易组件创建时间")]
- public System.DateTime? createTime { get; set; }
-
-
- ///
- /// 商品序列
- ///
- [Display(Name = "商品序列")]
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength: 50, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String outProductId { get; set; }
-
-
- ///
- /// 商品标题
- ///
- [Display(Name = "商品标题")]
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength: 255, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String title { get; set; }
-
-
- ///
- /// 小程序路径
- ///
- [Display(Name = "小程序路径")]
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength: 255, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String path { get; set; }
-
-
- ///
- /// 主图列表
- ///
- [Display(Name = "主图列表")]
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength: 500, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String headImg { get; set; }
-
-
- ///
- /// 商品资质图片列表
- ///
- [Display(Name = "商品资质图片列表")]
- [StringLength(maximumLength: 500, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String qualificationPics { get; set; }
-
-
- ///
- /// 商品详情图文
- ///
- [Display(Name = "商品详情图文")]
- public System.String descInfoDesc { get; set; }
-
-
- ///
- /// 商品详情图片列表
- ///
- [Display(Name = "商品详情图片列表")]
- [StringLength(maximumLength: 500, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String descInfoImgs { get; set; }
-
-
- ///
- /// 三级类目ID
- ///
- [Display(Name = "三级类目ID")]
- [Required(ErrorMessage = "请输入{0}")]
-
-
- public System.Int32 thirdCatId { get; set; }
-
-
- ///
- /// 三级类目名称
- ///
- [Display(Name = "三级类目名称")]
- [StringLength(maximumLength: 50, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String thirdCatName { get; set; }
-
-
- ///
- /// 品牌id
- ///
- [Display(Name = "品牌id")]
- [Required(ErrorMessage = "请输入{0}")]
-
-
- public System.Int32 brandId { get; set; }
-
-
- ///
- /// 预留字段
- ///
- [Display(Name = "预留字段")]
- [StringLength(maximumLength: 50, ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String infoVersion { get; set; }
-
-
- ///
- /// 最后提交时间
- ///
- [Display(Name = "最后提交时间")]
- public System.DateTime? lastPostTime { get; set; }
-
-
- ///
- /// 最后更新时间
- ///
- [Display(Name = "最后更新时间")]
- public System.DateTime? updateTime { get; set; }
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodAuditLog.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodAuditLog.cs
deleted file mode 100644
index 3c382402..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodAuditLog.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:22:12
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件商品审核回调
- ///
- public partial class WeChatTransactionComponentGoodAuditLog
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentGoodAuditLog()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 商家自定义商品id
- ///
- [Display(Name = "商家自定义商品id")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String outProductId { get; set; }
-
-
- ///
- /// 平台商品id
- ///
- [Display(Name = "平台商品id")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int64 productId { get; set; }
-
-
- ///
- /// 审核状态,4:已通过,3:拒绝
- ///
- [Display(Name = "审核状态,4:已通过,3:拒绝")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 status { get; set; }
-
-
- ///
- /// 相关信息
- ///
- [Display(Name = "相关信息")]
-
-
- [StringLength(maximumLength:250,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String rejectReason { get; set; }
-
-
- ///
- /// 创建时间
- ///
- [Display(Name = "创建时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime createTime { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodPartial.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodPartial.cs
deleted file mode 100644
index c33fb032..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodPartial.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/5 13:04:13
- * Description: 暂无
- ***********************************************************************/
-
-using System.Collections.Generic;
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件商品列表
- ///
- public partial class WeChatTransactionComponentGood
- {
- ///
- /// sku列表
- ///
- [Display(Name = "SKU")]
- [SqlSugar.SugarColumn(IsIgnore = true)]
- public List sku { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodSKU.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodSKU.cs
deleted file mode 100644
index b5aa2f26..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentGoodSKU.cs
+++ /dev/null
@@ -1,176 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/2/7 1:09:51
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件商品关联sku列表
- ///
- public partial class WeChatTransactionComponentGoodSKU
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentGoodSKU()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 交易组件平台自定义skuID
- ///
- [Display(Name = "交易组件平台自定义skuID")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int64 skuId { get; set; }
-
-
- ///
- /// 商家自定义商品ID
- ///
- [Display(Name = "商家自定义商品ID")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String outProductId { get; set; }
-
-
- ///
- /// 商家自定义skuID
- ///
- [Display(Name = "商家自定义skuID")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String outSkuId { get; set; }
-
-
- ///
- /// sku小图
- ///
- [Display(Name = "sku小图")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:255,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String thumbImg { get; set; }
-
-
- ///
- /// 成本价格
- ///
- [Display(Name = "成本价格")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Decimal costprice { get; set; }
-
-
- ///
- /// 售卖价格
- ///
- [Display(Name = "售卖价格")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Decimal salePrice { get; set; }
-
-
- ///
- /// 市场价格
- ///
- [Display(Name = "市场价格")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Decimal marketPrice { get; set; }
-
-
- ///
- /// 库存
- ///
- [Display(Name = "库存")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 stockNum { get; set; }
-
-
- ///
- /// 条形码
- ///
- [Display(Name = "条形码")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String barCode { get; set; }
-
-
- ///
- /// 商品编码
- ///
- [Display(Name = "商品编码")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String skuCode { get; set; }
-
-
- ///
- /// 是否选择
- ///
- [Display(Name = "是否选择")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Boolean isSelect { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentOrder.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentOrder.cs
deleted file mode 100644
index 30c54604..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentOrder.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/6/30 12:28:17
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件提交订单
- ///
- public partial class WeChatTransactionComponentOrder
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentOrder()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 交易组件订单ID
- ///
- [Display(Name = "交易组件订单ID")]
-
-
-
-
-
- public System.Int64? orderId { get; set; }
-
-
- ///
- /// 商家自定义订单ID
- ///
- [Display(Name = "商家自定义订单ID")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:20,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String outOrderId { get; set; }
-
-
- ///
- /// 用户openId
- ///
- [Display(Name = "用户openId")]
-
-
- [StringLength(maximumLength:32,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String openid { get; set; }
-
-
- ///
- /// 创建时间
- ///
- [Display(Name = "创建时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime createTime { get; set; }
-
-
- ///
- /// 支付单序列
- ///
- [Display(Name = "支付单序列")]
-
-
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String paymentId { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentThirdCategory.cs b/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentThirdCategory.cs
deleted file mode 100644
index 8859e40f..00000000
--- a/CoreCms.Net.Model/Entities/WeChat/WeChatTransactionComponentThirdCategory.cs
+++ /dev/null
@@ -1,176 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/3 16:30:55
- * Description: 暂无
- ***********************************************************************/
-
-using SqlSugar;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
-
-namespace CoreCms.Net.Model.Entities
-{
- ///
- /// 自定义交易组件三级类目
- ///
- public partial class WeChatTransactionComponentThirdCategory
- {
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentThirdCategory()
- {
- }
-
- ///
- /// 序列
- ///
- [Display(Name = "序列")]
-
- [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 id { get; set; }
-
-
- ///
- /// 类目ID
- ///
- [Display(Name = "类目ID")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 third_cat_id { get; set; }
-
-
- ///
- /// 类目名称
- ///
- [Display(Name = "类目名称")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String third_cat_name { get; set; }
-
-
- ///
- /// 类目资质
- ///
- [Display(Name = "类目资质")]
-
-
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String qualification { get; set; }
-
-
- ///
- /// 类目资质类型,0:不需要,1:必填,2:选填
- ///
- [Display(Name = "类目资质类型,0:不需要,1:必填,2:选填")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 qualification_type { get; set; }
-
-
- ///
- /// 商品资质
- ///
- [Display(Name = "商品资质")]
-
-
- [StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String product_qualification { get; set; }
-
-
- ///
- /// 商品资质类型,0:不需要,1:必填,2:选填
- ///
- [Display(Name = "商品资质类型,0:不需要,1:必填,2:选填")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 product_qualification_type { get; set; }
-
-
- ///
- /// 二级类目ID
- ///
- [Display(Name = "二级类目ID")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 second_cat_id { get; set; }
-
-
- ///
- /// 二级类目名称
- ///
- [Display(Name = "二级类目名称")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String second_cat_name { get; set; }
-
-
- ///
- /// 一级类目ID
- ///
- [Display(Name = "一级类目ID")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.Int32 first_cat_id { get; set; }
-
-
- ///
- /// 一级类目名称
- ///
- [Display(Name = "一级类目名称")]
-
- [Required(ErrorMessage = "请输入{0}")]
- [StringLength(maximumLength:50,ErrorMessage = "{0}不能超过{1}字")]
-
-
- public System.String first_cat_name { get; set; }
-
-
- ///
- /// 创建时间
- ///
- [Display(Name = "创建时间")]
-
- [Required(ErrorMessage = "请输入{0}")]
-
-
-
- public System.DateTime createTime { get; set; }
-
-
- }
-}
diff --git a/CoreCms.Net.Model/FromBody/FMOrder.cs b/CoreCms.Net.Model/FromBody/FMOrder.cs
index 24d13765..b4fcba14 100644
--- a/CoreCms.Net.Model/FromBody/FMOrder.cs
+++ b/CoreCms.Net.Model/FromBody/FMOrder.cs
@@ -70,7 +70,7 @@ namespace CoreCms.Net.Model.FromBody
///
public string logiNo { get; set; }
///
- /// 直播物流编码
+ /// 第三方对接物流编码
///
public string deliveryCompanyId { get; set; }
public Dictionary items { get; set; }
diff --git a/CoreCms.Net.RedisMQ/TCOrderAfterSaleCreateSyncSubscribe.cs b/CoreCms.Net.RedisMQ/TCOrderAfterSaleCreateSyncSubscribe.cs
deleted file mode 100644
index e3bb91b4..00000000
--- a/CoreCms.Net.RedisMQ/TCOrderAfterSaleCreateSyncSubscribe.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 22:41:46
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Loging;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.WeChat.Service.Enums;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using InitQ.Abstractions;
-using InitQ.Attributes;
-using Newtonsoft.Json;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-
-namespace CoreCms.Net.RedisMQ
-{
- ///
- /// 自定义交易组件-同步创建售后单
- ///
- public class TCOrderAfterSaleCreateSyncSubscribe : IRedisSubscribe
- {
- private readonly string _wxOpenAppId = AppSettingsConstVars.WxOpenAppId;
- private readonly string _wxOpenAppSecret = AppSettingsConstVars.WxOpenAppSecret;
-
- private readonly ICoreCmsOrderServices _orderServices;
- private readonly IWeChatTransactionComponentOrderServices _tcOrderServices;
- private readonly WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
- private readonly ICoreCmsBillAftersalesServices _billAftersalesServices;
- private readonly ICoreCmsBillAftersalesItemServices _billAftersalesItemServices;
-
-
-
-
- public TCOrderAfterSaleCreateSyncSubscribe(ICoreCmsOrderServices orderServices, IWeChatTransactionComponentOrderServices tcOrderServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, ICoreCmsBillAftersalesServices billAftersalesServices, ICoreCmsBillAftersalesItemServices billAftersalesItemServices)
- {
- _orderServices = orderServices;
- _tcOrderServices = tcOrderServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- _billAftersalesServices = billAftersalesServices;
- _billAftersalesItemServices = billAftersalesItemServices;
- }
-
- ///
- /// 自定义交易组件-同步创建售后单
- ///
- ///
- ///
- [Subscribe(RedisMessageQueueKey.TransactionComponentAfterSaleCreateSync)]
- private async Task TransactionComponentAfterSaleCreateSync(string msg)
- {
- try
- {
- var orderModel = JsonConvert.DeserializeObject(msg);
- if (orderModel is { scene: > 0 })
- {
- var tcOrderModel = await _tcOrderServices.QueryByClauseAsync(p => p.outOrderId == orderModel.orderId, true);
- if (tcOrderModel == null)
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步创建售后单", "未查询到远程订单推送记录");
- return;
- }
-
- var orderInfo = await _orderServices.QueryByClauseAsync(p => p.orderId == orderModel.orderId, true);
- if (orderInfo == null)
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步创建售后单", "订单信息获取失败");
- return;
- }
-
- //获取售后单
- var aftersale = await _billAftersalesServices.QueryByClauseAsync(p => p.aftersalesId == orderModel.billAftersalesId);
- //获取售后单详情
- var aftersaleItems = await _billAftersalesItemServices.QueryListByClauseAsync(p => p.aftersalesId == orderModel.billAftersalesId);
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
-
- var request = new ShopECAftersaleAddRequest();
- request.AccessToken = accessToken;
- request.OutOrderId = orderModel.orderId;
- request.OutAftersaleOrderId = orderModel.billAftersalesId;
- request.OpenId = tcOrderModel.openid;
-
- //request.PagePath = "pages/member/afterSales/detail/detail?aftersalesId=" + orderModel.billAftersalesId;
- request.RefundAmount = Convert.ToInt32(aftersale.refundAmount * 100);
-
- if (aftersale.refundAmount > 0 && aftersale.type == (int)GlobalEnumVars.BillAftersalesIsReceive.Refund)
- {
- request.Type = (int)AfterSalesEnum.AfterSaleType.仅退款;
- }
- else if (aftersale.refundAmount > 0 && aftersale.type == (int)GlobalEnumVars.BillAftersalesIsReceive.Reship)
- {
- request.Type = (int)AfterSalesEnum.AfterSaleType.退货退款;
-
- }
- else if (Convert.ToInt32(aftersale.refundAmount) == 0 && aftersale.type == (int)GlobalEnumVars.BillAftersalesIsReceive.Reship)
- {
- request.Type = (int)AfterSalesEnum.AfterSaleType.退货退款;
- }
- else if (Convert.ToInt32(aftersale.refundAmount) == 0 && aftersale.type == (int)GlobalEnumVars.BillAftersalesIsReceive.Refund)
- {
- request.Type = (int)AfterSalesEnum.AfterSaleType.仅退款;
- }
-
- request.RefundReasonType = (int)AfterSalesEnum.AfterSalesReasonType.不想要了;
- request.RefundReason = aftersale.reason;
-
- //新自定义交易组件,只能申请一个商品售后。
- request.Product = new ShopECAftersaleAddRequest.Types.Product()
- {
- Count = aftersaleItems[0].nums,
- OutProductId = aftersaleItems[0].goodsId.ToString(),
- OutSKUId = aftersaleItems[0].productId.ToString()
- };
-
- //aftersaleItems.ForEach(p =>
- //{
- // var product = new ShopECAftersaleAddRequest.Types.Product();
- // product.Count = p.nums;
- // product.OutProductId = p.goodsId.ToString();
- // product.OutSKUId = p.productId.ToString();
- // request.Product.Add(product);
- //});
-
- var response = await client.ExecuteShopECAftersaleAddAsync(request);
-
- NLogUtil.WriteAll(response.IsSuccessful() ? NLog.LogLevel.Info : NLog.LogLevel.Error,
- LogType.RedisMessageQueue, "自定义交易组件-同步创建售后单", JsonConvert.SerializeObject(response));
- }
- else
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步创建售后单", "订单获取失败");
- }
-
- }
- catch (Exception ex)
- {
- var obj = new
- {
- wxOpenAppId = _wxOpenAppId,
- wxOpenAppSecret = _wxOpenAppSecret,
- };
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步创建售后单", JsonConvert.SerializeObject(obj), ex);
- throw;
- }
- await Task.CompletedTask;
- }
-
-
-
- }
-}
diff --git a/CoreCms.Net.RedisMQ/TCOrderDeliveryRecieveSyncSubscribe.cs b/CoreCms.Net.RedisMQ/TCOrderDeliveryRecieveSyncSubscribe.cs
deleted file mode 100644
index c7c1b6aa..00000000
--- a/CoreCms.Net.RedisMQ/TCOrderDeliveryRecieveSyncSubscribe.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 22:41:46
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Loging;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using InitQ.Abstractions;
-using InitQ.Attributes;
-using Newtonsoft.Json;
-using NLog;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-
-namespace CoreCms.Net.RedisMQ
-{
- ///
- /// 自定义交易组件-同步订单确认收货
- ///
- public class TCOrderDeliveryRecieveSyncSubscribe : IRedisSubscribe
- {
- private readonly ICoreCmsBillDeliveryServices _billDeliveryServices;
- private readonly ICoreCmsOrderItemServices _orderItemServices;
- private readonly ICoreCmsOrderServices _orderServices;
- private readonly IWeChatTransactionComponentOrderServices _tcOrderServices;
-
-
- private readonly ICoreCmsUserWeChatInfoServices _userWeChatInfoServices;
- private readonly IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
- private readonly ICoreCmsUserWeChatInfoServices _weChatInfoServices;
-
-
- public TCOrderDeliveryRecieveSyncSubscribe(ICoreCmsUserWeChatInfoServices userWeChatInfoServices,
- ICoreCmsBillDeliveryServices billDeliveryServices, ICoreCmsOrderServices orderServices,
- ICoreCmsUserWeChatInfoServices weChatInfoServices, IWeChatTransactionComponentOrderServices tcOrderServices,
- ICoreCmsOrderItemServices orderItemServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory)
- {
- _userWeChatInfoServices = userWeChatInfoServices;
- _billDeliveryServices = billDeliveryServices;
- _orderServices = orderServices;
- _weChatInfoServices = weChatInfoServices;
- _tcOrderServices = tcOrderServices;
- _orderItemServices = orderItemServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- }
-
- ///
- /// 自定义交易组件-同步订单确认收货
- ///
- ///
- ///
- [Subscribe(RedisMessageQueueKey.TransactionComponentOrderDeliveryRecieveSync)]
- private async Task TransactionComponentOrderDeliveryRecieveSync(string msg)
- {
- try
- {
- var orderModel = JsonConvert.DeserializeObject(msg);
- if (orderModel is {scene: > 0})
- {
- var tcOrderModel =
- await _tcOrderServices.QueryByClauseAsync(p => p.outOrderId == orderModel.orderId, true);
- if (tcOrderModel == null)
- {
- NLogUtil.WriteAll(LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步订单确认收货",
- "未查询到远程订单推送记录");
- return;
- }
-
- var orderInfo = await _orderServices.QueryByClauseAsync(p => p.orderId == orderModel.orderId, true);
- if (orderInfo == null)
- {
- NLogUtil.WriteAll(LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步订单确认收货", "订单信息获取失败");
- return;
- }
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
-
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopDeliveryReceiveRequest();
- request.AccessToken = accessToken;
- request.OpenId = tcOrderModel.openid;
- request.OutOrderId = orderModel.orderId;
- var response = await client.ExecuteShopDeliveryReceiveAsync(request);
- NLogUtil.WriteAll(response.IsSuccessful() ? LogLevel.Info : LogLevel.Error,
- LogType.RedisMessageQueue, "自定义交易组件-同步订单确认收货", JsonConvert.SerializeObject(response));
- }
- else
- {
- NLogUtil.WriteAll(LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步订单确认收货", "订单获取失败");
- }
- }
- catch (Exception ex)
- {
- NLogUtil.WriteAll(LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步订单确认收货", msg, ex);
- throw;
- }
-
- await Task.CompletedTask;
- }
- }
-}
\ No newline at end of file
diff --git a/CoreCms.Net.RedisMQ/TCOrderShipSyncSubscribe.cs b/CoreCms.Net.RedisMQ/TCOrderShipSyncSubscribe.cs
deleted file mode 100644
index 79405761..00000000
--- a/CoreCms.Net.RedisMQ/TCOrderShipSyncSubscribe.cs
+++ /dev/null
@@ -1,176 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 22:41:46
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Loging;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using InitQ.Abstractions;
-using InitQ.Attributes;
-using Newtonsoft.Json;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-
-namespace CoreCms.Net.RedisMQ
-{
- ///
- /// 自定义交易组件-同步发货信息
- ///
- public class TCOrderShipSyncSubscribe : IRedisSubscribe
- {
- private readonly string _wxOpenAppId = AppSettingsConstVars.WxOpenAppId;
- private readonly string _wxOpenAppSecret = AppSettingsConstVars.WxOpenAppSecret;
-
- private readonly ICoreCmsBillDeliveryServices _billDeliveryServices;
- private readonly ICoreCmsBillDeliveryItemServices _billDeliveryItemServices;
- private readonly ICoreCmsOrderServices _orderServices;
- private readonly ICoreCmsOrderItemServices _orderItemServices;
- private readonly IWeChatTransactionComponentOrderServices _tcOrderServices;
- private readonly WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
-
-
- public TCOrderShipSyncSubscribe(ICoreCmsBillDeliveryServices billDeliveryServices, ICoreCmsOrderServices orderServices, IWeChatTransactionComponentOrderServices tcOrderServices, ICoreCmsOrderItemServices orderItemServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, ICoreCmsBillDeliveryItemServices billDeliveryItemServices)
- {
- _billDeliveryServices = billDeliveryServices;
- _orderServices = orderServices;
- _tcOrderServices = tcOrderServices;
- _orderItemServices = orderItemServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- _billDeliveryItemServices = billDeliveryItemServices;
- }
-
- ///
- /// 自定义交易组件-同步发货信息
- ///
- ///
- ///
- [Subscribe(RedisMessageQueueKey.TransactionComponentOrderShipSync)]
- private async Task TransactionComponentOrderShipSync(string msg)
- {
- try
- {
- var deliveryId = msg;
- if (!string.IsNullOrEmpty(deliveryId))
- {
- var billDelivery = await _billDeliveryServices.QueryByClauseAsync(p => p.deliveryId == deliveryId, true);
- if (billDelivery == null)
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步发货信息", "同步发货信息");
- return;
- }
-
- var tcOrderModel = await _tcOrderServices.QueryByClauseAsync(p => p.outOrderId == billDelivery.orderId, true);
- if (tcOrderModel == null)
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步发货信息", "未查询到远程订单推送记录");
- return;
- }
-
- var orderInfo = await _orderServices.QueryByClauseAsync(p => p.orderId == billDelivery.orderId, true);
- if (orderInfo == null)
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步发货信息", "订单信息获取失败");
- return;
- }
-
-
- var items = await _billDeliveryItemServices.QueryListByClauseAsync(p => p.deliveryId == billDelivery.deliveryId);
-
- //判断是否发货发完
- var finishAllDelivery = false;
-
- //总发货数量
- var allNeedSendNum = await _orderItemServices.GetSumAsync(p => p.orderId == orderInfo.orderId, p => p.nums, true);
- //已经发货数量
- var isSendNum = await _orderItemServices.GetSumAsync(p => p.orderId == orderInfo.orderId, p => p.sendNums, true);
-
- finishAllDelivery = allNeedSendNum == isSendNum ? true : false;
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopDeliverySendRequest();
- request.AccessToken = accessToken;
-
- if (orderInfo.receiptType == (int)GlobalEnumVars.OrderReceiptType.Logistics)
- {
- request.OutOrderId = orderInfo.orderId;
- request.OpenId = tcOrderModel.openid;
- request.IsFinishAll = finishAllDelivery;
-
- var delivery = new ShopDeliverySendRequest.Types.Delivery
- {
- DeliveryId = billDelivery.thirdPartylogiCode,
- WaybillId = billDelivery.logiNo,
- ProductList = new List()
- };
-
- items.ForEach(p =>
- {
- delivery.ProductList.Add(new ShopDeliverySendRequest.Types.Delivery.Types.Product()
- {
- OutProductId = p.goodsId.ToString(),
- OutSKUId = p.productId.ToString(),
- Count = p.nums
- });
- });
-
- request.DeliveryList = new List()
- {
- delivery
- };
-
- request.ShipDoneTime = new DateTimeOffset(billDelivery.createTime);
- }
- else
- {
- request.OutOrderId = orderInfo.orderId;
- request.OpenId = tcOrderModel.openid;
- request.IsFinishAll = true;
- }
-
- var response = await client.ExecuteShopDeliverySendAsync(request);
- if (response.IsSuccessful())
- {
- NLogUtil.WriteAll(NLog.LogLevel.Info, LogType.RedisMessageQueue, "自定义交易组件-同步发货信息", JsonConvert.SerializeObject(response));
- }
- else
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步发货信息", JsonConvert.SerializeObject(response));
- }
- }
- else
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步发货信息", "发货单编号获取失败");
- }
- }
- catch (Exception ex)
- {
- var obj = new
- {
- wxOpenAppId = _wxOpenAppId,
- wxOpenAppSecret = _wxOpenAppSecret,
- msg
- };
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步发货信息", JsonConvert.SerializeObject(obj), ex);
- throw;
- }
- await Task.CompletedTask;
- }
-
-
- }
-}
diff --git a/CoreCms.Net.RedisMQ/TCPayOrderSyncSubscribe.cs b/CoreCms.Net.RedisMQ/TCPayOrderSyncSubscribe.cs
deleted file mode 100644
index 01cb761e..00000000
--- a/CoreCms.Net.RedisMQ/TCPayOrderSyncSubscribe.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 22:41:46
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Loging;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using InitQ.Abstractions;
-using InitQ.Attributes;
-using Newtonsoft.Json;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-
-namespace CoreCms.Net.RedisMQ
-{
- ///
- /// 自定义交易组件-同步订单状态(弃用,新版已经取消了同步)
- ///
- public class TCPayOrderSyncSubscribe : IRedisSubscribe
- {
- private readonly ICoreCmsUserWeChatInfoServices _userWeChatInfoServices;
- private readonly WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
-
-
-
- public TCPayOrderSyncSubscribe(ICoreCmsUserWeChatInfoServices userWeChatInfoServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory)
- {
- _userWeChatInfoServices = userWeChatInfoServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- }
-
- ///
- /// 自定义交易组件-同步订单状态
- ///
- ///
- ///
- [Subscribe(RedisMessageQueueKey.TransactionComponentPayOrderSync)]
- private async Task TransactionComponentPayOrderSync(string msg)
- {
- try
- {
- var orderModel = JsonConvert.DeserializeObject(msg);
- if (orderModel is { scene: > 0 })
- {
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
-
- var userInfo = await _userWeChatInfoServices.QueryByClauseAsync(p => p.userId == orderModel.userId);
- if (userInfo != null)
- {
- var payment = orderModel.paymentItem[0];
-
- //获取同步地址接口地址
- var request = new ShopOrderPayRequest();
- request.AccessToken = accessToken;
- request.OutOrderId = orderModel.orderId;
- request.OpenId = userInfo.openid;
- request.ActionType = 1;
- request.TransactionId = payment.tradeNo;
- request.PayTime = payment.createTime;
-
- var response = await client.ExecuteShopOrderPayAsync(request);
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步订单状态", JsonConvert.SerializeObject(response));
- }
- else
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步订单状态", "微信用户数据获取失败");
- }
- }
- else
- {
- NLogUtil.WriteAll(NLog.LogLevel.Info, LogType.RedisMessageQueue, "自定义交易组件-同步订单状态", "商品获取失败");
- }
-
- }
- catch (Exception ex)
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-同步订单状态", msg, ex);
- throw;
- }
- await Task.CompletedTask;
- }
-
-
-
- }
-}
diff --git a/CoreCms.Net.Repository/Order/CoreCmsCheckBeforeAddOrderRepository.cs b/CoreCms.Net.Repository/Order/CoreCmsCheckBeforeAddOrderRepository.cs
deleted file mode 100644
index 2f0a7ad1..00000000
--- a/CoreCms.Net.Repository/Order/CoreCmsCheckBeforeAddOrderRepository.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/6/29 16:22:45
- * 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.Model.ViewModels.Basics;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 微信交易组件下单前置检查 接口实现
- ///
- public class CoreCmsCheckBeforeAddOrderRepository : BaseRepository, ICoreCmsCheckBeforeAddOrderRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public CoreCmsCheckBeforeAddOrderRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Repository/Order/CoreCmsOrderRepository.cs b/CoreCms.Net.Repository/Order/CoreCmsOrderRepository.cs
index 904dfaf8..19ae6f13 100644
--- a/CoreCms.Net.Repository/Order/CoreCmsOrderRepository.cs
+++ b/CoreCms.Net.Repository/Order/CoreCmsOrderRepository.cs
@@ -251,7 +251,6 @@ namespace CoreCms.Net.Repository
.MergeTable()
.Mapper(sOrder => sOrder.aftersalesItem, sOrder => sOrder.aftersalesItem.First().orderId)
.Mapper(sOrder => sOrder.items, sOrder => sOrder.items.First().orderId)
- .Mapper(sOrder => sOrder.tcOrder, sOrder => sOrder.tcOrder.outOrderId)
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
.WhereIF(predicate != null, predicate)
.ToListAsync();
@@ -329,7 +328,6 @@ namespace CoreCms.Net.Repository
.MergeTable()
.Mapper(sOrder => sOrder.aftersalesItem, sOrder => sOrder.aftersalesItem.First().orderId)
.Mapper(sOrder => sOrder.items, sOrder => sOrder.items.First().orderId)
- .Mapper(sOrder => sOrder.tcOrder, sOrder => sOrder.tcOrder.outOrderId)
.OrderByIF(orderByExpression != null, orderByExpression, orderByType)
.WhereIF(predicate != null, predicate)
.ToPageListAsync(pageIndex, pageSize, totalCount);
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentAuditCategoryAuditLogRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentAuditCategoryAuditLogRepository.cs
deleted file mode 100644
index a65aa22b..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentAuditCategoryAuditLogRepository.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:53:11
- * 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.Model.ViewModels.Basics;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 接口实现
- ///
- public class WeChatTransactionComponentAuditCategoryAuditLogRepository : BaseRepository, IWeChatTransactionComponentAuditCategoryAuditLogRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentAuditCategoryAuditLogRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentAuditCategoryRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentAuditCategoryRepository.cs
deleted file mode 100644
index 4bdc40a8..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentAuditCategoryRepository.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/14 23:14:23
- * 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.Model.ViewModels.Basics;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 自定义交易组件上传类目资质 接口实现
- ///
- public class WeChatTransactionComponentAuditCategoryRepository : BaseRepository, IWeChatTransactionComponentAuditCategoryRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentAuditCategoryRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public async Task UpdateAsync(WeChatTransactionComponentAuditCategory 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.licenseImage = entity.licenseImage;
- oldModel.level1 = entity.level1;
- oldModel.level1Name = entity.level1Name;
- oldModel.level2 = entity.level2;
- oldModel.level2Name = entity.level2Name;
- oldModel.level3 = entity.level3;
- oldModel.level3Name = entity.level3Name;
- oldModel.certificateImage = entity.certificateImage;
- //oldModel.auditId = entity.auditId;
- //oldModel.status = entity.status;
- //oldModel.brandId = entity.brandId;
- //oldModel.rejectReason = entity.rejectReason;
- //oldModel.createTime = entity.createTime;
-
- //事物处理过程结束
- var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
-
- return jm;
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public 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;
- }
-
- #endregion
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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 WeChatTransactionComponentAuditCategory
- {
- id = p.id,
- licenseImage = p.licenseImage,
- level1 = p.level1,
- level1Name = p.level1Name,
- level2 = p.level2,
- level2Name = p.level2Name,
- level3 = p.level3,
- level3Name = p.level3Name,
- certificateImage = p.certificateImage,
- auditId = p.auditId,
- status = p.status,
- brandId = p.brandId,
- rejectReason = p.rejectReason,
- 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 WeChatTransactionComponentAuditCategory
- {
- id = p.id,
- licenseImage = p.licenseImage,
- level1 = p.level1,
- level1Name = p.level1Name,
- level2 = p.level2,
- level2Name = p.level2Name,
- level3 = p.level3,
- level3Name = p.level3Name,
- certificateImage = p.certificateImage,
- auditId = p.auditId,
- status = p.status,
- brandId = p.brandId,
- rejectReason = p.rejectReason,
- createTime = p.createTime,
-
- }).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- var list = new PageList(page, pageIndex, pageSize, totalCount);
- return list;
- }
-
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentBrandAuditLogRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentBrandAuditLogRepository.cs
deleted file mode 100644
index 474fdc9c..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentBrandAuditLogRepository.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/21 3:30:18
- * 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.Model.ViewModels.Basics;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 自定义交易组件上传品牌信息审核结果日志 接口实现
- ///
- public class WeChatTransactionComponentBrandAuditLogRepository : BaseRepository, IWeChatTransactionComponentBrandAuditLogRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentBrandAuditLogRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentBrandAuditRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentBrandAuditRepository.cs
deleted file mode 100644
index 40b87566..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentBrandAuditRepository.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/20 1:19:25
- * 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.Model.ViewModels.Basics;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 自定义交易组件上传品牌信息 接口实现
- ///
- public class WeChatTransactionComponentBrandAuditRepository : BaseRepository, IWeChatTransactionComponentBrandAuditRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentBrandAuditRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public async Task InsertAsync(WeChatTransactionComponentBrandAudit entity)
- {
- var jm = new AdminUiCallBack();
- entity.createTime = DateTime.Now;
- entity.status = (int)CoreCms.Net.WeChat.Service.TransactionComponent.Enum.AuditEnum.AuditCategoryStatus.审核中;
-
- var bl = await DbClient.Insertable(entity).ExecuteReturnIdentityAsync() > 0;
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
-
- return jm;
- }
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public async Task UpdateAsync(WeChatTransactionComponentBrandAudit 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.license = entity.license;
- oldModel.brand_audit_type = entity.brand_audit_type;
- oldModel.trademark_type = entity.trademark_type;
- oldModel.brand_management_type = entity.brand_management_type;
- oldModel.commodity_origin_type = entity.commodity_origin_type;
- oldModel.brand_wording = entity.brand_wording;
- oldModel.sale_authorization = entity.sale_authorization;
- oldModel.trademark_registration_certificate = entity.trademark_registration_certificate;
- oldModel.trademark_change_certificate = entity.trademark_change_certificate;
- oldModel.trademark_registrant = entity.trademark_registrant;
- oldModel.trademark_registrant_nu = entity.trademark_registrant_nu;
- oldModel.trademark_authorization_period = entity.trademark_authorization_period;
- oldModel.trademark_registration_application = entity.trademark_registration_application;
- oldModel.trademark_applicant = entity.trademark_applicant;
- oldModel.trademark_application_time = entity.trademark_application_time;
- oldModel.imported_goods_form = entity.imported_goods_form;
- oldModel.scene_group_list = entity.scene_group_list;
-
- //事物处理过程结束
- var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
-
- return jm;
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public 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;
- }
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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 WeChatTransactionComponentBrandAudit
- {
- id = p.id,
- license = p.license,
- brand_audit_type = p.brand_audit_type,
- trademark_type = p.trademark_type,
- brand_management_type = p.brand_management_type,
- commodity_origin_type = p.commodity_origin_type,
- brand_wording = p.brand_wording,
- sale_authorization = p.sale_authorization,
- trademark_registration_certificate = p.trademark_registration_certificate,
- trademark_change_certificate = p.trademark_change_certificate,
- trademark_registrant = p.trademark_registrant,
- trademark_registrant_nu = p.trademark_registrant_nu,
- trademark_authorization_period = p.trademark_authorization_period,
- trademark_registration_application = p.trademark_registration_application,
- trademark_applicant = p.trademark_applicant,
- trademark_application_time = p.trademark_application_time,
- imported_goods_form = p.imported_goods_form,
- scene_group_list = p.scene_group_list,
- audit_id = p.audit_id,
- status = p.status,
- brandId = p.brandId,
- rejectReason = p.rejectReason,
- 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 WeChatTransactionComponentBrandAudit
- {
- id = p.id,
- license = p.license,
- brand_audit_type = p.brand_audit_type,
- trademark_type = p.trademark_type,
- brand_management_type = p.brand_management_type,
- commodity_origin_type = p.commodity_origin_type,
- brand_wording = p.brand_wording,
- sale_authorization = p.sale_authorization,
- trademark_registration_certificate = p.trademark_registration_certificate,
- trademark_change_certificate = p.trademark_change_certificate,
- trademark_registrant = p.trademark_registrant,
- trademark_registrant_nu = p.trademark_registrant_nu,
- trademark_authorization_period = p.trademark_authorization_period,
- trademark_registration_application = p.trademark_registration_application,
- trademark_applicant = p.trademark_applicant,
- trademark_application_time = p.trademark_application_time,
- imported_goods_form = p.imported_goods_form,
- scene_group_list = p.scene_group_list,
- audit_id = p.audit_id,
- status = p.status,
- brandId = p.brandId,
- rejectReason = p.rejectReason,
- createTime = p.createTime,
- }).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- var list = new PageList(page, pageIndex, pageSize, totalCount);
- return list;
- }
-
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentDeliveryCompanyRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentDeliveryCompanyRepository.cs
deleted file mode 100644
index dbfc5026..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentDeliveryCompanyRepository.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/11 23:48:58
- * 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 SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 自定义交易组件快递公司 接口实现
- ///
- public class WeChatTransactionComponentDeliveryCompanyRepository : BaseRepository, IWeChatTransactionComponentDeliveryCompanyRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentDeliveryCompanyRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
-
- #region 获取缓存的所有数据==========================================================
-
- ///
- /// 获取缓存的所有数据
- ///
- ///
- public async Task> GetCaChe()
- {
- var list = await DbClient.Queryable().With(SqlWith.NoLock).WithCache().ToListAsync();
- return list;
- }
-
- #endregion
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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 WeChatTransactionComponentDeliveryCompany
- {
- deliveryId = p.deliveryId,
- deliveryName = p.deliveryName,
-
- }).With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- else
- {
- page = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new WeChatTransactionComponentDeliveryCompany
- {
- deliveryId = p.deliveryId,
- deliveryName = p.deliveryName,
-
- }).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- var list = new PageList(page, pageIndex, pageSize, totalCount);
- return list;
- }
-
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodAuditLogRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodAuditLogRepository.cs
deleted file mode 100644
index b0618078..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodAuditLogRepository.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:18:06
- * 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.Model.ViewModels.Basics;
-using CoreCms.Net.IRepository;
-using CoreCms.Net.IRepository.UnitOfWork;
-using CoreCms.Net.Model.ViewModels.UI;
-using SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 自定义交易组件商品审核回调 接口实现
- ///
- public class WeChatTransactionComponentGoodAuditLogRepository : BaseRepository, IWeChatTransactionComponentGoodAuditLogRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentGoodAuditLogRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodRepository.cs
deleted file mode 100644
index f6ac982d..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodRepository.cs
+++ /dev/null
@@ -1,270 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/4 2:52:27
- * 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 WeChatTransactionComponentGoodRepository : BaseRepository, IWeChatTransactionComponentGoodRepository
- {
-
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentGoodRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public async Task InsertAsync(WeChatTransactionComponentGood entity)
- {
- var jm = new AdminUiCallBack();
- var isHave = await DbClient.Queryable()
- .AnyAsync(p => p.outProductId == entity.outProductId);
- if (isHave)
- {
- jm.msg = "已经存在相同数据";
- return jm;
- }
- if (entity.sku == null || entity.sku.Count < 0)
- {
- jm.msg = "请提交sku列表";
- return jm;
- }
-
- var isSelectCount = entity.sku.Count(p => p.isSelect == true);
- if (isSelectCount <= 0)
- {
- jm.msg = "请至少勾选一个需要提交的sku";
- return jm;
- }
-
- try
- {
-
- _unitOfWork.BeginTran();
- var id = await DbClient.Insertable(entity).ExecuteReturnIdentityAsync();
- if (id <= 0)
- {
- _unitOfWork.RollbackTran();
- jm.msg = GlobalConstVars.DataHandleEx;
- return jm;
- }
-
- entity.sku.ForEach(p =>
- {
- p.skuId = 0;
- p.outProductId = entity.outProductId;
- p.skuCode = p.barCode;
- });
-
- await DbClient.Insertable(entity.sku).ExecuteCommandAsync();
-
- _unitOfWork.CommitTran();
-
- jm.code = 0;
- jm.msg = GlobalConstVars.CreateSuccess;
-
- }
- catch (Exception e)
- {
- _unitOfWork.RollbackTran();
- jm.msg = GlobalConstVars.DataHandleEx;
- jm.data = e;
- }
- return jm;
- }
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public async Task UpdateAsync(WeChatTransactionComponentGood 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.productId = entity.productId;
- oldModel.createTime = entity.createTime;
- oldModel.outProductId = entity.outProductId;
- oldModel.title = entity.title;
- oldModel.path = entity.path;
- oldModel.headImg = entity.headImg;
- oldModel.qualificationPics = entity.qualificationPics;
- oldModel.descInfoDesc = entity.descInfoDesc;
- oldModel.descInfoImgs = entity.descInfoImgs;
- oldModel.thirdCatId = entity.thirdCatId;
- oldModel.brandId = entity.brandId;
- oldModel.infoVersion = entity.infoVersion;
- oldModel.lastPostTime = entity.lastPostTime;
- oldModel.updateTime = entity.updateTime;
- oldModel.thirdCatName = entity.thirdCatName;
-
- //事物处理过程结束
- var bl = await DbClient.Updateable(oldModel).ExecuteCommandHasChangeAsync();
-
- if (entity.sku == null || entity.sku.Count < 0)
- {
- jm.msg = "请提交sku列表";
- return jm;
- }
-
- var isSelectCount = entity.sku.Count(p => p.isSelect == true);
- if (isSelectCount <= 0)
- {
- jm.msg = "请至少勾选一个需要提交的sku";
- return jm;
- }
-
- var oldSku = await DbClient.Queryable()
- .Where(p => p.outProductId == oldModel.outProductId).ToListAsync();
- oldSku.ForEach(p =>
- {
- var newSku = entity.sku.Find(o => o.outSkuId == p.outSkuId);
- if (newSku != null)
- {
- p.thumbImg = newSku.thumbImg;
- p.costprice = newSku.costprice;
- p.salePrice = newSku.salePrice;
- p.marketPrice = newSku.marketPrice;
- p.stockNum = newSku.stockNum;
- p.isSelect = newSku.isSelect;
- }
- });
-
- await DbClient.Updateable(oldSku).ExecuteCommandAsync();
-
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.EditSuccess : GlobalConstVars.EditFailure;
-
- return jm;
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public 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;
- }
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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 WeChatTransactionComponentGood
- {
- id = p.id,
- productId = p.productId,
- createTime = p.createTime,
- outProductId = p.outProductId,
- title = p.title,
- path = p.path,
- headImg = p.headImg,
- qualificationPics = p.qualificationPics,
- //descInfoDesc = p.descInfoDesc,
- descInfoImgs = p.descInfoImgs,
- thirdCatId = p.thirdCatId,
- thirdCatName = p.thirdCatName,
- brandId = p.brandId,
- infoVersion = p.infoVersion,
- lastPostTime = p.lastPostTime,
- updateTime = p.updateTime,
-
- }).With(SqlWith.NoLock).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- else
- {
- page = await DbClient.Queryable()
- .OrderByIF(orderByExpression != null, orderByExpression, orderByType)
- .WhereIF(predicate != null, predicate).Select(p => new WeChatTransactionComponentGood
- {
- id = p.id,
- productId = p.productId,
- createTime = p.createTime,
- outProductId = p.outProductId,
- title = p.title,
- path = p.path,
- headImg = p.headImg,
- qualificationPics = p.qualificationPics,
- //descInfoDesc = p.descInfoDesc,
- descInfoImgs = p.descInfoImgs,
- thirdCatId = p.thirdCatId,
- thirdCatName = p.thirdCatName,
- brandId = p.brandId,
- infoVersion = p.infoVersion,
- lastPostTime = p.lastPostTime,
- updateTime = p.updateTime,
-
- }).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- var list = new PageList(page, pageIndex, pageSize, totalCount);
- return list;
- }
-
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodSKURepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodSKURepository.cs
deleted file mode 100644
index e8ed72af..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentGoodSKURepository.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/5 23:23:30
- * 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
-{
- ///
- /// 自定义交易组件商品关联sku列表 接口实现
- ///
- public class WeChatTransactionComponentGoodSKURepository : BaseRepository, IWeChatTransactionComponentGoodSKURepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentGoodSKURepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
-
- ///
- /// 重写异步更新方法
- ///
- ///
- ///
- public 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;
- }
-
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentOrderRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentOrderRepository.cs
deleted file mode 100644
index dbc51bfc..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentOrderRepository.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 23:44:16
- * 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 SqlSugar;
-
-namespace CoreCms.Net.Repository
-{
- ///
- /// 自定义交易组件提交订单 接口实现
- ///
- public class WeChatTransactionComponentOrderRepository : BaseRepository, IWeChatTransactionComponentOrderRepository
- {
- private readonly IUnitOfWork _unitOfWork;
- public WeChatTransactionComponentOrderRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
- }
-}
diff --git a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentThirdCategoryRepository.cs b/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentThirdCategoryRepository.cs
deleted file mode 100644
index dbbed9a0..00000000
--- a/CoreCms.Net.Repository/WeChat/WeChatTransactionComponentThirdCategoryRepository.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/3 16:30:55
- * 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 WeChatTransactionComponentThirdCategoryRepository : BaseRepository, IWeChatTransactionComponentThirdCategoryRepository
- {
- public WeChatTransactionComponentThirdCategoryRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- }
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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 WeChatTransactionComponentThirdCategory
- {
- id = p.id,
- third_cat_id = p.third_cat_id,
- third_cat_name = p.third_cat_name,
- qualification = p.qualification,
- qualification_type = p.qualification_type,
- product_qualification = p.product_qualification,
- product_qualification_type = p.product_qualification_type,
- second_cat_id = p.second_cat_id,
- second_cat_name = p.second_cat_name,
- first_cat_id = p.first_cat_id,
- first_cat_name = p.first_cat_name,
- 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 WeChatTransactionComponentThirdCategory
- {
- id = p.id,
- third_cat_id = p.third_cat_id,
- third_cat_name = p.third_cat_name,
- qualification = p.qualification,
- qualification_type = p.qualification_type,
- product_qualification = p.product_qualification,
- product_qualification_type = p.product_qualification_type,
- second_cat_id = p.second_cat_id,
- second_cat_name = p.second_cat_name,
- first_cat_id = p.first_cat_id,
- first_cat_name = p.first_cat_name,
- createTime = p.createTime,
-
- }).ToPageListAsync(pageIndex, pageSize, totalCount);
- }
- var list = new PageList(page, pageIndex, pageSize, totalCount);
- return list;
- }
-
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Services/Bill/CoreCmsBillDeliveryServices.cs b/CoreCms.Net.Services/Bill/CoreCmsBillDeliveryServices.cs
index 5822d2ca..17ca2225 100644
--- a/CoreCms.Net.Services/Bill/CoreCmsBillDeliveryServices.cs
+++ b/CoreCms.Net.Services/Bill/CoreCmsBillDeliveryServices.cs
@@ -82,7 +82,7 @@ namespace CoreCms.Net.Services
/// 省市区id
/// 收货地址
/// 发货描述
- /// 直播物流编码
+ /// 第三方对接物流编码
///
public async Task BatchShip(string[] orderId, string logiCode, string logiNo, Dictionary items, int storeId = 0, string shipName = "", string shipMobile = "", int shipAreaId = 0, string shipAddress = "", string memo = "", string deliveryCompanyId = "")
{
@@ -230,7 +230,7 @@ namespace CoreCms.Net.Services
/// 省市区id
/// 收货地址
/// 发货描述
- /// 直播物流编码
+ /// 第三方对接物流编码
///
public async Task Ship(string orderId, string logiCode, string logiNo, Dictionary items, int storeId = 0, string shipName = "", string shipMobile = "", int shipAreaId = 0, string shipAddress = "", string memo = "", string deliveryCompanyId = "")
{
diff --git a/CoreCms.Net.Services/Order/CoreCmsCheckBeforeAddOrderServices.cs b/CoreCms.Net.Services/Order/CoreCmsCheckBeforeAddOrderServices.cs
deleted file mode 100644
index f9f3f1ac..00000000
--- a/CoreCms.Net.Services/Order/CoreCmsCheckBeforeAddOrderServices.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/6/29 16:22:45
- * 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 CoreCmsCheckBeforeAddOrderServices : BaseServices, ICoreCmsCheckBeforeAddOrderServices
- {
- private readonly ICoreCmsCheckBeforeAddOrderRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public CoreCmsCheckBeforeAddOrderServices(IUnitOfWork unitOfWork, ICoreCmsCheckBeforeAddOrderRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs b/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs
index 35d9de50..1e06c02e 100644
--- a/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs
+++ b/CoreCms.Net.Services/Order/CoreCmsOrderServices.cs
@@ -31,7 +31,6 @@ using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Utility.Extensions;
using CoreCms.Net.Utility.Helper;
using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.TransactionComponent.Enum;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@@ -80,9 +79,6 @@ namespace CoreCms.Net.Services
private readonly ICoreCmsPromotionRecordServices _promotionRecordServices;
private readonly IRedisOperationRepository _redisOperationRepository;
private readonly ICoreCmsUserWeChatInfoServices _userWeChatInfoServices;
- private readonly IWeChatTransactionComponentOrderServices _tcOrderServices;
- private readonly ICoreCmsCheckBeforeAddOrderServices _checkBeforeAddOrderServices;
- private readonly IWeChatTransactionComponentOrderServices _chatTransactionComponentOrderServices;
private readonly WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
private IUnitOfWork _unitOfWork;
@@ -111,7 +107,7 @@ namespace CoreCms.Net.Services
, ICoreCmsPaymentsServices paymentsServices
, ICoreCmsBillRefundServices billRefundServices
, ICoreCmsBillLadingServices billLadingServices
- , ICoreCmsBillReshipServices billReshipServices, ICoreCmsMessageCenterServices messageCenterServices, ICoreCmsGoodsCommentServices goodsCommentServices, ISysTaskLogServices taskLogServices, ICoreCmsPromotionRecordServices promotionRecordServices, IRedisOperationRepository redisOperationRepository, ICoreCmsUserWeChatInfoServices userWeChatInfoServices, IWeChatTransactionComponentOrderServices tcOrderServices, ICoreCmsCheckBeforeAddOrderServices checkBeforeAddOrderServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, IWeChatTransactionComponentOrderServices chatTransactionComponentOrderServices, IUnitOfWork unitOfWork)
+ , ICoreCmsBillReshipServices billReshipServices, ICoreCmsMessageCenterServices messageCenterServices, ICoreCmsGoodsCommentServices goodsCommentServices, ISysTaskLogServices taskLogServices, ICoreCmsPromotionRecordServices promotionRecordServices, IRedisOperationRepository redisOperationRepository, ICoreCmsUserWeChatInfoServices userWeChatInfoServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, IUnitOfWork unitOfWork)
{
this._dal = dal;
base.BaseDal = dal;
@@ -146,10 +142,7 @@ namespace CoreCms.Net.Services
_promotionRecordServices = promotionRecordServices;
_redisOperationRepository = redisOperationRepository;
_userWeChatInfoServices = userWeChatInfoServices;
- _tcOrderServices = tcOrderServices;
- _checkBeforeAddOrderServices = checkBeforeAddOrderServices;
_weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- _chatTransactionComponentOrderServices = chatTransactionComponentOrderServices;
_unitOfWork = unitOfWork;
}
@@ -290,17 +283,6 @@ namespace CoreCms.Net.Services
order.createTime = DateTime.Now;
order.scene = scene;
-
- //插入获取的下单前的微信视频号直接数据
- var check = new CoreCmsCheckBeforeAddOrder();
- check.orderId = order.orderId;
- check.requireOrder = requireOrder;
- check.requiredFundType = requiredFundType;
- check.traceId = traceId;
- check.createTime = DateTime.Now;
-
- await _checkBeforeAddOrderServices.InsertAsync(check);
-
//上面保存好订单表,下面保存订单的其他信息
if (orderItems == null)
{
@@ -473,102 +455,6 @@ namespace CoreCms.Net.Services
order.taxTitle = taxName;
order.taxCode = taxCode;
-
- if (requireOrder == (int)GlobalEnumVars.RequireOrderType.需要)
- {
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
-
- var orderInfo = new ShopOrderAddRequest
- {
- AccessToken = accessToken,
- Scene = scene,
- //基础
- CreateTime = new DateTimeOffset(DateTime.Now),
- //FundType = (int)GlobalEnumVars.RequiredFundType.二级商户号订单,
- FundType = (int)GlobalEnumVars.RequiredFundType.二级商户号订单, //新版自定义交易组件,必须要走二级商户订单模式
- OutOrderId = order.orderId,
- PagePath = UniAppConst.OrderPath(order.orderId)
- };
-
- var weChatUserInfo = await _userWeChatInfoServices.QueryByClauseAsync(p => p.userId == order.userId, true);
- if (weChatUserInfo != null)
- {
- orderInfo.OpenId = weChatUserInfo.openid;
- }
- orderInfo.OutUserId = order.userId.ToString();
-
- //收货人信息
- orderInfo.Address = new ShopOrderAddRequest.Types.Address()
- {
- ReceiverName = order.shipName,
- Detail = order.shipAddress,
- TeleNumber = order.shipMobile,
- };
- //发货方式
- orderInfo.Delivery = new ShopOrderAddRequest.Types.Delivery()
- {
- DeliveryType = (int)DeliveryTypeEnum.正常快递
- };
-
- orderInfo.OrderDetail = new ShopOrderAddRequest.Types.OrderDetail();
-
- //支付信息
- orderInfo.OrderDetail.Payment = new ShopOrderAddRequest.Types.OrderDetail.Types.Payment()
- {
- PayType = (int)GlobalEnumVars.PayMethodType.微信支付
- };
- //价格体系
- orderInfo.OrderDetail.Amount = new ShopOrderAddRequest.Types.OrderDetail.Types.Amount()
- {
- OrderFee = Convert.ToInt32(order.orderAmount * 100),
- FreightFee = Convert.ToInt32(order.costFreight * 100),
- DiscountedFee = Convert.ToInt32((order.pointMoney + order.orderDiscountAmount + order.goodsDiscountAmount + order.couponDiscountAmount) * 100),
- AdditionalPrice = 0,
- AdditionalRemark = "无",
- };
-
- //商品信息
- orderInfo.OrderDetail.ProductList = new List();
-
-
- foreach (var item in orderItems)
- {
- orderInfo.OrderDetail.ProductList.Add(new ShopOrderAddRequest.Types.OrderDetail.Types.Product()
- {
- OutProductId = item.goodsId.ToString(),
- OutSKUId = item.productId.ToString(),
- Count = item.nums,
- SalePrice = Convert.ToInt32(item.amount * 100),
- SKURealPrice = Convert.ToInt32(item.amount * 100),
- PagePath = UniAppConst.GoodDetail(item.goodsId.ToString()),
- Title = item.name,
- HeadImageUrl = item.imageUrl
- });
- }
-
- var shopOrderAddResponse = await client.ExecuteShopOrderAddAsync(orderInfo);
- if (shopOrderAddResponse.IsSuccessful())
- {
- var tcOrder = new WeChatTransactionComponentOrder
- {
- orderId = shopOrderAddResponse.Data.OrderId,
- outOrderId = shopOrderAddResponse.Data.OutOrderId,
- createTime = DateTime.Now,
- openid = orderInfo.OpenId
- };
- await _chatTransactionComponentOrderServices.InsertAsync(tcOrder);
- NLogUtil.WriteAll(NLog.LogLevel.Info, LogType.Order, "自定义交易组件", "推送自定义交易组件创建订单成功");
- }
- else
- {
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.Order, "自定义交易组件 ", "推送自定义交易组件创建订单失败");
- }
- jm.otherData = shopOrderAddResponse;
- }
-
//发送消息
//0元订单记录支付成功
if (order.orderAmount <= 0)
@@ -1047,9 +933,6 @@ namespace CoreCms.Net.Services
};
}
- order.tcOrder = await _tcOrderServices.QueryByClauseAsync(p => p.outOrderId == order.orderId);
-
-
jm.status = true;
jm.data = order;
jm.msg = GlobalConstVars.GetDataSuccess;
@@ -1693,9 +1576,6 @@ namespace CoreCms.Net.Services
_goodsServices.ChangeStock(item.productId, GlobalEnumVars.OrderChangeStockType.cancel.ToString(), item.nums);
}
- var orderInfoIds = orderInfo.Select(p => p.orderId).ToList();
- await CloseOrder(orderInfoIds);
-
jm.status = true;
jm.msg = "订单取消成功";
}
@@ -2093,7 +1973,7 @@ namespace CoreCms.Net.Services
/// 发货描述
/// 店铺收货地址
/// 省市区id
- /// 直播物流编码
+ /// 第三方对接物流编码
///
public async Task BatchShip(string[] ids, string logiCode, string logiNo,
Dictionary items, string shipName, string shipMobile, string shipAddress, string memo, int storeId = 0, int shipAreaId = 0, string deliveryCompanyId = "")
@@ -2120,7 +2000,7 @@ namespace CoreCms.Net.Services
/// 发货描述
/// 店铺收货地址
/// 省市区id
- /// 直播物流编码
+ /// 第三方对接物流编码
///
public async Task Ship(string orderId, string logiCode, string logiNo,
Dictionary items, string shipName, string shipMobile, string shipAddress, string memo, int storeId = 0, int shipAreaId = 0, string deliveryCompanyId = "")
@@ -2393,11 +2273,8 @@ namespace CoreCms.Net.Services
{
var ids = orderInfos.Select(p => p.orderId).ToArray();
jm = await CancelOrder(ids);
-
- await CloseOrder(ids.ToList());
}
-
//插入日志
var model = new SysTaskLog
{
@@ -2645,45 +2522,5 @@ namespace CoreCms.Net.Services
}
#endregion
- #region 自定义交易组件-关闭订单
-
- private async Task CloseOrder(ICollection ids)
- {
-
- //判断是否是自定义交易订单
- var coreCmsCheckBeforeAddOrders = await _checkBeforeAddOrderServices.QueryListByClauseAsync(p => ids.Contains(p.orderId) && p.requireOrder == (int)GlobalEnumVars.RequireOrderType.需要);
- if (coreCmsCheckBeforeAddOrders.Any())
- {
- var dataIds = coreCmsCheckBeforeAddOrders.Select(p => p.orderId).ToList();
- var orderInfos = await _dal.QueryListByClauseAsync(p => dataIds.Contains(p.orderId), p => p.createTime, OrderByType.Asc, true);
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
-
-
- foreach (var item in orderInfos)
- {
- var request = new ShopOrderCloseRequest();
- request.AccessToken = accessToken;
- request.OutOrderId = item.orderId;
-
- var user = await _userWeChatInfoServices.QueryByClauseAsync(p => p.userId == item.userId);
- if (user == null)
- {
- break;
- }
- request.OutOrderId = item.orderId;
- request.OpenId = user.openid;
-
- var response = await client.ExecuteShopOrderCloseAsync(request);
- NLogUtil.WriteAll(response.IsSuccessful() ? NLog.LogLevel.Info : NLog.LogLevel.Error,
- LogType.Web, "自定义交易组件-关闭订单", JsonConvert.SerializeObject(response));
- }
- }
- }
-
- #endregion
-
}
}
diff --git a/CoreCms.Net.Services/Pay/WeChatPayServices.cs b/CoreCms.Net.Services/Pay/WeChatPayServices.cs
index 2d388c36..8a34fbf7 100644
--- a/CoreCms.Net.Services/Pay/WeChatPayServices.cs
+++ b/CoreCms.Net.Services/Pay/WeChatPayServices.cs
@@ -71,241 +71,170 @@ namespace CoreCms.Net.Services
///
public async Task PubPay(CoreCmsBillPayments entity)
{
- using var container = _serviceProvider.CreateScope();
- var orderServices = container.ServiceProvider.GetService();
- var billPaymentsServices = container.ServiceProvider.GetService();
- var checkBeforeAddOrderServices = container.ServiceProvider.GetService();
- var transactionComponentOrderServices = container.ServiceProvider.GetService();
-
var jm = new WebApiCallBack();
- var payment = await billPaymentsServices.QueryByClauseAsync(p => p.paymentId == entity.paymentId);
- var checkBeforeAddOrder = await checkBeforeAddOrderServices.QueryByClauseAsync(p => p.orderId == payment.sourceId);
- if (checkBeforeAddOrder is { requireOrder: (int)GlobalEnumVars.RequireOrderType.需要 })
+ var tradeType = GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString();
+ if (!string.IsNullOrEmpty(entity.parameters))
{
- var order = await transactionComponentOrderServices.QueryByClauseAsync(p => p.outOrderId == payment.sourceId);
+ var jObj = (JObject)JsonConvert.DeserializeObject(entity.parameters);
+ if (jObj != null && jObj.TryGetValue("trade_type", out var value))
+ tradeType = PayHelper.GetWeiChatPayTradeType(value.ObjectToString());
+ }
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
+ var config = await _weChatPayConfigServices.QueryByClauseAsync(p => p.isDefault == true && p.isEnable == true && p.appType == tradeType);
+ if (config == null)
+ {
+ jm.msg = "支付配置信息获取失败";
+ return jm;
+ }
- var getPaymentParameters = new ShopOrderGetPaymentParametersRequest
+ if (string.IsNullOrEmpty(config.notifyUrl))
+ {
+ jm.msg = "未获取到配置的通知地址";
+ return jm;
+ }
+
+ //构建linkPay请求配置实体
+ var payOptions = new WeChatPayOptions
+ {
+ AppId = config.appId,
+ MchId = config.mchId,
+ APIKey = config.apiKey,
+ APIv3Key = config.apiV3Key,
+ Certificate = config.certificate,
+ RsaPublicKey = config.rsaPublicKey,
+ SubAppId = config.subAppId,
+ SubMchId = config.subMchId
+ };
+
+ var openId = string.Empty;
+ if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString() || tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString())
+ {
+ var type = tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString()
+ ? (int)GlobalEnumVars.UserAccountTypes.微信小程序
+ : (int)GlobalEnumVars.UserAccountTypes.微信公众号;
+
+ var user = await _userWeChatInfoServices.QueryByClauseAsync(p => p.userId == _user.ID && p.type == type, p => p.createTime, OrderByType.Desc);
+ if (user == null)
{
- AccessToken = accessToken,
- OpenId = order.openid,
- OrderId = order.orderId,
- OutOrderId = order.outOrderId
- };
+ jm.msg = "微信用户信息获取失败";
+ return jm;
+ }
- var shopOrderGetPayment = await client.ExecuteShopOrderGetPaymentParametersAsync(getPaymentParameters);
- if (shopOrderGetPayment.IsSuccessful())
+
+ openId = user.openid;
+ }
+
+ var notifyUrl = config.notifyUrl.EndsWith("/") ? config.notifyUrl + "m-" + config.appId : config.notifyUrl + "/m-" + config.appId;
+
+
+ var orderRequest = new WeChatPayUnifiedOrderRequest
+ {
+ Body = entity.payTitle.Length > 40 ? entity.payTitle[..40] : entity.payTitle,
+ OutTradeNo = entity.paymentId,
+ TotalFee = Convert.ToInt32(entity.money * 100),
+ SpBillCreateIp = entity.ip,
+ NotifyUrl = notifyUrl,
+ TradeType = tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString() ? GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString() : tradeType,
+ //OpenId = openId
+ };
+
+ if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString() || tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString())
+ {
+ if (!string.IsNullOrEmpty(payOptions.SubMchId))
{
- jm.data = new
- {
- shopOrderGetPayment.PaymentParameters,
- checkBeforeAddOrder,
- entity.paymentId
- };
- jm.status = true;
- await transactionComponentOrderServices.UpdateAsync(p => new WeChatTransactionComponentOrder() { paymentId = entity.paymentId },
- p => p.outOrderId == payment.sourceId);
+ orderRequest.SubOpenId = openId;
}
else
{
- jm.status = false;
- jm.msg = shopOrderGetPayment.ErrorMessage;
+ orderRequest.OpenId = openId;
+ }
+ }
+
+ var response = await _client.ExecuteAsync(orderRequest, payOptions);
+ if (response.ReturnCode == WeChatPayCode.Success && response.ResultCode == WeChatPayCode.Success)
+ {
+ //App微信支付
+ if (tradeType == GlobalEnumVars.WeiChatPayTradeType.APP.ToString())
+ {
+ var reqApp = new WeChatPayAppSdkRequest()
+ {
+ PrepayId = response.PrepayId
+ };
+ var parameter = await _client.ExecuteAsync(reqApp, payOptions);
+ parameter.Add("paymentId", entity.paymentId);
+ jm.status = true;
+ jm.msg = "创建微信APP支付环境成功";
+ jm.data = parameter;
+ jm.otherData = response;
+ }
+ //JsApi通用微信支付
+ else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString())
+ {
+ // 将参数(parameter)给 公众号前端 让他在微信内H5调起支付(https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_7&index=6)
+ var req = new WeChatPayJsApiSdkRequest
+ {
+ Package = "prepay_id=" + response.PrepayId
+ };
+ var parameter = await _client.ExecuteAsync(req, payOptions);
+ parameter.Add("paymentId", entity.paymentId);
+ jm.status = true;
+ jm.msg = "创建JSAPI支付环境成功";
+ jm.data = parameter;
+ jm.otherData = response;
+ }
+ //JsApi通用微信支付(和上一样,但是为了区分,单独编写。)
+ else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString())
+ {
+ // 将参数(parameter)给 公众号前端 让他在微信内H5调起支付(https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_7&index=6)
+ var req = new WeChatPayJsApiSdkRequest
+ {
+ Package = "prepay_id=" + response.PrepayId
+ };
+ var parameter = await _client.ExecuteAsync(req, payOptions);
+ parameter.Add("paymentId", entity.paymentId);
+ jm.status = true;
+ jm.msg = "创建微信公众号支付环境成功";
+ jm.data = parameter;
+ jm.otherData = response;
+ }
+ //扫码支付
+ else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.NATIVE.ToString())
+ {
+ jm.status = true;
+ jm.msg = "创建微信扫码支付环境成功";
+ jm.data = new
+ {
+ response,
+ entity.paymentId
+ };
+ //确定是否存在扫码的图片,然后转成base64到前端进行扫码支付
+ if (!string.IsNullOrEmpty(response.CodeUrl) && response.CodeUrl.Contains("weixin://wxpay/bizpayurl?pr="))
+ {
+ using var qrGenerator = new QRCodeGenerator();
+ using var qrCodeData = qrGenerator.CreateQrCode(response.CodeUrl, QRCodeGenerator.ECCLevel.L);
+ using var pngByteQrCode = new PngByteQRCode(qrCodeData);
+ var pngBytes = pngByteQrCode.GetGraphic(20, false);
+ var stringBase64Str = Convert.ToBase64String(pngBytes);
+ jm.otherData = stringBase64Str;
+ }
+ }
+ //H5支付
+ else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.MWEB.ToString())
+ {
+ jm.status = true;
+ jm.msg = "创建H5支付环境成功";
+ jm.data = response;
}
- return jm;
}
else
{
-
- var tradeType = GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString();
- if (!string.IsNullOrEmpty(entity.parameters))
- {
- var jObj = (JObject)JsonConvert.DeserializeObject(entity.parameters);
- if (jObj != null && jObj.TryGetValue("trade_type", out var value))
- tradeType = PayHelper.GetWeiChatPayTradeType(value.ObjectToString());
- }
-
-
- var config = await _weChatPayConfigServices.QueryByClauseAsync(p =>
- p.isDefault == true && p.isEnable == true && p.appType == tradeType);
- if (config == null)
- {
- jm.msg = "支付配置信息获取失败";
- return jm;
- }
-
- if (string.IsNullOrEmpty(config.notifyUrl))
- {
- jm.msg = "未获取到配置的通知地址";
- return jm;
- }
-
- //构建linkPay请求配置实体
- var payOptions = new WeChatPayOptions
- {
- AppId = config.appId,
- MchId = config.mchId,
- APIKey = config.apiKey,
- APIv3Key = config.apiV3Key,
- Certificate = config.certificate,
- RsaPublicKey = config.rsaPublicKey,
- SubAppId = config.subAppId,
- SubMchId = config.subMchId
- };
-
- var openId = string.Empty;
- if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString() || tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString())
- {
- //var userAccount = await _userServices.QueryByIdAsync(_user.ID);
- //if (userAccount == null)
- //{
- // jm.msg = "用户账户获取失败";
- // return jm;
- //}
-
- //if (userAccount.userWx <= 0)
- //{
- // jm.msg = "账户关联微信用户信息获取失败";
- // return jm;
- //}
-
- //var user = await _userWeChatInfoServices.QueryByClauseAsync(p => p.id == userAccount.userWx);
- //if (user == null)
- //{
- // jm.msg = "微信用户信息获取失败";
- // return jm;
- //}
-
- var type = tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString()
- ? (int)GlobalEnumVars.UserAccountTypes.微信小程序
- : (int)GlobalEnumVars.UserAccountTypes.微信公众号;
-
- var user = await _userWeChatInfoServices.QueryByClauseAsync(p => p.userId == _user.ID && p.type == type, p => p.createTime, OrderByType.Desc);
- if (user == null)
- {
- jm.msg = "微信用户信息获取失败";
- return jm;
- }
-
-
- openId = user.openid;
- }
-
- var notifyUrl = config.notifyUrl.EndsWith("/") ? config.notifyUrl + "m-" + config.appId : config.notifyUrl + "/m-" + config.appId;
-
-
- var orderRequest = new WeChatPayUnifiedOrderRequest
- {
- Body = entity.payTitle.Length > 40 ? entity.payTitle[..40] : entity.payTitle,
- OutTradeNo = entity.paymentId,
- TotalFee = Convert.ToInt32(entity.money * 100),
- SpBillCreateIp = entity.ip,
- NotifyUrl = notifyUrl,
- TradeType = tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString() ? GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString() : tradeType,
- //OpenId = openId
- };
-
- if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString() || tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString())
- {
- if (!string.IsNullOrEmpty(payOptions.SubMchId))
- {
- orderRequest.SubOpenId = openId;
- }
- else
- {
- orderRequest.OpenId = openId;
- }
- }
-
- var response = await _client.ExecuteAsync(orderRequest, payOptions);
- if (response.ReturnCode == WeChatPayCode.Success && response.ResultCode == WeChatPayCode.Success)
- {
- //App微信支付
- if (tradeType == GlobalEnumVars.WeiChatPayTradeType.APP.ToString())
- {
- var reqApp = new WeChatPayAppSdkRequest()
- {
- PrepayId = response.PrepayId
- };
- var parameter = await _client.ExecuteAsync(reqApp, payOptions);
- parameter.Add("paymentId", entity.paymentId);
- jm.status = true;
- jm.msg = "创建微信APP支付环境成功";
- jm.data = parameter;
- jm.otherData = response;
- }
- //JsApi通用微信支付
- else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI.ToString())
- {
- // 将参数(parameter)给 公众号前端 让他在微信内H5调起支付(https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_7&index=6)
- var req = new WeChatPayJsApiSdkRequest
- {
- Package = "prepay_id=" + response.PrepayId
- };
- var parameter = await _client.ExecuteAsync(req, payOptions);
- parameter.Add("paymentId", entity.paymentId);
- jm.status = true;
- jm.msg = "创建JSAPI支付环境成功";
- jm.data = parameter;
- jm.otherData = response;
- }
- //JsApi通用微信支付(和上一样,但是为了区分,单独编写。)
- else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.JSAPI_OFFICIAL.ToString())
- {
- // 将参数(parameter)给 公众号前端 让他在微信内H5调起支付(https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_7&index=6)
- var req = new WeChatPayJsApiSdkRequest
- {
- Package = "prepay_id=" + response.PrepayId
- };
- var parameter = await _client.ExecuteAsync(req, payOptions);
- parameter.Add("paymentId", entity.paymentId);
- jm.status = true;
- jm.msg = "创建微信公众号支付环境成功";
- jm.data = parameter;
- jm.otherData = response;
- }
- //扫码支付
- else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.NATIVE.ToString())
- {
- jm.status = true;
- jm.msg = "创建微信扫码支付环境成功";
- jm.data = new
- {
- response,
- entity.paymentId
- };
- //确定是否存在扫码的图片,然后转成base64到前端进行扫码支付
- if (!string.IsNullOrEmpty(response.CodeUrl) && response.CodeUrl.Contains("weixin://wxpay/bizpayurl?pr="))
- {
- using var qrGenerator = new QRCodeGenerator();
- using var qrCodeData = qrGenerator.CreateQrCode(response.CodeUrl, QRCodeGenerator.ECCLevel.L);
- using var pngByteQrCode = new PngByteQRCode(qrCodeData);
- var pngBytes = pngByteQrCode.GetGraphic(20, false);
- var stringBase64Str = Convert.ToBase64String(pngBytes);
- jm.otherData = stringBase64Str;
- }
- }
- //H5支付
- else if (tradeType == GlobalEnumVars.WeiChatPayTradeType.MWEB.ToString())
- {
- jm.status = true;
- jm.msg = "创建H5支付环境成功";
- jm.data = response;
- }
- }
- else
- {
- jm.status = false;
- jm.msg = "微信建立支付请求失败";
- jm.otherData = response;
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.Web, "微信支付失败", JsonConvert.SerializeObject(response));
- }
- return jm;
+ jm.status = false;
+ jm.msg = "微信建立支付请求失败";
+ jm.otherData = response;
+ NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.Web, "微信支付失败", JsonConvert.SerializeObject(response));
}
-
+ return jm;
}
///
diff --git a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentAuditCategoryAuditLogServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentAuditCategoryAuditLogServices.cs
deleted file mode 100644
index df3b3433..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentAuditCategoryAuditLogServices.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:54:37
- * 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 WeChatTransactionComponentAuditCategoryAuditLogServices : BaseServices, IWeChatTransactionComponentAuditCategoryAuditLogServices
- {
- private readonly IWeChatTransactionComponentAuditCategoryAuditLogRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentAuditCategoryAuditLogServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentAuditCategoryAuditLogRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentAuditCategoryServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentAuditCategoryServices.cs
deleted file mode 100644
index 873e5ff2..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentAuditCategoryServices.cs
+++ /dev/null
@@ -1,189 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/14 23:14:23
- * Description: 暂无
- ***********************************************************************/
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-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 CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.TransactionComponent.Enum;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-using SqlSugar;
-
-
-namespace CoreCms.Net.Services
-{
- ///
- /// 自定义交易组件上传类目资质 接口实现
- ///
- public class WeChatTransactionComponentAuditCategoryServices : BaseServices, IWeChatTransactionComponentAuditCategoryServices
- {
- private readonly IWeChatTransactionComponentAuditCategoryRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
- private readonly WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
-
-
-
- public WeChatTransactionComponentAuditCategoryServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentAuditCategoryRepository dal, IWeChatApiHttpClientFactory weChatApiHttpClientFactory)
- {
- this._dal = dal;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public async Task InsertAsync(WeChatTransactionComponentAuditCategory entity)
- {
- var jm = new AdminUiCallBack();
-
- entity.createTime = DateTime.Now;
-
- var id = await _dal.InsertAsync(entity);
- var bl = id > 0;
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? GlobalConstVars.CreateSuccess : GlobalConstVars.CreateFailure;
-
-
- if (bl)
- {
-
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopAuditAuditCategoryRequest();
-
- request.AccessToken = accessToken;
- request.Audit = new ShopAuditAuditCategoryRequest.Types.Audit();
- request.Audit.LicenseUrl = entity.licenseImage;
- request.Audit.Category = new ShopAuditAuditCategoryRequest.Types.Audit.Types.Category();
-
- request.Audit.Category.FirstCategoryId = entity.level1;
- request.Audit.Category.SecondCategoryId = entity.level2;
- request.Audit.Category.ThirdCategoryId = entity.level3;
- request.Audit.Category.CertificateUrlList = entity.certificateImage.Split(",").ToList();
- //request.Audit.Category.QualificationUrlList = entity.certificateImage.Split(",").ToList();
-
-
- var response = await client.ExecuteShopAuditAuditCategoryAsync(request);
- if (response.IsSuccessful())
- {
- await _dal.UpdateAsync(p => new WeChatTransactionComponentAuditCategory()
- {
- auditId = response.AuditId,
- status = (int)AuditEnum.AuditCategoryStatus.审核中
- }, p => p.id == id);
- }
- else
- {
- jm.code = 1;
- jm.msg = response.ErrorMessage;
-
- }
- }
- return jm;
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public async Task UpdateAsync(WeChatTransactionComponentAuditCategory entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public async Task DeleteByIdAsync(object id)
- {
- return await _dal.DeleteByIdAsync(id);
- }
-
- #endregion
-
-
- ///
- /// 刷新审核状态
- ///
- /// 实体数据
- ///
- public async Task RefreshStatus(WeChatTransactionComponentAuditCategory entity)
- {
- var jm = new AdminUiCallBack();
-
-
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopAuditResultRequest();
- request.AccessToken = accessToken;
- request.AuditId = entity.auditId;
-
-
-
- var response = await client.ExecuteShopAuditResultAsync(request);
- if (response.IsSuccessful())
- {
- await _dal.UpdateAsync(p => new WeChatTransactionComponentAuditCategory()
- {
- status = response.Data.Status,
- brandId = (int)response.Data.BrandId,
- rejectReason = response.Data.RejectReason
- }, p => p.id == entity.id);
- }
-
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "同步成功" : response.ErrorMessage;
-
- return jm;
- }
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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/WeChat/WeChatTransactionComponentBrandAuditLogServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentBrandAuditLogServices.cs
deleted file mode 100644
index c6dc0d6b..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentBrandAuditLogServices.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/21 3:30: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 WeChatTransactionComponentBrandAuditLogServices : BaseServices, IWeChatTransactionComponentBrandAuditLogServices
- {
- private readonly IWeChatTransactionComponentBrandAuditLogRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentBrandAuditLogServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentBrandAuditLogRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentBrandAuditServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentBrandAuditServices.cs
deleted file mode 100644
index 5975a7d2..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentBrandAuditServices.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/20 1:01:47
- * 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 WeChatTransactionComponentBrandAuditServices : BaseServices, IWeChatTransactionComponentBrandAuditServices
- {
- private readonly IWeChatTransactionComponentBrandAuditRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentBrandAuditServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentBrandAuditRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public async Task InsertAsync(WeChatTransactionComponentBrandAudit entity)
- {
- return await _dal.InsertAsync(entity);
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public async Task UpdateAsync(WeChatTransactionComponentBrandAudit entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public async Task DeleteByIdAsync(object id)
- {
- return await _dal.DeleteByIdAsync(id);
- }
-
- #endregion
-
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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/WeChat/WeChatTransactionComponentDeliveryCompanyServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentDeliveryCompanyServices.cs
deleted file mode 100644
index e563a5ac..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentDeliveryCompanyServices.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/11 23:48:58
- * 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 SqlSugar;
-
-
-namespace CoreCms.Net.Services
-{
- ///
- /// 自定义交易组件快递公司 接口实现
- ///
- public class WeChatTransactionComponentDeliveryCompanyServices : BaseServices, IWeChatTransactionComponentDeliveryCompanyServices
- {
- private readonly IWeChatTransactionComponentDeliveryCompanyRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentDeliveryCompanyServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentDeliveryCompanyRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- #region 获取缓存的所有数据==========================================================
-
- ///
- /// 获取缓存的所有数据
- ///
- ///
- public async Task> GetCaChe()
- {
- return await _dal.GetCaChe();
- }
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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/WeChat/WeChatTransactionComponentGoodAuditLogServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodAuditLogServices.cs
deleted file mode 100644
index 23291c29..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodAuditLogServices.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/8/1 22:18:06
- * 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 WeChatTransactionComponentGoodAuditLogServices : BaseServices, IWeChatTransactionComponentGoodAuditLogServices
- {
- private readonly IWeChatTransactionComponentGoodAuditLogRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentGoodAuditLogServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentGoodAuditLogRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodSKUServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodSKUServices.cs
deleted file mode 100644
index 027ae031..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodSKUServices.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/5 23:23:30
- * 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
-{
- ///
- /// 自定义交易组件商品关联sku列表 接口实现
- ///
- public class WeChatTransactionComponentGoodSKUServices : BaseServices, IWeChatTransactionComponentGoodSKUServices
- {
- private readonly IWeChatTransactionComponentGoodSKURepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentGoodSKUServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentGoodSKURepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public async Task UpdateAsync(List entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- }
-}
diff --git a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodServices.cs
deleted file mode 100644
index 8e634db3..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentGoodServices.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/4 1:24:53
- * 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 WeChatTransactionComponentGoodServices : BaseServices, IWeChatTransactionComponentGoodServices
- {
- private readonly IWeChatTransactionComponentGoodRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentGoodServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentGoodRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- #region 实现重写增删改查操作==========================================================
-
- ///
- /// 重写异步插入方法
- ///
- /// 实体数据
- ///
- public async Task InsertAsync(WeChatTransactionComponentGood entity)
- {
- return await _dal.InsertAsync(entity);
- }
-
- ///
- /// 重写异步更新方法方法
- ///
- ///
- ///
- public async Task UpdateAsync(WeChatTransactionComponentGood entity)
- {
- return await _dal.UpdateAsync(entity);
- }
-
- ///
- /// 重写删除指定ID的数据
- ///
- ///
- ///
- public async Task DeleteByIdAsync(object id)
- {
- return await _dal.DeleteByIdAsync(id);
- }
-
- #endregion
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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/WeChat/WeChatTransactionComponentOrderServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentOrderServices.cs
deleted file mode 100644
index aa21d95b..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentOrderServices.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 23:44:16
- * 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 SqlSugar;
-
-
-namespace CoreCms.Net.Services
-{
- ///
- /// 自定义交易组件提交订单 接口实现
- ///
- public class WeChatTransactionComponentOrderServices : BaseServices, IWeChatTransactionComponentOrderServices
- {
- private readonly IWeChatTransactionComponentOrderRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentOrderServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentOrderRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- }
-}
diff --git a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentThirdCategoryServices.cs b/CoreCms.Net.Services/WeChat/WeChatTransactionComponentThirdCategoryServices.cs
deleted file mode 100644
index f4b4e33b..00000000
--- a/CoreCms.Net.Services/WeChat/WeChatTransactionComponentThirdCategoryServices.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/3 16:30:55
- * 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 WeChatTransactionComponentThirdCategoryServices : BaseServices, IWeChatTransactionComponentThirdCategoryServices
- {
- private readonly IWeChatTransactionComponentThirdCategoryRepository _dal;
- private readonly IUnitOfWork _unitOfWork;
-
- public WeChatTransactionComponentThirdCategoryServices(IUnitOfWork unitOfWork, IWeChatTransactionComponentThirdCategoryRepository dal)
- {
- this._dal = dal;
- base.BaseDal = dal;
- _unitOfWork = unitOfWork;
- }
-
- #region 重写根据条件查询分页数据
- ///
- /// 重写根据条件查询分页数据
- ///
- /// 判断集合
- /// 排序方式
- /// 当前页面索引
- /// 分布大小
- ///
- /// 是否使用WITH(NOLOCK)
- ///
- public 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.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByApp.vue b/CoreCms.Net.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByApp.vue
index f907796b..099fb369 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByApp.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByApp.vue
@@ -143,8 +143,6 @@
*/
console.log("支付宝支付入参app", data)
_this.$u.api.pay(data).then(res => {
- //console.log("支付宝支付返回参数app", res)
- //console.log("支付宝app支付get提交数据", res.data)
if (res.status) {
uni.requestPayment({
provider: "alipay",
@@ -168,12 +166,9 @@
})
break
case 'wechatpay':
-
// 微信app支付
_this.$u.api.pay(data).then(res => {
if (res.status) {
- //console.log(JSON.stringify(res));
- // 调用微信支付
uni.requestPayment({
provider: "wxpay",
orderInfo: {
diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByWx.vue b/CoreCms.Net.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByWx.vue
index 7a7b6ab7..e4731a35 100644
--- a/CoreCms.Net.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByWx.vue
+++ b/CoreCms.Net.Uni-App/CoreShop/pages/payment/components/coreshop-paymentsByWx.vue
@@ -92,8 +92,6 @@
},
mounted() {
this.getPayments();
- //console.log('类型:' + this.type);
- //console.log('订单号:' + this.orderId);
},
methods: {
// 获取可用支付方式列表
@@ -123,7 +121,6 @@
},
// 用户点击支付方式处理
toPayHandler(e) {
- //this.popShow = true;
uni.showLoading({
title: '加载中',
mask: true
@@ -152,58 +149,30 @@
this.$u.api.pay(data).then(res => {
console.log(res);
if (res.status) {
- if (res.data.checkBeforeAddOrder && res.data.checkBeforeAddOrder.requireOrder == 1) {
- console.log("自定义交易组件");
- wx.requestOrderPayment({
- timeStamp: res.data.paymentParameters.timeStamp + '',
- nonceStr: res.data.paymentParameters.nonceStr,
- package: res.data.paymentParameters.package,
- signType: res.data.paymentParameters.signType,
- paySign: res.data.paymentParameters.paySign,
- success: function (e) {
- uni.hideLoading();
- if (e.errMsg === 'requestOrderPayment:ok') {
- _this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?id=' + res.data.paymentId });
- }
- },
- fail: function (res) {
- if (res.errMsg === 'requestPayment:fail cancel') {
- //_this.popHide();
- _this.$u.toast("您已经取消此方式支付,可继续选择其他方式支付。")
- }
- setTimeout(function () {
- uni.hideLoading();
- }, 500);
+ console.log("普通订单");
+ uni.requestPayment({
+ provider: 'wxpay',
+ timeStamp: res.data.timeStamp,
+ nonceStr: res.data.nonceStr,
+ package: res.data.package,
+ signType: res.data.signType,
+ paySign: res.data.paySign,
+ success: function (e) {
+ uni.hideLoading();
+ if (e.errMsg === 'requestPayment:ok') {
+ _this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?id=' + res.data.paymentId });
}
- });
- } else {
- console.log("普通订单");
- uni.requestPayment({
- provider: 'wxpay',
- timeStamp: res.data.timeStamp,
- nonceStr: res.data.nonceStr,
- package: res.data.package,
- signType: res.data.signType,
- paySign: res.data.paySign,
- success: function (e) {
- uni.hideLoading();
- if (e.errMsg === 'requestPayment:ok') {
- _this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?id=' + res.data.paymentId });
- }
- },
- fail: function (res) {
- if (res.errMsg === 'requestPayment:fail cancel') {
- //_this.popHide();
- _this.$u.toast("您已经取消此方式支付,可继续选择其他方式支付。")
- }
- setTimeout(function () {
- uni.hideLoading();
- }, 500);
+ },
+ fail: function (res) {
+ if (res.errMsg === 'requestPayment:fail cancel') {
+ _this.$u.toast("您已经取消此方式支付,可继续选择其他方式支付。")
}
- });
- }
+ setTimeout(function () {
+ uni.hideLoading();
+ }, 500);
+ }
+ });
} else {
- //_this.popHide();
setTimeout(function () {
uni.hideLoading();
_this.$u.toast(res.msg)
@@ -221,7 +190,6 @@
uni.hideLoading();
this.$u.route({ type: 'redirectTo', url: '/pages/payment/result/result?id=' + res.data.paymentId });
} else {
- //this.popHide();
setTimeout(function () {
_this.$u.toast(res.msg)
uni.hideLoading();
diff --git a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/AftersaleUserCancelEventCommandHandler.cs b/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/AftersaleUserCancelEventCommandHandler.cs
deleted file mode 100644
index 48c86823..00000000
--- a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/AftersaleUserCancelEventCommandHandler.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/***********************************************************************
- * Project: CoreCms.Net *
- * Web: https://CoreCms.Net *
- * ProjectName: 核心内容管理系统 *
- * Author: 大灰灰 *
- * Email: JianWeie@163.com *
- * CreateTime: 2020-08-13 23:57:23
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Loging;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.Models;
-using MediatR;
-using Newtonsoft.Json;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Events;
-
-namespace CoreCms.Net.WeChat.Service.Mediator
-{
- ///
- /// 表示 TEXT 事件的数据
- ///
- public class AftersaleUserCancelEventCommand : IRequest
- {
- public AftersaleUserCancelEvent EventObj { get; set; }
- }
-
- ///
- /// 用户取消售后申请
- ///
- public class AftersaleUserCancelEventCommandHandler : IRequestHandler
- {
- private readonly ICoreCmsBillAftersalesServices _aftersalesServices;
-
-
-
- public AftersaleUserCancelEventCommandHandler(ICoreCmsBillAftersalesServices aftersalesServices)
- {
- _aftersalesServices = aftersalesServices;
- }
-
- public async Task Handle(AftersaleUserCancelEventCommand request, CancellationToken cancellationToken)
- {
- var jm = new WeChatApiCallBack() { Status = true };
- if (request.EventObj != null)
- {
- try
- {
- await _aftersalesServices.UpdateAsync(p => new CoreCmsBillAftersales()
- {
- status = (int)GlobalEnumVars.BillAftersalesStatus.Cancel
- },
- p => p.aftersalesId == request.EventObj.AftersaleOrder.OutAftersaleOrderId);
- }
- catch (Exception e)
- {
- NLogUtil.WriteFileLog(NLog.LogLevel.Info, LogType.WxPost, "接收服务器推送", "用户取消售后申请", e);
-
- }
- }
- return await Task.FromResult(jm);
- }
- }
-
-}
diff --git a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductBrandAuditEventCommandHandler.cs b/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductBrandAuditEventCommandHandler.cs
deleted file mode 100644
index d5197472..00000000
--- a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductBrandAuditEventCommandHandler.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-/***********************************************************************
- * Project: CoreCms.Net *
- * Web: https://CoreCms.Net *
- * ProjectName: 核心内容管理系统 *
- * Author: 大灰灰 *
- * Email: JianWeie@163.com *
- * CreateTime: 2020-08-13 23:57:23
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.Models;
-using MediatR;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Events;
-
-namespace CoreCms.Net.WeChat.Service.Mediator
-{
- ///
- /// 表示 TEXT 事件的数据
- ///
- public class OpenProductBrandAuditEventCommand : IRequest
- {
- public OpenProductBrandAuditEvent EventObj { get; set; }
- }
-
- ///
- /// 品牌审核结果
- ///
- public class OpenProductBrandAuditEventCommandHandler : IRequestHandler
- {
- private readonly IWeChatTransactionComponentBrandAuditServices _auditServices;
- private readonly IWeChatTransactionComponentBrandAuditLogServices _logServices;
-
- private readonly ICoreCmsSettingServices _settingServices;
- private readonly ICoreCmsSmsServices _smsServices;
-
-
- public OpenProductBrandAuditEventCommandHandler(IWeChatTransactionComponentBrandAuditServices auditServices, IWeChatTransactionComponentBrandAuditLogServices logServices, ICoreCmsSettingServices settingServices, ICoreCmsSmsServices smsServices)
- {
- _auditServices = auditServices;
- _logServices = logServices;
- _settingServices = settingServices;
- _smsServices = smsServices;
- }
-
- public async Task Handle(OpenProductBrandAuditEventCommand request, CancellationToken cancellationToken)
- {
-
- var jm = new WeChatApiCallBack() { Status = true };
-
- if (request.EventObj != null)
- {
- var brand = await _auditServices.QueryByClauseAsync(p => p.audit_id == request.EventObj.EventData.AuditId);
- if (brand != null)
- {
- await _auditServices.UpdateAsync(p => new WeChatTransactionComponentBrandAudit()
- {
- status = request.EventObj.EventData.Status,
- rejectReason = request.EventObj.EventData.RejectReason,
- brandId = (int)request.EventObj.EventData.BrandId,
- }, p => p.audit_id == request.EventObj.EventData.AuditId);
-
- var log = new WeChatTransactionComponentBrandAuditLog();
- log.audit_id = request.EventObj.EventData.AuditId;
- log.status = request.EventObj.EventData.Status;
- log.audit_type = request.EventObj.EventData.AuditType;
- log.reject_reason = request.EventObj.EventData.RejectReason;
- log.brand_id = (int)request.EventObj.EventData.BrandId;
- log.createTime = DateTime.Now;
-
- var id = await _logServices.InsertAsync(log);
- if (id > 0)
- {
- var smsOptions = await _settingServices.GetSmsOptions();
- if (smsOptions.Enabled == true)
- {
- var smsBody = string.Empty;
- if (log.status == 1)
- {
- smsBody = "你提交的品牌已经通过,请登录平台查看。";
- }
- else if (log.status == 9)
- {
- smsBody = "你提交的品牌审核已被拒绝,失败原因为:" + log.reject_reason + ",请修改资料后重新提交。";
-
- }
- if (!string.IsNullOrEmpty(smsBody))
- {
- var allConfigs = await _settingServices.GetConfigDictionaries();
- var shopMobile = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShopMobile);
-
- await _smsServices.SendSms(shopMobile, smsBody, smsOptions);
- }
- }
- }
- }
- }
-
- return await Task.FromResult(jm);
- }
- }
-
-}
diff --git a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductCategoryAuditEventCommandHandler.cs b/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductCategoryAuditEventCommandHandler.cs
deleted file mode 100644
index 49fefaa0..00000000
--- a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductCategoryAuditEventCommandHandler.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-/***********************************************************************
- * Project: CoreCms.Net *
- * Web: https://CoreCms.Net *
- * ProjectName: 核心内容管理系统 *
- * Author: 大灰灰 *
- * Email: JianWeie@163.com *
- * CreateTime: 2020-08-13 23:57:23
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.Models;
-using MediatR;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Events;
-
-namespace CoreCms.Net.WeChat.Service.Mediator
-{
- ///
- /// 表示 TEXT 事件的数据
- ///
- public class OpenProductCategoryAuditEventCommand : IRequest
- {
- public OpenProductCategoryAuditEvent EventObj { get; set; }
- }
-
- ///
- /// 商品审核结果
- ///
- public class OpenProductCategoryAuditEventCommandHandler : IRequestHandler
- {
- private readonly IWeChatTransactionComponentAuditCategoryAuditLogServices _logServices;
- private readonly IWeChatTransactionComponentAuditCategoryServices _auditCategoryServices;
- private readonly ICoreCmsSettingServices _settingServices;
- private readonly ICoreCmsSmsServices _smsServices;
-
-
- public OpenProductCategoryAuditEventCommandHandler(IWeChatTransactionComponentAuditCategoryAuditLogServices logServices, ICoreCmsSettingServices settingServices, ICoreCmsSmsServices smsServices, IWeChatTransactionComponentAuditCategoryServices auditCategoryServices)
- {
- _logServices = logServices;
- _settingServices = settingServices;
- _smsServices = smsServices;
- _auditCategoryServices = auditCategoryServices;
- }
-
- public async Task Handle(OpenProductCategoryAuditEventCommand request, CancellationToken cancellationToken)
- {
-
- var jm = new WeChatApiCallBack() { Status = true };
-
- if (request.EventObj != null)
- {
- var auditCategory =
- await _auditCategoryServices.QueryByClauseAsync(
- p => p.auditId == request.EventObj.EventData.AuditId);
- if (auditCategory != null)
- {
- await _auditCategoryServices.UpdateAsync(p => new WeChatTransactionComponentAuditCategory()
- {
- status = request.EventObj.EventData.Status,
- rejectReason = request.EventObj.EventData.RejectReason
- }, p => p.auditId == request.EventObj.EventData.AuditId);
-
- var log = new WeChatTransactionComponentAuditCategoryAuditLog();
- log.auditId = request.EventObj.EventData.AuditId;
- log.status = request.EventObj.EventData.Status;
- log.auditType = request.EventObj.EventData.AuditType;
- log.rejectReason = request.EventObj.EventData.RejectReason;
- log.createTime = DateTime.Now;
-
- var id = await _logServices.InsertAsync(log);
- if (id > 0)
- {
- var smsOptions = await _settingServices.GetSmsOptions();
- if (smsOptions.Enabled == true)
- {
- var smsBody = string.Empty;
- if (log.status == 1)
- {
- smsBody = "你提交的类目审核已经通过,请登录平台添加新商品。";
- }
- else if (log.status == 9)
- {
- smsBody = "你提交的类目审核已被拒绝,失败原因为:" + log.rejectReason + ",请修改资料后重新提交。";
-
- }
-
- if (!string.IsNullOrEmpty(smsBody))
- {
- var allConfigs = await _settingServices.GetConfigDictionaries();
- var shopMobile = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShopMobile); //退货联系方式
-
- await _smsServices.SendSms(shopMobile, smsBody, smsOptions);
- }
- }
- }
- }
- }
-
- return await Task.FromResult(jm);
- }
- }
-
-}
diff --git a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductOrderConfirmEventCommandHandler.cs b/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductOrderConfirmEventCommandHandler.cs
deleted file mode 100644
index 9fc01e0e..00000000
--- a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductOrderConfirmEventCommandHandler.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-/***********************************************************************
- * Project: CoreCms.Net *
- * Web: https://CoreCms.Net *
- * ProjectName: 核心内容管理系统 *
- * Author: 大灰灰 *
- * Email: JianWeie@163.com *
- * CreateTime: 2020-08-13 23:57:23
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Loging;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.Models;
-using MediatR;
-using Newtonsoft.Json;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Events;
-
-namespace CoreCms.Net.WeChat.Service.Mediator
-{
- ///
- /// 表示 TEXT 事件的数据
- ///
- public class OpenProductOrderConfirmEventCommand : IRequest
- {
- public OpenProductOrderConfirmEvent EventObj { get; set; }
- }
-
- ///
- /// 用户确认收货事件回调。
- ///
- public class OpenProductOrderConfirmEventCommandHandler : IRequestHandler
- {
- private readonly ICoreCmsOrderServices _orderServices;
-
-
-
- public OpenProductOrderConfirmEventCommandHandler(ICoreCmsOrderServices orderServices)
- {
- _orderServices = orderServices;
- }
-
- public async Task Handle(OpenProductOrderConfirmEventCommand request, CancellationToken cancellationToken)
- {
- var jm = new WeChatApiCallBack() { Status = true };
- if (request.EventObj != null)
- {
- try
- {
-
- await _orderServices.CompleteOrder(request.EventObj.Order.OutOrderId, 0, "微信消息推送事件", "wxpost");
- }
- catch (Exception e)
- {
- NLogUtil.WriteFileLog(NLog.LogLevel.Info, LogType.WxPost, "接收服务器推送", "用户确认收货事件回调异常", e);
-
- }
- }
- return await Task.FromResult(jm);
- }
- }
-
-}
diff --git a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductOrderPayEventCommandHandler.cs b/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductOrderPayEventCommandHandler.cs
deleted file mode 100644
index e0bb8f80..00000000
--- a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductOrderPayEventCommandHandler.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/***********************************************************************
- * Project: CoreCms.Net *
- * Web: https://CoreCms.Net *
- * ProjectName: 核心内容管理系统 *
- * Author: 大灰灰 *
- * Email: JianWeie@163.com *
- * CreateTime: 2020-08-13 23:57:23
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Loging;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.Models;
-using MediatR;
-using Newtonsoft.Json;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Events;
-
-namespace CoreCms.Net.WeChat.Service.Mediator
-{
- ///
- /// 表示 TEXT 事件的数据
- ///
- public class OpenProductOrderPayEventCommand : IRequest
- {
- public OpenProductOrderPayEvent EventObj { get; set; }
- }
-
- ///
- /// 订单支付回调
- ///
- public class OpenProductOrderPayEventCommandHandler : IRequestHandler
- {
- private readonly ICoreCmsOrderServices _orderServices;
- private readonly ICoreCmsBillPaymentsServices _billPaymentsServices;
- private readonly IWeChatTransactionComponentOrderServices _transactionComponentOrderServices;
-
-
-
- public OpenProductOrderPayEventCommandHandler(ICoreCmsOrderServices orderServices, ICoreCmsBillPaymentsServices billPaymentsServices, IWeChatTransactionComponentOrderServices transactionComponentOrderServices)
- {
- _orderServices = orderServices;
- _billPaymentsServices = billPaymentsServices;
- _transactionComponentOrderServices = transactionComponentOrderServices;
- }
-
- public async Task Handle(OpenProductOrderPayEventCommand request, CancellationToken cancellationToken)
- {
- var jm = new WeChatApiCallBack() { Status = true };
- if (request.EventObj != null)
- {
- try
- {
- var tcOrder = await _transactionComponentOrderServices.QueryByClauseAsync(p => p.orderId == request.EventObj.Order.OrderId && p.outOrderId == request.EventObj.Order.OutOrderId);
- var order = await _orderServices.QueryByClauseAsync(p => p.orderId == tcOrder.outOrderId);
-
- await _billPaymentsServices.ToUpdate(tcOrder.paymentId,
- (int)GlobalEnumVars.BillPaymentsStatus.Payed,
- GlobalEnumVars.PaymentsTypes.wechatpay.ToString(), order.orderAmount, JsonConvert.SerializeObject(request),
- request.EventObj.Order.TransactionId);
- }
- catch (Exception e)
- {
- NLogUtil.WriteFileLog(NLog.LogLevel.Info, LogType.WxPost, "接收服务器推送", "订单支付回调异常", e);
-
- }
- }
- return await Task.FromResult(jm);
- }
- }
-
-}
diff --git a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductSPUAuditEventCommandHandler.cs b/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductSPUAuditEventCommandHandler.cs
deleted file mode 100644
index daa4c0be..00000000
--- a/CoreCms.Net.WeChat.Service/Mediator/TransactionComponent/OpenProductSPUAuditEventCommandHandler.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-/***********************************************************************
- * Project: CoreCms.Net *
- * Web: https://CoreCms.Net *
- * ProjectName: 核心内容管理系统 *
- * Author: 大灰灰 *
- * Email: JianWeie@163.com *
- * CreateTime: 2020-08-13 23:57:23
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Threading;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.Models;
-using MediatR;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Events;
-
-namespace CoreCms.Net.WeChat.Service.Mediator
-{
- ///
- /// 表示 TEXT 事件的数据
- ///
- public class OpenProductSPUAuditEventCommand : IRequest
- {
- public OpenProductSPUAuditEvent EventObj { get; set; }
- }
-
- ///
- /// 商品审核结果
- ///
- public class OpenProductSPUAuditEventCommandHandler : IRequestHandler
- {
- private readonly WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
- private readonly IWeChatTransactionComponentGoodAuditLogServices _logServices;
- private readonly ICoreCmsGoodsServices _goodsServices;
- private readonly ICoreCmsSettingServices _settingServices;
- private readonly ICoreCmsSmsServices _smsServices;
-
-
- public OpenProductSPUAuditEventCommandHandler(IWeChatApiHttpClientFactory weChatApiHttpClientFactory, IWeChatTransactionComponentGoodAuditLogServices logServices, ICoreCmsGoodsServices goodsServices, ICoreCmsSettingServices settingServices, ICoreCmsSmsServices smsServices)
- {
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- _logServices = logServices;
- _goodsServices = goodsServices;
- _settingServices = settingServices;
- _smsServices = smsServices;
- }
-
- public async Task Handle(OpenProductSPUAuditEventCommand request, CancellationToken cancellationToken)
- {
-
- var jm = new WeChatApiCallBack() { Status = true };
-
- if (request.EventObj != null)
- {
- var log = new WeChatTransactionComponentGoodAuditLog();
- log.outProductId = request.EventObj.EventData.OutProductId;
- log.productId = request.EventObj.EventData.ProductId;
- log.status = request.EventObj.EventData.Status;
- log.rejectReason = request.EventObj.EventData.RejectReason;
- log.createTime = DateTime.Now;
-
- var id = await _logServices.InsertAsync(log);
- if (id > 0)
- {
- var smsOptions = await _settingServices.GetSmsOptions();
- if (smsOptions.Enabled == true)
- {
- var smsBody = string.Empty;
- if (log.status == 4)
- {
- smsBody = "你提交的商品审核已经通过,请登录平台上架商品。";
- }
- else if (log.status == 3)
- {
- smsBody = "你提交的商品审核已被拒绝,失败原因为:" + log.rejectReason + ",请修改资料后重新提交。";
-
- }
-
- if (!string.IsNullOrEmpty(smsBody))
- {
- var allConfigs = await _settingServices.GetConfigDictionaries();
- var shopMobile = CommonHelper.GetConfigDictionary(allConfigs, SystemSettingConstVars.ShopMobile); //退货联系方式
-
- await _smsServices.SendSms(shopMobile, smsBody, smsOptions);
- }
- }
- }
- }
-
- return await Task.FromResult(jm);
- }
- }
-
-}
diff --git a/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/AuditEnum.cs b/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/AuditEnum.cs
deleted file mode 100644
index ca55a46c..00000000
--- a/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/AuditEnum.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/15 0:45:18
- * Description: 暂无
- ***********************************************************************/
-
-
-using System.ComponentModel;
-
-namespace CoreCms.Net.WeChat.Service.TransactionComponent.Enum
-{
- ///
- /// 审核相关
- ///
- public class AuditEnum
- {
- ///
- /// 查询品牌和类目的审核结果状态
- ///
- public enum AuditCategoryStatus
- {
- [Description("")]
- 审核中 = 0,
-
- [Description("")]
- 审核成功 = 1,
-
- [Description("")]
- 审核拒绝 = 9
- }
-
-
- }
-}
diff --git a/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/OrderEnum.cs b/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/OrderEnum.cs
deleted file mode 100644
index 943fe0f4..00000000
--- a/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/OrderEnum.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/10 1:29:02
- * Description: 暂无
- ***********************************************************************/
-
-
-using System.ComponentModel;
-
-namespace CoreCms.Net.WeChat.Service.TransactionComponent.Enum
-{
- ///
- /// 配送方式
- ///
- public enum DeliveryTypeEnum
- {
- 正常快递 = 1,
- 无需快递 = 2,
- 线下配送 = 3,
- 用户自提 = 4,
- }
-
- public enum OrderStatus
- {
- [Description("待付款")]
- 待付款 = 10,
-
- [Description("收银台支付完成")]
- 收银台支付完成 = 11,
-
- [Description("待发货")]
- 待发货 = 20,
-
- [Description("待收货")]
- 待收货 = 30,
-
- [Description("完成")]
- 完成 = 100,
-
- [Description("全部商品售后之后订单取消")]
- 售后之后取消 = 200,
-
- [Description("用户主动取消/待付款超时取消/商家取消")]
- 正常取消 = 4,
- }
-}
diff --git a/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/SpuEnum.cs b/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/SpuEnum.cs
deleted file mode 100644
index 7888d62f..00000000
--- a/CoreCms.Net.WeChat.Service/TransactionComponent/Enum/SpuEnum.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/6 1:10:15
- * Description: 暂无
- ***********************************************************************/
-
-
-using System.ComponentModel;
-
-namespace CoreCms.Net.WeChat.Service.TransactionComponent.Enum
-{
- ///
- /// SPU枚举
- ///
- public class SpuEnum
- {
- ///
- /// SPU审核状态
- ///
- public enum EditStatus
- {
- ///
- /// 未审核
- ///
- [Description("未审核")]
- VerifyNo = 1,
-
- ///
- /// 审核中
- ///
- [Description("审核中")]
- Verifying = 2,
-
- ///
- /// 审核拒绝
- ///
- [Description("审核拒绝")]
- VerifyRefuse = 3,
-
- ///
- /// 审核通过
- ///
- [Description("审核通过")]
- VerifyYes = 4,
-
- }
-
- ///
- /// SPU审状态
- ///
- public enum SPUStatus
- {
- ///
- /// 初始值
- ///
- [Description("初始值")]
- InitialValue = 0,
-
- ///
- /// 上架
- ///
- [Description("上架")]
- Added = 5,
-
- ///
- /// 自主下架
- ///
- [Description("自主下架")]
- SoldOut = 11,
-
- ///
- /// 违规下架/风控系统下架
- ///
- [Description("违规下架/风控系统下架")]
- SytemSoldOut = 13,
-
- }
-
- }
-}
diff --git a/CoreCms.Net.WeChat.Service/TransactionComponent/FromBody/FMUpdateInfo.cs b/CoreCms.Net.WeChat.Service/TransactionComponent/FromBody/FMUpdateInfo.cs
deleted file mode 100644
index d082bdde..00000000
--- a/CoreCms.Net.WeChat.Service/TransactionComponent/FromBody/FMUpdateInfo.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace CoreCms.Net.WeChat.Service.TransactionComponent.FromBody
-{
- ///
- /// 更新商家信息提交
- ///
- public class FMUpdateInfo
- {
-
- ///
- /// 小程序path
- ///
- public string service_agent_path { get; set; }
- ///
- ///
- ///
- public string service_agent_phone { get; set; }
- ///
- ///
- ///
- public List service_agent_type { get; set; }
- ///
- ///
- ///
- public Default_receiving_address default_receiving_address { get; set; }
-
- }
-
- ///
- /// 默认退货地址,退货售后超时时,会让用户将货物寄往此地址。
- ///
- public class Default_receiving_address
- {
- ///
- /// 张三
- ///
- public string receiver_name { get; set; }
- ///
- /// 详细收货地址信息
- ///
- public string detailed_address { get; set; }
- ///
- /// 收货人电话
- ///
- public string tel_number { get; set; }
- ///
- /// 国家
- ///
- public string country { get; set; }
- ///
- /// 省份
- ///
- public string province { get; set; }
- ///
- /// 城市
- ///
- public string city { get; set; }
- ///
- /// 区县
- ///
- public string town { get; set; }
- }
-
-}
diff --git a/CoreCms.Net.Web.Admin/Controllers/Order/CoreCmsOrderController.cs b/CoreCms.Net.Web.Admin/Controllers/Order/CoreCmsOrderController.cs
index ba95e27f..9491fada 100644
--- a/CoreCms.Net.Web.Admin/Controllers/Order/CoreCmsOrderController.cs
+++ b/CoreCms.Net.Web.Admin/Controllers/Order/CoreCmsOrderController.cs
@@ -28,7 +28,6 @@ using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Utility.Extensions;
using CoreCms.Net.Utility.Helper;
using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.TransactionComponent.Enum;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
@@ -62,9 +61,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
private readonly ICoreCmsLogisticsServices _logisticsServices;
private readonly ICoreCmsPaymentsServices _paymentsServices;
private readonly ICoreCmsSettingServices _settingServices;
- private readonly IWeChatTransactionComponentOrderServices _tcOrderServices;
private readonly ICoreCmsUserWeChatInfoServices _userWeChatInfoServices;
- private readonly IWeChatTransactionComponentDeliveryCompanyServices _tcDeliveryCompanyServices;
private readonly IRedisOperationRepository _redisOperationRepository;
private readonly CoreCms.Net.WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
@@ -85,7 +82,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
, ICoreCmsLogisticsServices logisticsServices
, ICoreCmsBillPaymentsServices billPaymentsServices
, ICoreCmsPaymentsServices paymentsServices
- , ICoreCmsSettingServices settingServices, IWeChatTransactionComponentOrderServices tcOrderServices, ICoreCmsUserWeChatInfoServices userWeChatInfoServices, IWeChatTransactionComponentDeliveryCompanyServices tcDeliveryCompanyServices, IRedisOperationRepository redisOperationRepository, ICoreCmsBillDeliveryServices billDeliveryServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, ICoreCmsOrderItemServices orderItemServices)
+ , ICoreCmsSettingServices settingServices, ICoreCmsUserWeChatInfoServices userWeChatInfoServices, IRedisOperationRepository redisOperationRepository, ICoreCmsBillDeliveryServices billDeliveryServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, ICoreCmsOrderItemServices orderItemServices)
{
_webHostEnvironment = webHostEnvironment;
_coreCmsOrderServices = coreCmsOrderServices;
@@ -97,9 +94,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
_billPaymentsServices = billPaymentsServices;
_paymentsServices = paymentsServices;
_settingServices = settingServices;
- _tcOrderServices = tcOrderServices;
_userWeChatInfoServices = userWeChatInfoServices;
- _tcDeliveryCompanyServices = tcDeliveryCompanyServices;
_redisOperationRepository = redisOperationRepository;
_billDeliveryServices = billDeliveryServices;
_weChatApiHttpClientFactory = weChatApiHttpClientFactory;
@@ -498,7 +493,6 @@ namespace CoreCms.Net.Web.Admin.Controllers
var storeList = await _storeServices.QueryAsync();
var logistics = await _logisticsServices.QueryListByClauseAsync(p => p.isDelete == false);
- var deliveryCompany = await _tcDeliveryCompanyServices.GetCaChe();
var result = await _coreCmsOrderServices.GetOrderShipInfo(entity.id);
if (!result.status)
@@ -525,7 +519,6 @@ namespace CoreCms.Net.Web.Admin.Controllers
orderModel = result.data,
storeList,
logistics,
- deliveryCompany
};
return jm;
@@ -1660,7 +1653,6 @@ namespace CoreCms.Net.Web.Admin.Controllers
}
#endregion
-
#region 批量删除订单============================================================
// POST: Api/CoreCmsOrder/DeleteOrder/10
///
@@ -1724,8 +1716,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
return jm;
}
#endregion
-
-
+
#region 预览快递进度============================================================
// POST: Api/CoreCmsOrder/GetDetails/10
///
@@ -1752,99 +1743,5 @@ namespace CoreCms.Net.Web.Admin.Controllers
}
#endregion
- #region 获取交易组件订单信息
- // POST: Api/CoreCmsOrder/GetTcOrder/10
- ///
- /// 获取交易组件订单信息
- ///
- ///
- ///
- [HttpPost]
- [Description("获取交易组件订单信息")]
- public async Task GetTcOrder([FromBody] FMStringId entity)
- {
- var jm = new AdminUiCallBack();
-
- var orderModel = await _coreCmsOrderServices.QueryByClauseAsync(p => p.orderId == entity.id);
- if (orderModel == null)
- {
- jm.msg = "不存在此订单信息";
- return jm;
- }
-
- var tcOrder = await _tcOrderServices.QueryByClauseAsync(p => p.outOrderId == entity.id);
- if (tcOrder == null)
- {
- jm.msg = "不存在此订单交易组件推送记录";
- return jm;
- }
-
- var weChatUserInfo = await _userWeChatInfoServices.QueryByClauseAsync(p => p.userId == orderModel.userId);
- if (weChatUserInfo == null)
- {
- jm.msg = "用户微信数据拉取失败";
- return jm;
- }
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopOrderGetRequest();
- request.AccessToken = accessToken;
- request.OutOrderId = orderModel.orderId;
- request.OpenId = weChatUserInfo.openid;
-
- var response = await client.ExecuteShopOrderGetAsync(request);
-
- var orderStatus = EnumHelper.EnumToList();
- var deliveryTypeEnum = EnumHelper.EnumToList();
-
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "获取成功" : response.ErrorMessage;
- jm.data = new
- {
- response.Order,
- orderStatus,
- deliveryTypeEnum
- };
- jm.otherData = accessToken;
-
- //更新拉取订单
- if (response.Order is { OrderId: > 0 } && tcOrder.orderId == null)
- {
- await _tcOrderServices.UpdateAsync(
- p => new WeChatTransactionComponentOrder() { orderId = response.Order.OrderId },
- p => p.id == tcOrder.id && p.outOrderId == tcOrder.outOrderId);
- }
-
- if (response.Order is { OrderId: > 0 } && (response.Order.Status == 11 || response.Order.Status == 10) && (orderModel.payStatus == (int)GlobalEnumVars.OrderPayStatus.Yes || orderModel.payStatus == (int)GlobalEnumVars.OrderPayStatus.PartialYes))
- {
- var payment = await _billPaymentsServices.QueryByClauseAsync(p =>
- p.sourceId == orderModel.orderId && p.status == (int)GlobalEnumVars.BillPaymentsStatus.Payed);
- if (payment != null)
- {
- var userInfo = await _userWeChatInfoServices.QueryByClauseAsync(p => p.userId == orderModel.userId);
- //获取同步地址接口地址
- var refreshRequest = new ShopOrderPayRequest();
- refreshRequest.AccessToken = accessToken;
- refreshRequest.OutOrderId = orderModel.orderId;
- refreshRequest.OpenId = userInfo.openid;
- refreshRequest.ActionType = 1;
- refreshRequest.TransactionId = payment.tradeNo;
- refreshRequest.PayTime = payment.createTime;
-
- var refreshResponse = await client.ExecuteShopOrderPayAsync(refreshRequest);
- NLogUtil.WriteAll(NLog.LogLevel.Error, LogType.RedisMessageQueue, "自定义交易组件-手动同步", JsonConvert.SerializeObject(refreshResponse));
- }
-
-
- }
-
- return jm;
- }
-
- #endregion
-
}
}
diff --git a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentAccountController.cs b/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentAccountController.cs
deleted file mode 100644
index 88a9c93f..00000000
--- a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentAccountController.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-using System;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Mvc;
-using System.ComponentModel;
-using System.Linq;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.ViewModels.UI;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-using CoreCms.Net.WeChat.Service.TransactionComponent.FromBody;
-
-namespace CoreCms.Net.Web.Admin.Controllers.WeChat
-{
- ///
- /// 自定义交易组件上传类目资质
- ///
- [Description("自定义交易组件上传类目资质")]
- [Route("api/[controller]/[action]")]
- [ApiController]
- public class WeChatTransactionComponentAccountController : ControllerBase
- {
- private readonly Net.WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
- ///
- /// 构造函数
- ///
- ///
- public WeChatTransactionComponentAccountController(IWeChatApiHttpClientFactory weChatApiHttpClientFactory)
- {
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- }
-
-
- #region 获取商家信息============================================================
- // POST: Api/WeChatTransactionComponentAccount/GetInfo
- ///
- /// 获取商家信息
- ///
- ///
- [HttpPost]
- [Description("获取商家信息")]
- public async Task GetInfo()
- {
- var jm = new AdminUiCallBack();
-
- try
- {
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopAccountGetInfoRequest();
- request.AccessToken = accessToken;
-
- var response = await client.ExecuteShopAccountGetInfoAsync(request);
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "获取成功" : response.ErrorMessage;
- jm.data = response.Data;
-
- jm.otherData = new
- {
- service_agent_type_service = response.Data.ServiceAgentTypeList?.Contains(0) == true ? 0 : -1,
- service_agent_type_phone = response.Data.ServiceAgentTypeList?.Contains(2) == true ? 0 : -1,
- service_agent_type_path = response.Data.ServiceAgentTypeList?.Contains(1) == true ? 0 : -1,
- };
- }
- catch (Exception e)
- {
- jm.code = 0;
- jm.msg = e.Message;
- jm.otherData = new
- {
- service_agent_type_service = -1,
- service_agent_type_phone = -1,
- service_agent_type_path = -1,
- };
- }
-
- return jm;
- }
- #endregion
-
- #region 更新商家信息============================================================
- // POST: Api/WeChatTransactionComponentAccount/DoUpdateInfo
- ///
- /// 更新商家信息
- ///
- ///
- ///
- [HttpPost]
- [Description("更新商家信息")]
- public async Task DoUpdateInfo([FromBody] FMUpdateInfo entity)
- {
- var jm = new AdminUiCallBack { code = 0 };
-
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopAccountUpdateInfoRequest();
- request.AccessToken = accessToken;
-
- request.ServiceAgentTypeList = entity.service_agent_type;
- request.ServiceAgentPagePath = entity.service_agent_path;
- request.ServiceAgentPhoneNumber = entity.service_agent_phone;
-
- request.DefaultReceivingAddress = new ShopAccountUpdateInfoRequest.Types.Address();
- request.DefaultReceivingAddress.ReceiverName = entity.default_receiving_address.receiver_name;
- request.DefaultReceivingAddress.Detail = entity.default_receiving_address.detailed_address;
- request.DefaultReceivingAddress.TeleNumber = entity.default_receiving_address.tel_number;
- request.DefaultReceivingAddress.Country = entity.default_receiving_address.country;
- request.DefaultReceivingAddress.Province = entity.default_receiving_address.province;
- request.DefaultReceivingAddress.City = entity.default_receiving_address.city;
- request.DefaultReceivingAddress.District = entity.default_receiving_address.town;
-
- var response = await client.ExecuteShopAccountUpdateInfoAsync(request);
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "更新成功" : response.ErrorMessage;
-
- jm.data = entity;
-
- return jm;
- }
- #endregion
-
-
- }
-}
diff --git a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentAuditCategoryController.cs b/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentAuditCategoryController.cs
deleted file mode 100644
index 35a1d7d6..00000000
--- a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentAuditCategoryController.cs
+++ /dev/null
@@ -1,402 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/14 23:14:23
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.Entities.Expression;
-using CoreCms.Net.Model.FromBody;
-using CoreCms.Net.Model.ViewModels.UI;
-using CoreCms.Net.Filter;
-using CoreCms.Net.Loging;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.Utility.Extensions;
-using CoreCms.Net.WeChat.Service.TransactionComponent.Enum;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using NPOI.HSSF.UserModel;
-using SqlSugar;
-
-namespace CoreCms.Net.Web.Admin.Controllers
-{
- ///
- /// 自定义交易组件上传类目资质
- ///
- [Description("自定义交易组件上传类目资质")]
- [Route("api/[controller]/[action]")]
- [ApiController]
- [RequiredErrorForAdmin]
- [Authorize(Permissions.Name)]
- public class WeChatTransactionComponentAuditCategoryController : ControllerBase
- {
- private readonly IWebHostEnvironment _webHostEnvironment;
- private readonly IWeChatTransactionComponentAuditCategoryServices _weChatTransactionComponentAuditCategoryServices;
-
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentAuditCategoryController(IWebHostEnvironment webHostEnvironment
- , IWeChatTransactionComponentAuditCategoryServices weChatTransactionComponentAuditCategoryServices
- )
- {
- _webHostEnvironment = webHostEnvironment;
- _weChatTransactionComponentAuditCategoryServices = weChatTransactionComponentAuditCategoryServices;
- }
-
- #region 获取列表============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/GetPageList
- ///
- /// 获取列表
- ///
- ///
- [HttpPost]
- [Description("获取列表")]
- public async Task GetPageList()
- {
- var jm = new AdminUiCallBack();
- var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
- var pageSize = Request.Form["limit"].FirstOrDefault().ObjectToInt(30);
- var where = PredicateBuilder.True();
- //获取排序字段
- var orderField = Request.Form["orderField"].FirstOrDefault();
-
- Expression> orderEx = orderField switch
- {
- "id" => p => p.id,
- "licenseImage" => p => p.licenseImage,
- "level1" => p => p.level1,
- "level1Name" => p => p.level1Name,
- "level2" => p => p.level2,
- "level2Name" => p => p.level2Name,
- "level3" => p => p.level3,
- "level3Name" => p => p.level3Name,
- "certificateImage" => p => p.certificateImage,
- "auditId" => p => p.auditId,
- "status" => p => p.status,
- "brandId" => p => p.brandId,
- "rejectReason" => p => p.rejectReason,
- "createTime" => p => p.createTime,
- _ => p => p.id
- };
-
- //设置排序方式
- var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
- var orderBy = orderDirection switch
- {
- "asc" => OrderByType.Asc,
- "desc" => OrderByType.Desc,
- _ => OrderByType.Desc
- };
- //查询筛选
-
- //序列 int
- var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
- if (id > 0)
- {
- where = where.And(p => p.id == id);
- }
- //营业执照或组织机构代码证 nvarchar
- var licenseImage = Request.Form["licenseImage"].FirstOrDefault();
- if (!string.IsNullOrEmpty(licenseImage))
- {
- where = where.And(p => p.licenseImage.Contains(licenseImage));
- }
- //一级类目 int
- var level1 = Request.Form["level1"].FirstOrDefault().ObjectToInt(0);
- if (level1 > 0)
- {
- where = where.And(p => p.level1 == level1);
- }
- //一级类目名称 nvarchar
- var level1Name = Request.Form["level1Name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(level1Name))
- {
- where = where.And(p => p.level1Name.Contains(level1Name));
- }
- //二级类目 int
- var level2 = Request.Form["level2"].FirstOrDefault().ObjectToInt(0);
- if (level2 > 0)
- {
- where = where.And(p => p.level2 == level2);
- }
- //二级类目名称 nvarchar
- var level2Name = Request.Form["level2Name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(level2Name))
- {
- where = where.And(p => p.level2Name.Contains(level2Name));
- }
- //三级类目 int
- var level3 = Request.Form["level3"].FirstOrDefault().ObjectToInt(0);
- if (level3 > 0)
- {
- where = where.And(p => p.level3 == level3);
- }
- //三级类目名称 nvarchar
- var level3Name = Request.Form["level3Name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(level3Name))
- {
- where = where.And(p => p.level3Name.Contains(level3Name));
- }
- //资质材料 nvarchar
- var certificateImage = Request.Form["certificateImage"].FirstOrDefault();
- if (!string.IsNullOrEmpty(certificateImage))
- {
- where = where.And(p => p.certificateImage.Contains(certificateImage));
- }
- //审核单 nvarchar
- var auditId = Request.Form["auditId"].FirstOrDefault();
- if (!string.IsNullOrEmpty(auditId))
- {
- where = where.And(p => p.auditId.Contains(auditId));
- }
- //审核状态 int
- var status = Request.Form["status"].FirstOrDefault().ObjectToInt(0);
- if (status > 0)
- {
- where = where.And(p => p.status == status);
- }
- //品牌id int
- var brandId = Request.Form["brandId"].FirstOrDefault().ObjectToInt(0);
- if (brandId > 0)
- {
- where = where.And(p => p.brandId == brandId);
- }
- //拒绝原因 nvarchar
- var rejectReason = Request.Form["rejectReason"].FirstOrDefault();
- if (!string.IsNullOrEmpty(rejectReason))
- {
- where = where.And(p => p.rejectReason.Contains(rejectReason));
- }
- //创建时间 datetime
- var createTime = Request.Form["createTime"].FirstOrDefault();
- if (!string.IsNullOrEmpty(createTime))
- {
- if (createTime.Contains("到"))
- {
- var dts = createTime.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.createTime > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.createTime < dtEnd);
- }
- else
- {
- var dt = createTime.ObjectToDate();
- where = where.And(p => p.createTime > dt);
- }
- }
- //获取数据
- var list = await _weChatTransactionComponentAuditCategoryServices.QueryPageAsync(where, orderEx, orderBy, pageCurrent, pageSize, true);
- //返回数据
- jm.data = list;
- jm.code = 0;
- jm.count = list.TotalCount;
- jm.msg = "数据调用成功!";
- return jm;
- }
- #endregion
-
- #region 首页数据============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/GetIndex
- ///
- /// 首页数据
- ///
- ///
- [HttpPost]
- [Description("首页数据")]
- public AdminUiCallBack GetIndex()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
-
- var auditCategoryStatus = EnumHelper.EnumToList();
-
- jm.data = new
- {
- auditCategoryStatus
- };
-
- return jm;
- }
- #endregion
-
- #region 创建数据============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/GetCreate
- ///
- /// 创建数据
- ///
- ///
- [HttpPost]
- [Description("创建数据")]
- public AdminUiCallBack GetCreate()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
- return jm;
- }
- #endregion
-
- #region 创建提交============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/DoCreate
- ///
- /// 创建提交
- ///
- ///
- ///
- [HttpPost]
- [Description("创建提交")]
- public async Task DoCreate([FromBody] WeChatTransactionComponentAuditCategory entity)
- {
- var jm = await _weChatTransactionComponentAuditCategoryServices.InsertAsync(entity);
- return jm;
- }
- #endregion
-
- #region 编辑数据============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/GetEdit
- ///
- /// 编辑数据
- ///
- ///
- ///
- [HttpPost]
- [Description("编辑数据")]
- public async Task GetEdit([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentAuditCategoryServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
- jm.code = 0;
- jm.data = model;
-
- return jm;
- }
- #endregion
-
- #region 编辑提交============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/Edit
- ///
- /// 编辑提交
- ///
- ///
- ///
- [HttpPost]
- [Description("编辑提交")]
- public async Task DoEdit([FromBody] WeChatTransactionComponentAuditCategory entity)
- {
- var jm = await _weChatTransactionComponentAuditCategoryServices.UpdateAsync(entity);
- return jm;
- }
- #endregion
-
- #region 删除数据============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/DoDelete/10
- ///
- /// 单选删除
- ///
- ///
- ///
- [HttpPost]
- [Description("单选删除")]
- public async Task DoDelete([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentAuditCategoryServices.ExistsAsync(p => p.id == entity.id, true);
- if (!model)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
- jm = await _weChatTransactionComponentAuditCategoryServices.DeleteByIdAsync(entity.id);
-
- return jm;
- }
- #endregion
-
- #region 预览数据============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/GetDetails/10
- ///
- /// 预览数据
- ///
- ///
- ///
- [HttpPost]
- [Description("预览数据")]
- public async Task GetDetails([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentAuditCategoryServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
- jm.code = 0;
-
- var auditCategoryStatus = EnumHelper.EnumToList();
- jm.data = new
- {
- model,
- auditCategoryStatus,
- imagesArr = model.certificateImage.Split(",")
- };
-
- return jm;
- }
- #endregion
-
- #region 同步审核状态============================================================
- // POST: Api/WeChatTransactionComponentAuditCategory/DoDelete/10
- ///
- /// 同步审核状态
- ///
- ///
- ///
- [HttpPost]
- [Description("同步审核状态")]
- public async Task DoRefresh([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentAuditCategoryServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- if (string.IsNullOrEmpty(model.auditId))
- {
- jm.msg = "审核单获取失败,请重新提交";
- return jm;
- }
-
- jm = await _weChatTransactionComponentAuditCategoryServices.RefreshStatus(model);
- return jm;
- }
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentBrandAuditController.cs b/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentBrandAuditController.cs
deleted file mode 100644
index 6c1554c2..00000000
--- a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentBrandAuditController.cs
+++ /dev/null
@@ -1,585 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2022/3/20 1:19:25
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.Entities.Expression;
-using CoreCms.Net.Model.FromBody;
-using CoreCms.Net.Model.ViewModels.UI;
-using CoreCms.Net.Filter;
-using CoreCms.Net.Loging;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.Utility.Extensions;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.TransactionComponent.Enum;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using NPOI.HSSF.UserModel;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-using SqlSugar;
-
-namespace CoreCms.Net.Web.Admin.Controllers
-{
- ///
- /// 自定义交易组件上传品牌信息
- ///
- [Description("自定义交易组件上传品牌信息")]
- [Route("api/[controller]/[action]")]
- [ApiController]
- [RequiredErrorForAdmin]
- [Authorize(Permissions.Name)]
- public class WeChatTransactionComponentBrandAuditController : ControllerBase
- {
- private readonly IWebHostEnvironment _webHostEnvironment;
- private readonly IWeChatTransactionComponentBrandAuditServices _weChatTransactionComponentBrandAuditServices;
- private readonly CoreCms.Net.WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentBrandAuditController(IWebHostEnvironment webHostEnvironment
- , IWeChatTransactionComponentBrandAuditServices weChatTransactionComponentBrandAuditServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory)
- {
- _webHostEnvironment = webHostEnvironment;
- _weChatTransactionComponentBrandAuditServices = weChatTransactionComponentBrandAuditServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- }
-
- #region 获取列表============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/GetPageList
- ///
- /// 获取列表
- ///
- ///
- [HttpPost]
- [Description("获取列表")]
- public async Task GetPageList()
- {
- var jm = new AdminUiCallBack();
- var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
- var pageSize = Request.Form["limit"].FirstOrDefault().ObjectToInt(30);
- var where = PredicateBuilder.True();
- //获取排序字段
- var orderField = Request.Form["orderField"].FirstOrDefault();
-
- Expression> orderEx = orderField switch
- {
- "id" => p => p.id,
- "license" => p => p.license,
- "brand_audit_type" => p => p.brand_audit_type,
- "trademark_type" => p => p.trademark_type,
- "brand_management_type" => p => p.brand_management_type,
- "commodity_origin_type" => p => p.commodity_origin_type,
- "brand_wording" => p => p.brand_wording,
- "sale_authorization" => p => p.sale_authorization,
- "trademark_registration_certificate" => p => p.trademark_registration_certificate,
- "trademark_change_certificate" => p => p.trademark_change_certificate,
- "trademark_registrant" => p => p.trademark_registrant,
- "trademark_registrant_nu" => p => p.trademark_registrant_nu,
- "trademark_authorization_period" => p => p.trademark_authorization_period,
- "trademark_registration_application" => p => p.trademark_registration_application,
- "trademark_applicant" => p => p.trademark_applicant,
- "trademark_application_time" => p => p.trademark_application_time,
- "imported_goods_form" => p => p.imported_goods_form,
- "scene_group_list" => p => p.scene_group_list,
- "audit_id" => p => p.audit_id,
- "status" => p => p.status,
- "brandId" => p => p.brandId,
- "rejectReason" => p => p.rejectReason,
- "createTime" => p => p.createTime,
- _ => p => p.id
- };
-
- //设置排序方式
- var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
- var orderBy = orderDirection switch
- {
- "asc" => OrderByType.Asc,
- "desc" => OrderByType.Desc,
- _ => OrderByType.Desc
- };
- //查询筛选
-
- //序列 int
- var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
- if (id > 0)
- {
- where = where.And(p => p.id == id);
- }
- //营业执照或组织机构代码证 nvarchar
- var license = Request.Form["license"].FirstOrDefault();
- if (!string.IsNullOrEmpty(license))
- {
- where = where.And(p => p.license.Contains(license));
- }
- //认证审核类型 int
- var brand_audit_type = Request.Form["brand_audit_type"].FirstOrDefault().ObjectToInt(0);
- if (brand_audit_type > 0)
- {
- where = where.And(p => p.brand_audit_type == brand_audit_type);
- }
- //商标分类 nvarchar
- var trademark_type = Request.Form["trademark_type"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_type))
- {
- where = where.And(p => p.trademark_type.Contains(trademark_type));
- }
- //经营类型 int
- var brand_management_type = Request.Form["brand_management_type"].FirstOrDefault().ObjectToInt(0);
- if (brand_management_type > 0)
- {
- where = where.And(p => p.brand_management_type == brand_management_type);
- }
- //商品产地是否进口 int
- var commodity_origin_type = Request.Form["commodity_origin_type"].FirstOrDefault().ObjectToInt(0);
- if (commodity_origin_type > 0)
- {
- where = where.And(p => p.commodity_origin_type == commodity_origin_type);
- }
- //商标/品牌词 nvarchar
- var brand_wording = Request.Form["brand_wording"].FirstOrDefault();
- if (!string.IsNullOrEmpty(brand_wording))
- {
- where = where.And(p => p.brand_wording.Contains(brand_wording));
- }
- //销售授权书 nvarchar
- var sale_authorization = Request.Form["sale_authorization"].FirstOrDefault();
- if (!string.IsNullOrEmpty(sale_authorization))
- {
- where = where.And(p => p.sale_authorization.Contains(sale_authorization));
- }
- //商标注册证书 nvarchar
- var trademark_registration_certificate = Request.Form["trademark_registration_certificate"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_registration_certificate))
- {
- where = where.And(p => p.trademark_registration_certificate.Contains(trademark_registration_certificate));
- }
- //商标变更证明 nvarchar
- var trademark_change_certificate = Request.Form["trademark_change_certificate"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_change_certificate))
- {
- where = where.And(p => p.trademark_change_certificate.Contains(trademark_change_certificate));
- }
- //商标注册人姓名 nvarchar
- var trademark_registrant = Request.Form["trademark_registrant"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_registrant))
- {
- where = where.And(p => p.trademark_registrant.Contains(trademark_registrant));
- }
- //商标注册号/申请号 nvarchar
- var trademark_registrant_nu = Request.Form["trademark_registrant_nu"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_registrant_nu))
- {
- where = where.And(p => p.trademark_registrant_nu.Contains(trademark_registrant_nu));
- }
- //商标有效期 datetime
- var trademark_authorization_period = Request.Form["trademark_authorization_period"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_authorization_period))
- {
- if (trademark_authorization_period.Contains("到"))
- {
- var dts = trademark_authorization_period.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.trademark_authorization_period > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.trademark_authorization_period < dtEnd);
- }
- else
- {
- var dt = trademark_authorization_period.ObjectToDate();
- where = where.And(p => p.trademark_authorization_period > dt);
- }
- }
- //商标注册申请受理通知书 nvarchar
- var trademark_registration_application = Request.Form["trademark_registration_application"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_registration_application))
- {
- where = where.And(p => p.trademark_registration_application.Contains(trademark_registration_application));
- }
- //商标申请人姓名 nvarchar
- var trademark_applicant = Request.Form["trademark_applicant"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_applicant))
- {
- where = where.And(p => p.trademark_applicant.Contains(trademark_applicant));
- }
- //商标申请时间 datetime
- var trademark_application_time = Request.Form["trademark_application_time"].FirstOrDefault();
- if (!string.IsNullOrEmpty(trademark_application_time))
- {
- if (trademark_application_time.Contains("到"))
- {
- var dts = trademark_application_time.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.trademark_application_time > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.trademark_application_time < dtEnd);
- }
- else
- {
- var dt = trademark_application_time.ObjectToDate();
- where = where.And(p => p.trademark_application_time > dt);
- }
- }
- //中华人民共和国海关进口货物报关单 nvarchar
- var imported_goods_form = Request.Form["imported_goods_form"].FirstOrDefault();
- if (!string.IsNullOrEmpty(imported_goods_form))
- {
- where = where.And(p => p.imported_goods_form.Contains(imported_goods_form));
- }
- //商品使用场景 int
- var scene_group_list = Request.Form["scene_group_list"].FirstOrDefault().ObjectToInt(0);
- if (scene_group_list > 0)
- {
- where = where.And(p => p.scene_group_list == scene_group_list);
- }
- //审核单id nvarchar
- var audit_id = Request.Form["audit_id"].FirstOrDefault();
- if (!string.IsNullOrEmpty(audit_id))
- {
- where = where.And(p => p.audit_id.Contains(audit_id));
- }
- //审核状态 int
- var status = Request.Form["status"].FirstOrDefault().ObjectToInt(0);
- if (status > 0)
- {
- where = where.And(p => p.status == status);
- }
- //品牌id int
- var brandId = Request.Form["brandId"].FirstOrDefault().ObjectToInt(0);
- if (brandId > 0)
- {
- where = where.And(p => p.brandId == brandId);
- }
- //拒绝原因 nvarchar
- var rejectReason = Request.Form["rejectReason"].FirstOrDefault();
- if (!string.IsNullOrEmpty(rejectReason))
- {
- where = where.And(p => p.rejectReason.Contains(rejectReason));
- }
- //创建时间 datetime
- var createTime = Request.Form["createTime"].FirstOrDefault();
- if (!string.IsNullOrEmpty(createTime))
- {
- if (createTime.Contains("到"))
- {
- var dts = createTime.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.createTime > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.createTime < dtEnd);
- }
- else
- {
- var dt = createTime.ObjectToDate();
- where = where.And(p => p.createTime > dt);
- }
- }
- //获取数据
- var list = await _weChatTransactionComponentBrandAuditServices.QueryPageAsync(where, orderEx, orderBy, pageCurrent, pageSize, true);
- //返回数据
- jm.data = list;
- jm.code = 0;
- jm.count = list.TotalCount;
- jm.msg = "数据调用成功!";
- return jm;
- }
- #endregion
-
- #region 首页数据============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/GetIndex
- ///
- /// 首页数据
- ///
- ///
- [HttpPost]
- [Description("首页数据")]
- public AdminUiCallBack GetIndex()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
-
- //认证审核类型
- var registerType = EnumHelper.EnumToList();
- //商标分类
- var trademarkType = EnumHelper.EnumToList();
- //品牌经营类型
- var brandManagementType = EnumHelper.EnumToList();
- //商品产地是否进口
- var commodityOriginType = EnumHelper.EnumToList();
-
- var auditCategoryStatus = EnumHelper.EnumToList();
-
-
- jm.data = new
- {
- registerType,
- trademarkType,
- brandManagementType,
- commodityOriginType,
- auditCategoryStatus
- };
-
- return jm;
- }
- #endregion
-
- #region 创建数据============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/GetCreate
- ///
- /// 创建数据
- ///
- ///
- [HttpPost]
- [Description("创建数据")]
- public AdminUiCallBack GetCreate()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
-
- //认证审核类型
- var registerType = EnumHelper.EnumToList();
- //商标分类
- var trademarkType = EnumHelper.EnumToList();
- //品牌经营类型
- var brandManagementType = EnumHelper.EnumToList();
- //商品产地是否进口
- var commodityOriginType = EnumHelper.EnumToList();
-
- jm.data = new
- {
- registerType,
- trademarkType,
- brandManagementType,
- commodityOriginType,
- };
-
- return jm;
- }
- #endregion
-
- #region 创建提交============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/DoCreate
- ///
- /// 创建提交
- ///
- ///
- ///
- [HttpPost]
- [Description("创建提交")]
- public async Task DoCreate([FromBody] WeChatTransactionComponentBrandAudit entity)
- {
- var jm = await _weChatTransactionComponentBrandAuditServices.InsertAsync(entity);
- return jm;
- }
- #endregion
-
- #region 编辑数据============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/GetEdit
- ///
- /// 编辑数据
- ///
- ///
- ///
- [HttpPost]
- [Description("编辑数据")]
- public async Task GetEdit([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentBrandAuditServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
- jm.code = 0;
-
- //认证审核类型
- var registerType = EnumHelper.EnumToList();
- //商标分类
- var trademarkType = EnumHelper.EnumToList();
- //品牌经营类型
- var brandManagementType = EnumHelper.EnumToList();
- //商品产地是否进口
- var commodityOriginType = EnumHelper.EnumToList();
-
- jm.data = new
- {
- model,
- registerType,
- trademarkType,
- brandManagementType,
- commodityOriginType,
- };
-
- return jm;
- }
- #endregion
-
- #region 编辑提交============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/Edit
- ///
- /// 编辑提交
- ///
- ///
- ///
- [HttpPost]
- [Description("编辑提交")]
- public async Task DoEdit([FromBody] WeChatTransactionComponentBrandAudit entity)
- {
- var jm = await _weChatTransactionComponentBrandAuditServices.UpdateAsync(entity);
- return jm;
- }
- #endregion
-
- #region 删除数据============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/DoDelete/10
- ///
- /// 单选删除
- ///
- ///
- ///
- [HttpPost]
- [Description("单选删除")]
- public async Task DoDelete([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentBrandAuditServices.ExistsAsync(p => p.id == entity.id, true);
- if (!model)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
- jm = await _weChatTransactionComponentBrandAuditServices.DeleteByIdAsync(entity.id);
-
- return jm;
- }
- #endregion
-
- #region 预览数据============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/GetDetails/10
- ///
- /// 预览数据
- ///
- ///
- ///
- [HttpPost]
- [Description("预览数据")]
- public async Task GetDetails([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentBrandAuditServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
- jm.code = 0;
- jm.data = model;
-
- return jm;
- }
- #endregion
-
- #region 提交审核============================================================
- // POST: Api/WeChatTransactionComponentBrandAudit/DoAudit/10
- ///
- /// 提交审核
- ///
- ///
- ///
- [HttpPost]
- [Description("提交审核")]
- public async Task DoAudit([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentBrandAuditServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopAuditAuditBrandRequest();
-
- request.AccessToken = accessToken;
-
- request.Audit.LicenseUrl = model.license;
- request.Audit.Brand.BrandAuditType = model.brand_audit_type;
- request.Audit.Brand.TrademarkType = model.trademark_type;
- request.Audit.Brand.BrandManagementType = model.brand_management_type;
- request.Audit.Brand.CommodityOriginType = model.commodity_origin_type;
- request.Audit.Brand.BrandWording = model.brand_wording;
-
- request.Audit.Brand.SaleAuthorizationUrlList = !string.IsNullOrEmpty(model.sale_authorization)
- ? new List(model.sale_authorization.Split(",")) : new List();
-
- request.Audit.Brand.TrademarkRegistrationCertificateUrlList = !string.IsNullOrEmpty(model.trademark_registration_certificate)
- ? new List(model.trademark_registration_certificate.Split(",")) : new List();
-
- request.Audit.Brand.TrademarkChangeCertificateUrlList = !string.IsNullOrEmpty(model.trademark_change_certificate)
- ? new List(model.trademark_change_certificate.Split(",")) : new List();
-
- request.Audit.Brand.TrademarkRegistrant = model.trademark_registrant;
- request.Audit.Brand.TrademarkRegistrantNumber = model.trademark_registrant_nu;
-
- request.Audit.Brand.TrademarkAuthorizationTime = model.trademark_authorization_period;
-
- request.Audit.Brand.TrademarkRegistrationApplicationUrlList = !string.IsNullOrEmpty(model.trademark_registration_application)
- ? new List(model.trademark_registration_application.Split(",")) : new List();
-
-
- request.Audit.Brand.TrademarkApplicant = model.trademark_applicant;
- request.Audit.Brand.TrademarkAuthorizationTime = model.trademark_application_time;
-
- request.Audit.Brand.ImportedGoodsFormUrlList = !string.IsNullOrEmpty(model.imported_goods_form)
- ? new List(model.imported_goods_form.Split(",")) : new List();
-
- var response = await client.ExecuteShopAuditAuditBrandAsync(request);
-
- if (response.IsSuccessful())
- {
- var bl = await _weChatTransactionComponentBrandAuditServices.UpdateAsync(
- p => new WeChatTransactionComponentBrandAudit() { audit_id = response.AuditId },
- p => p.id == model.id);
-
- jm.code = 0;
- jm.msg = "提交审核成功";
- }
- else
- {
- jm.code = 1;
- jm.data = response.ErrorCode;
- jm.msg = response.ErrorMessage;
- jm.otherData = accessToken;
- }
- return jm;
- }
- #endregion
- }
-}
diff --git a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentDeliveryCompanyController.cs b/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentDeliveryCompanyController.cs
deleted file mode 100644
index 98a1f210..00000000
--- a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentDeliveryCompanyController.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/11 23:48:58
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.Entities.Expression;
-using CoreCms.Net.Filter;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.ViewModels.UI;
-using CoreCms.Net.Utility.Extensions;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-using SqlSugar;
-
-namespace CoreCms.Net.Web.Admin.Controllers
-{
- ///
- /// 自定义交易组件快递公司
- ///
- [Description("自定义交易组件快递公司")]
- [Route("api/[controller]/[action]")]
- [ApiController]
- [RequiredErrorForAdmin]
- [Authorize(Permissions.Name)]
- public class WeChatTransactionComponentDeliveryCompanyController : ControllerBase
- {
- private readonly IWebHostEnvironment _webHostEnvironment;
- private readonly IWeChatTransactionComponentDeliveryCompanyServices _weChatTransactionComponentDeliveryCompanyServices;
- private readonly CoreCms.Net.WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
-
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentDeliveryCompanyController(IWebHostEnvironment webHostEnvironment
- , IWeChatTransactionComponentDeliveryCompanyServices weChatTransactionComponentDeliveryCompanyServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory)
- {
- _webHostEnvironment = webHostEnvironment;
- _weChatTransactionComponentDeliveryCompanyServices = weChatTransactionComponentDeliveryCompanyServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- }
-
- #region 获取列表============================================================
- // POST: Api/WeChatTransactionComponentDeliveryCompany/GetPageList
- ///
- /// 获取列表
- ///
- ///
- [HttpPost]
- [Description("获取列表")]
- public async Task GetPageList()
- {
- var jm = new AdminUiCallBack();
- var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
- var pageSize = Request.Form["limit"].FirstOrDefault().ObjectToInt(30);
- var where = PredicateBuilder.True();
- //获取排序字段
- var orderField = Request.Form["orderField"].FirstOrDefault();
-
- Expression> orderEx = orderField switch
- {
- "deliveryId" => p => p.deliveryId,
- "deliveryName" => p => p.deliveryName,
- _ => p => p.deliveryId
- };
-
- //设置排序方式
- var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
- var orderBy = orderDirection switch
- {
- "asc" => OrderByType.Asc,
- "desc" => OrderByType.Desc,
- _ => OrderByType.Desc
- };
- //查询筛选
-
- //快递公司id nvarchar
- var deliveryId = Request.Form["deliveryId"].FirstOrDefault();
- if (!string.IsNullOrEmpty(deliveryId))
- {
- where = where.And(p => p.deliveryId.Contains(deliveryId));
- }
- //快递公司名称 nvarchar
- var deliveryName = Request.Form["deliveryName"].FirstOrDefault();
- if (!string.IsNullOrEmpty(deliveryName))
- {
- where = where.And(p => p.deliveryName.Contains(deliveryName));
- }
- //获取数据
- var list = await _weChatTransactionComponentDeliveryCompanyServices.QueryPageAsync(where, orderEx, orderBy, pageCurrent, pageSize, true);
- //返回数据
- jm.data = list;
- jm.code = 0;
- jm.count = list.TotalCount;
- jm.msg = "数据调用成功!";
- return jm;
- }
- #endregion
-
- #region 首页数据============================================================
- // POST: Api/WeChatTransactionComponentDeliveryCompany/GetIndex
- ///
- /// 首页数据
- ///
- ///
- [HttpPost]
- [Description("首页数据")]
- public AdminUiCallBack GetIndex()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
- return jm;
- }
- #endregion
-
- #region 获取快递公司列表============================================================
- // POST: Api/WeChatTransactionComponentDeliveryCompany/DoGetCompanyList/10
- ///
- /// 获取快递公司列表
- ///
- ///
- [HttpPost]
- [Description("获取快递公司列表")]
- public async Task DoGetCompanyList()
- {
- var jm = new AdminUiCallBack { code = 0 };
- var bl = false;
- try
- {
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopDeliveryGetCompanyListRequest();
- request.AccessToken = accessToken;
-
- var response = await client.ExecuteShopDeliveryGetCompanyListAsync(request);
- if (response.IsSuccessful())
- {
- var company = new List();
-
- foreach (var item in response.DeliveryCompanyList)
- {
- company.Add(new WeChatTransactionComponentDeliveryCompany()
- {
- deliveryId = item.DeliveryId,
- deliveryName = item.DeliveryName
- });
- }
-
- await _weChatTransactionComponentDeliveryCompanyServices.DeleteAsync(p => p.deliveryId != "");
- bl = await _weChatTransactionComponentDeliveryCompanyServices.InsertAsync(company) > 0;
- }
- else
- {
- jm.msg = response.ErrorMessage;
- }
-
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? "更新成功" : "更新失败";
- jm.otherData = response;
- return jm;
- }
- catch (Exception e)
- {
- jm.code = 1;
- jm.msg = e.ToString();
- return jm;
-
- }
- }
- #endregion
-
- }
-}
diff --git a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentGoodController.cs b/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentGoodController.cs
deleted file mode 100644
index f0cd3e26..00000000
--- a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentGoodController.cs
+++ /dev/null
@@ -1,930 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/4 2:52:27
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.Entities.Expression;
-using CoreCms.Net.Model.FromBody;
-using CoreCms.Net.Filter;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.ViewModels.UI;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.Utility.Extensions;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using CoreCms.Net.WeChat.Service.TransactionComponent.Enum;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-using SqlSugar;
-
-namespace CoreCms.Net.Web.Admin.Controllers
-{
- ///
- /// 自定义交易组件商品列表
- ///
- [Description("自定义交易组件商品列表")]
- [Route("api/[controller]/[action]")]
- [ApiController]
- [RequiredErrorForAdmin]
- [Authorize(Permissions.Name)]
- public class WeChatTransactionComponentGoodController : ControllerBase
- {
- private readonly IWebHostEnvironment _webHostEnvironment;
- private readonly IWeChatTransactionComponentGoodServices _weChatTransactionComponentGoodsServices;
- private readonly IWeChatTransactionComponentGoodSKUServices _weChatTransactionComponentGoodSkuServices;
-
- private readonly IWeChatTransactionComponentAuditCategoryServices
- _weChatTransactionComponentAuditCategoryServices;
- private readonly ICoreCmsProductsServices _productsServices;
- private readonly CoreCms.Net.WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
- private readonly IWeChatTransactionComponentBrandAuditServices _weChatTransactionComponentBrandAuditServices;
-
-
-
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentGoodController(IWebHostEnvironment webHostEnvironment
- , IWeChatTransactionComponentGoodServices weChatTransactionComponentGoodsServices, IWeChatTransactionComponentGoodSKUServices weChatTransactionComponentGoodSkuServices, ICoreCmsProductsServices productsServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory, IWeChatTransactionComponentAuditCategoryServices weChatTransactionComponentAuditCategoryServices, IWeChatTransactionComponentBrandAuditServices weChatTransactionComponentBrandAuditServices)
- {
- _webHostEnvironment = webHostEnvironment;
- _weChatTransactionComponentGoodsServices = weChatTransactionComponentGoodsServices;
- _weChatTransactionComponentGoodSkuServices = weChatTransactionComponentGoodSkuServices;
- _productsServices = productsServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- _weChatTransactionComponentAuditCategoryServices = weChatTransactionComponentAuditCategoryServices;
- _weChatTransactionComponentBrandAuditServices = weChatTransactionComponentBrandAuditServices;
- }
-
- #region 获取列表============================================================
- // POST: Api/WeChatTransactionComponentGood/GetPageList
- ///
- /// 获取列表
- ///
- ///
- [HttpPost]
- [Description("获取列表")]
- public async Task GetPageList()
- {
- var jm = new AdminUiCallBack();
- var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
- var pageSize = Request.Form["limit"].FirstOrDefault().ObjectToInt(30);
- var where = PredicateBuilder.True();
- //获取排序字段
- var orderField = Request.Form["orderField"].FirstOrDefault();
-
- Expression> orderEx = orderField switch
- {
- "id" => p => p.id,
- "productId" => p => p.productId,
- "createTime" => p => p.createTime,
- "outProductId" => p => p.outProductId,
- "title" => p => p.title,
- "path" => p => p.path,
- "headImg" => p => p.headImg,
- "qualificationPics" => p => p.qualificationPics,
- "descInfoDesc" => p => p.descInfoDesc,
- "descInfoImgs" => p => p.descInfoImgs,
- "thirdCatId" => p => p.thirdCatId,
- "brandId" => p => p.brandId,
- "infoVersion" => p => p.infoVersion,
- "lastPostTime" => p => p.lastPostTime,
- "updateTime" => p => p.updateTime,
- _ => p => p.id
- };
-
- //设置排序方式
- var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
- var orderBy = orderDirection switch
- {
- "asc" => OrderByType.Asc,
- "desc" => OrderByType.Desc,
- _ => OrderByType.Desc
- };
- //查询筛选
-
- //序列 int
- var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
- if (id > 0)
- {
- where = where.And(p => p.id == id);
- }
- //交易组件平台内部商品ID bigint
- var productId = Request.Form["productId"].FirstOrDefault().ObjectToInt(0);
- if (productId > 0)
- {
- where = where.And(p => p.productId == productId);
- }
- //交易组件创建时间 datetime
- var createTime = Request.Form["createTime"].FirstOrDefault();
- if (!string.IsNullOrEmpty(createTime))
- {
- if (createTime.Contains("到"))
- {
- var dts = createTime.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.createTime > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.createTime < dtEnd);
- }
- else
- {
- var dt = createTime.ObjectToDate();
- where = where.And(p => p.createTime > dt);
- }
- }
- //商品序列 nvarchar
- var outProductId = Request.Form["outProductId"].FirstOrDefault();
- if (!string.IsNullOrEmpty(outProductId))
- {
- where = where.And(p => p.outProductId.Contains(outProductId));
- }
- //商品标题 nvarchar
- var title = Request.Form["title"].FirstOrDefault();
- if (!string.IsNullOrEmpty(title))
- {
- where = where.And(p => p.title.Contains(title));
- }
- //小程序路径 nvarchar
- var path = Request.Form["path"].FirstOrDefault();
- if (!string.IsNullOrEmpty(path))
- {
- where = where.And(p => p.path.Contains(path));
- }
- //主图列表 nvarchar
- var headImg = Request.Form["headImg"].FirstOrDefault();
- if (!string.IsNullOrEmpty(headImg))
- {
- where = where.And(p => p.headImg.Contains(headImg));
- }
- //商品资质图片列表 nvarchar
- var qualificationPics = Request.Form["qualificationPics"].FirstOrDefault();
- if (!string.IsNullOrEmpty(qualificationPics))
- {
- where = where.And(p => p.qualificationPics.Contains(qualificationPics));
- }
- //商品详情图文 nvarchar
- var descInfoDesc = Request.Form["descInfoDesc"].FirstOrDefault();
- if (!string.IsNullOrEmpty(descInfoDesc))
- {
- where = where.And(p => p.descInfoDesc.Contains(descInfoDesc));
- }
- //商品详情图片列表 nvarchar
- var descInfoImgs = Request.Form["descInfoImgs"].FirstOrDefault();
- if (!string.IsNullOrEmpty(descInfoImgs))
- {
- where = where.And(p => p.descInfoImgs.Contains(descInfoImgs));
- }
- //第三级类目ID int
- var thirdCatId = Request.Form["thirdCatId"].FirstOrDefault().ObjectToInt(0);
- if (thirdCatId > 0)
- {
- where = where.And(p => p.thirdCatId == thirdCatId);
- }
- //品牌id int
- var brandId = Request.Form["brandId"].FirstOrDefault().ObjectToInt(0);
- if (brandId > 0)
- {
- where = where.And(p => p.brandId == brandId);
- }
- //预留字段 nvarchar
- var infoVersion = Request.Form["infoVersion"].FirstOrDefault();
- if (!string.IsNullOrEmpty(infoVersion))
- {
- where = where.And(p => p.infoVersion.Contains(infoVersion));
- }
- //最后提交时间 datetime
- var lastPostTime = Request.Form["lastPostTime"].FirstOrDefault();
- if (!string.IsNullOrEmpty(lastPostTime))
- {
- if (lastPostTime.Contains("到"))
- {
- var dts = lastPostTime.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.lastPostTime > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.lastPostTime < dtEnd);
- }
- else
- {
- var dt = lastPostTime.ObjectToDate();
- where = where.And(p => p.lastPostTime > dt);
- }
- }
- //最后更新时间 datetime
- var updateTime = Request.Form["updateTime"].FirstOrDefault();
- if (!string.IsNullOrEmpty(updateTime))
- {
- if (updateTime.Contains("到"))
- {
- var dts = updateTime.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.updateTime > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.updateTime < dtEnd);
- }
- else
- {
- var dt = updateTime.ObjectToDate();
- where = where.And(p => p.updateTime > dt);
- }
- }
- //获取数据
- var list = await _weChatTransactionComponentGoodsServices.QueryPageAsync(where, orderEx, orderBy, pageCurrent, pageSize, true);
- //返回数据
- jm.data = list;
- jm.code = 0;
- jm.count = list.TotalCount;
- jm.msg = "数据调用成功!";
- return jm;
- }
- #endregion
-
- #region 首页数据============================================================
- // POST: Api/WeChatTransactionComponentGood/GetIndex
- ///
- /// 首页数据
- ///
- ///
- [HttpPost]
- [Description("首页数据")]
- public AdminUiCallBack GetIndex()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
- return jm;
- }
- #endregion
-
- #region 创建数据============================================================
- // POST: Api/WeChatTransactionComponentGood/GetCreate
- ///
- /// 创建数据
- ///
- ///
- [HttpPost]
- [Description("创建数据")]
- public async Task GetCreate()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
-
- var brand = await _weChatTransactionComponentBrandAuditServices.QueryListByClauseAsync(p => p.brandId > 0 && p.status == (int)AuditEnum.AuditCategoryStatus.审核成功);
-
- jm.data = new
- {
- brand
- };
-
- return jm;
- }
- #endregion
-
- #region 创建提交============================================================
- // POST: Api/WeChatTransactionComponentGood/DoCreate
- ///
- /// 创建提交
- ///
- ///
- ///
- [HttpPost]
- [Description("创建提交")]
- public async Task DoCreate([FromBody] WeChatTransactionComponentGood entity)
- {
- var jm = await _weChatTransactionComponentGoodsServices.InsertAsync(entity);
- jm.otherData = entity;
- return jm;
- }
- #endregion
-
- #region 编辑数据============================================================
- // POST: Api/WeChatTransactionComponentGood/GetEdit
- ///
- /// 编辑数据
- ///
- ///
- ///
- [HttpPost]
- [Description("编辑数据")]
- public async Task GetEdit([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
-
- var goodId = Convert.ToInt32(model.outProductId);
- var products = await _productsServices.QueryListByClauseAsync(p => p.goodsId == goodId && p.isDel == false, p => p.id, OrderByType.Asc, true);
- var sku = await _weChatTransactionComponentGoodSkuServices.QueryListByClauseAsync(p => p.outProductId == model.outProductId, p => p.id, OrderByType.Asc, true);
-
- var brand = await _weChatTransactionComponentBrandAuditServices.QueryListByClauseAsync(p => p.brandId > 0 && p.status == (int)AuditEnum.AuditCategoryStatus.审核成功);
-
- jm.code = 0;
- jm.data = new
- {
- model,
- products,
- sku,
- brand
- };
-
- return jm;
- }
- #endregion
-
- #region 编辑提交============================================================
- // POST: Api/WeChatTransactionComponentGood/Edit
- ///
- /// 编辑提交
- ///
- ///
- ///
- [HttpPost]
- [Description("编辑提交")]
- public async Task DoEdit([FromBody] WeChatTransactionComponentGood entity)
- {
- var jm = await _weChatTransactionComponentGoodsServices.UpdateAsync(entity);
- return jm;
- }
- #endregion
-
- #region 删除数据============================================================
- // POST: Api/WeChatTransactionComponentGood/DoDelete/10
- ///
- /// 单选删除
- ///
- ///
- ///
- [HttpPost]
- [Description("单选删除")]
- public async Task DoDelete([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.ExistsAsync(p => p.id == entity.id, true);
- if (!model)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
- jm = await _weChatTransactionComponentGoodsServices.DeleteByIdAsync(entity.id);
-
- return jm;
- }
- #endregion
-
- #region 提交审核============================================================
- // POST: Api/WeChatTransactionComponentGood/DoAudit/10
- ///
- /// 提交审核
- ///
- ///
- ///
- [HttpPost]
- [Description("提交审核")]
- public async Task DoAudit([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- var sku = await _weChatTransactionComponentGoodSkuServices.QueryListByClauseAsync(p => p.isSelect == true && p.outProductId == model.outProductId);
-
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUAddRequest();
-
- request.AccessToken = accessToken;
-
- request.OutProductId = model.outProductId;
- request.Title = model.title;
- request.PagePath = model.path;
- request.HeadImageUrlList = new List(model.headImg.Split(","));
-
- var category = await _weChatTransactionComponentAuditCategoryServices.QueryByClauseAsync(p => p.level3 == model.thirdCatId, true);
- if (category != null && !string.IsNullOrEmpty(category.certificateImage))
- {
- request.QualificationPictureUrlList = new List(category.certificateImage.Split(","));
- }
- else
- {
- request.QualificationPictureUrlList = new List();
- }
-
-
- request.Detail = new ShopSPUAddRequest.Types.Detail();
-
- request.Detail.Description = model.descInfoDesc;
- request.Detail.ImageUrlList = new List();
-
- request.CategoryId = model.thirdCatId;
- request.BrandId = model.brandId;
- request.InfoVersion = model.infoVersion;
-
- request.SKUList = new List();
- sku.ForEach(p =>
- {
- var item = new ShopSPUAddRequest.Types.SKU();
- item.OutProductId = p.outProductId;
- item.OutSKUId = p.outSkuId;
- item.ThumbnailUrl = p.thumbImg;
- item.SalePrice = Convert.ToInt32(p.salePrice * 100);
- item.MarketPrice = Convert.ToInt32(p.marketPrice * 100);
- item.Stock = p.stockNum;
- item.BarCode = p.barCode;
- item.SKUCode = p.skuCode;
-
- request.SKUList.Add(item);
- });
-
- var response = await client.ExecuteShopSPUAddAsync(request);
-
- if (response.IsSuccessful())
- {
- var createTime = new DateTime(response.Data.CreateTime.Year, response.Data.CreateTime.Month,
- response.Data.CreateTime.Day, response.Data.CreateTime.Hour, response.Data.CreateTime.Minute,
- response.Data.CreateTime.Second);
-
- model.productId = response.Data.ProductId;
- model.createTime = createTime;
- model.lastPostTime = createTime;
-
- await _weChatTransactionComponentGoodsServices.UpdateAsync(model);
-
- if (response.Data.SKUList.Length > 0)
- {
- foreach (var item in response.Data.SKUList)
- {
- foreach (var o in sku)
- {
- if (o.outSkuId == item.OutSKUId)
- {
- o.skuId = item.SKUId;
- break;
- }
- }
- }
-
- await _weChatTransactionComponentGoodSkuServices.UpdateAsync(sku);
- }
-
- jm.code = 0;
- jm.msg = "提交成功";
- }
- else
- {
- jm.code = 1;
- jm.data = response.ErrorCode;
- jm.msg = response.ErrorMessage;
- jm.otherData = accessToken;
- }
- return jm;
- }
- #endregion
-
- #region 提交更新============================================================
- // POST: Api/WeChatTransactionComponentGood/DoUpdateSpu/10
- ///
- /// 提交更新
- ///
- ///
- ///
- [HttpPost]
- [Description("提交更新")]
- public async Task DoUpdateSpu([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- var sku = await _weChatTransactionComponentGoodSkuServices.QueryListByClauseAsync(p =>
- p.isSelect == true && p.outProductId == model.outProductId);
-
-
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUUpdateRequest();
-
- request.AccessToken = accessToken;
-
- request.OutProductId = model.outProductId;
- request.ProductId = model.productId;
- request.Title = model.title;
- request.PagePath = model.path;
- request.HeadImageUrlList = new List(model.headImg.Split(","));
-
- var category = await _weChatTransactionComponentAuditCategoryServices.QueryByClauseAsync(p => p.level3 == model.thirdCatId, true);
- if (category != null && !string.IsNullOrEmpty(category.certificateImage))
- {
- request.QualificationPictureUrlList = new List(category.certificateImage.Split(","));
- }
- else
- {
- request.QualificationPictureUrlList = new List();
- }
-
- request.Detail = new ShopSPUUpdateRequest.Types.Detail();
-
- request.Detail.Description = model.descInfoDesc;
- request.Detail.ImageUrlList = new List();
- request.CategoryId = model.thirdCatId;
- request.BrandId = model.brandId;
-
- request.SKUList = new List();
-
- sku.ForEach(p =>
- {
- var item = new ShopSPUUpdateRequest.Types.SKU();
- item.OutProductId = p.outProductId;
- item.OutSKUId = p.outSkuId;
- item.ThumbnailUrl = p.thumbImg;
- item.SalePrice = Convert.ToInt32(p.salePrice * 100);
- item.MarketPrice = Convert.ToInt32(p.marketPrice * 100);
- item.Stock = p.stockNum;
- item.BarCode = p.barCode;
- item.SKUCode = p.skuCode;
-
- request.SKUList.Add(item);
- });
-
- var response = await client.ExecuteShopSPUUpdateAsync(request);
-
-
- if (response.IsSuccessful())
- {
- model.productId = response.Data.ProductId;
- model.updateTime = DateTime.Now;
-
- await _weChatTransactionComponentGoodsServices.UpdateAsync(model);
-
- if (response.Data.SKUList.Length > 0)
- {
- foreach (var item in response.Data.SKUList)
- {
- foreach (var o in sku)
- {
- if (o.outSkuId == item.OutSKUId)
- {
- o.skuId = item.SKUId;
- break;
- }
- }
- }
- await _weChatTransactionComponentGoodSkuServices.UpdateAsync(sku);
- }
-
- jm.code = 0;
- jm.msg = "提交成功";
- }
- else
- {
- jm.code = 1;
- jm.data = response.ErrorCode;
- jm.msg = response.ErrorMessage;
- }
- return jm;
- }
- #endregion
-
- #region 获取商品及状态============================================================
- // POST: Api/WeChatTransactionComponentGood/GetSKU/10
- ///
- /// 获取商品及状态
- ///
- ///
- ///
- [HttpPost]
- [Description("获取商品及状态")]
- public async Task GetSKU([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- var editStatus = EnumHelper.EnumToList();
- var spuStatus = EnumHelper.EnumToList();
-
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUGetRequest();
- request.AccessToken = accessToken;
-
- //默认0:获取线上数据, 1:获取草稿数据
- var needEditSpu = Convert.ToInt32(entity.data);
-
- request.OutProductId = model.outProductId;
- request.RequireEdittingSPU = needEditSpu == 1 ? true : false;
-
- var response = await client.ExecuteShopSPUGetAsync(request);
-
-
- if (response.IsSuccessful())
- {
-
- }
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "操作成功" : response.ErrorMessage;
- jm.data = new
- {
- result = response,
- editStatus,
- spuStatus
- };
-
- return jm;
- }
- #endregion
-
- #region 撤回商品审核============================================================
- // POST: Api/WeChatTransactionComponentGood/DoCountermand/10
- ///
- /// 撤回商品审核
- ///
- ///
- ///
- [HttpPost]
- [Description("撤回商品审核")]
- public async Task DeleteSpuAudit([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
-
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUDeleteAuditRequest();
- request.AccessToken = accessToken;
- request.OutProductId = model.outProductId;
-
- var response = await client.ExecuteShopSPUDeleteAuditAsync(request);
-
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "撤回成功" : response.ErrorMessage;
-
- return jm;
- }
- #endregion
-
- #region 删除商品============================================================
- // POST: Api/WeChatTransactionComponentGood/DeleteSpu/10
- ///
- /// 删除商品
- ///
- ///
- ///
- [HttpPost]
- [Description("删除商品")]
- public async Task DeleteSpu([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
-
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUDeleteRequest();
- request.AccessToken = accessToken;
- request.OutProductId = model.outProductId;
-
- var response = await client.ExecuteShopSPUDeleteAsync(request);
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "删除成功" : response.ErrorMessage;
-
- return jm;
- }
- #endregion
-
- #region 上架商品============================================================
- // POST: Api/WeChatTransactionComponentGood/DoListing/10
- ///
- /// 上架商品
- ///
- ///
- ///
- [HttpPost]
- [Description("上架商品")]
- public async Task DoListing([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
-
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUListingRequest();
- request.AccessToken = accessToken;
- request.OutProductId = model.outProductId;
-
- var response = await client.ExecuteShopSPUListingAsync(request);
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "上架成功" : response.ErrorMessage;
-
-
- return jm;
- }
- #endregion
-
- #region 下架商品============================================================
- // POST: Api/WeChatTransactionComponentGood/DoDelistingPpu/10
- ///
- /// 下架商品
- ///
- ///
- ///
- [HttpPost]
- [Description("下架商品")]
- public async Task DoDelistingSpu([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
-
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUDelistingRequest();
- request.AccessToken = accessToken;
- request.OutProductId = model.outProductId;
-
- var response = await client.ExecuteShopSPUDelistingAsync(request);
-
- jm.code = response.IsSuccessful() ? 0 : 1;
- jm.msg = response.IsSuccessful() ? "下架成功" : response.ErrorMessage;
-
- return jm;
- }
- #endregion
-
- #region 预览数据============================================================
- // POST: Api/WeChatTransactionComponentGood/GetDetails/10
- ///
- /// 预览数据
- ///
- ///
- ///
- [HttpPost]
- [Description("预览数据")]
- public async Task GetDetails([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
- jm.code = 0;
- jm.data = model;
-
- return jm;
- }
- #endregion
-
- #region 免审更新============================================================
- // POST: Api/WeChatTransactionComponentGood/WithoutAuditUpdateSKU/10
- ///
- /// 提交更新
- ///
- ///
- ///
- [HttpPost]
- [Description("免审更新")]
- public async Task WithoutAuditUpdateSKU([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTransactionComponentGoodsServices.QueryByClauseAsync(p => p.id == entity.id, true);
- if (model == null)
- {
- jm.msg = GlobalConstVars.DataisNo;
- return jm;
- }
-
- var sku = await _weChatTransactionComponentGoodSkuServices.QueryListByClauseAsync(p =>
- p.isSelect == true && p.outProductId == model.outProductId);
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopSPUUpdateWithoutAuditRequest();
-
- request.AccessToken = accessToken;
-
- request.OutProductId = model.outProductId;
- request.ProductId = model.productId;
-
- request.PagePath = model.path;
-
- request.SKUList = new List();
-
- sku.ForEach(p =>
- {
- var item = new ShopSPUUpdateWithoutAuditRequest.Types.SKU();
-
- item.OutSKUId = p.outSkuId;
-
- item.SalePrice = Convert.ToInt32(p.salePrice * 100);
- item.MarketPrice = Convert.ToInt32(p.marketPrice * 100);
- item.Stock = p.stockNum;
- item.BarCode = p.barCode;
- item.SKUCode = p.skuCode;
-
- request.SKUList.Add(item);
- });
-
- var response = await client.ExecuteShopSPUUpdateWithoutAuditAsync(request);
-
- if (response.IsSuccessful())
- {
-
- jm.code = 0;
- jm.msg = "更新成功";
- }
- else
- {
- jm.code = 1;
- jm.data = response.ErrorCode;
- jm.msg = response.ErrorMessage;
- }
- return jm;
- }
- #endregion
- }
-}
diff --git a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentThirdCategoryController.cs b/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentThirdCategoryController.cs
deleted file mode 100644
index 6a4410f2..00000000
--- a/CoreCms.Net.Web.Admin/Controllers/WeChat/WeChatTransactionComponentThirdCategoryController.cs
+++ /dev/null
@@ -1,792 +0,0 @@
-/***********************************************************************
- * Project: CoreCms
- * ProjectName: 核心内容管理系统
- * Web: https://www.corecms.net
- * Author: 大灰灰
- * Email: jianweie@163.com
- * CreateTime: 2021/7/3 16:30:55
- * Description: 暂无
- ***********************************************************************/
-
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Threading.Tasks;
-using CoreCms.Net.Caching.AccressToken;
-using CoreCms.Net.Configuration;
-using CoreCms.Net.Model.Entities;
-using CoreCms.Net.Model.Entities.Expression;
-using CoreCms.Net.Model.FromBody;
-using CoreCms.Net.Filter;
-using CoreCms.Net.IServices;
-using CoreCms.Net.Model.ViewModels.UI;
-using CoreCms.Net.Utility.Helper;
-using CoreCms.Net.Utility.Extensions;
-using CoreCms.Net.WeChat.Service.HttpClients;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Mvc;
-using NPOI.HSSF.UserModel;
-using SKIT.FlurlHttpClient.Wechat.Api;
-using SKIT.FlurlHttpClient.Wechat.Api.Models;
-using SqlSugar;
-
-namespace CoreCms.Net.Web.Admin.Controllers
-{
- ///
- /// 自定义交易组件三级类目
- ///
- [Description("自定义交易组件三级类目")]
- [Route("api/[controller]/[action]")]
- [ApiController]
- [RequiredErrorForAdmin]
- [Authorize(Permissions.Name)]
- public class WeChatTransactionComponentThirdCategoryController : ControllerBase
- {
- private readonly IWebHostEnvironment _webHostEnvironment;
- private readonly IWeChatTransactionComponentThirdCategoryServices _weChatTcThirdCatListServices;
- private readonly CoreCms.Net.WeChat.Service.HttpClients.IWeChatApiHttpClientFactory _weChatApiHttpClientFactory;
-
-
- ///
- /// 构造函数
- ///
- public WeChatTransactionComponentThirdCategoryController(IWebHostEnvironment webHostEnvironment
- , IWeChatTransactionComponentThirdCategoryServices weChatTcThirdCatListServices, IWeChatApiHttpClientFactory weChatApiHttpClientFactory)
- {
- _webHostEnvironment = webHostEnvironment;
- _weChatTcThirdCatListServices = weChatTcThirdCatListServices;
- _weChatApiHttpClientFactory = weChatApiHttpClientFactory;
- }
-
- #region 获取列表============================================================
- // POST: Api/WeChatTCThirdCatList/GetPageList
- ///
- /// 获取列表
- ///
- ///
- [HttpPost]
- [Description("获取列表")]
- public async Task GetPageList()
- {
- var jm = new AdminUiCallBack();
- var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
- var pageSize = Request.Form["limit"].FirstOrDefault().ObjectToInt(30);
- var where = PredicateBuilder.True();
- //获取排序字段
- var orderField = Request.Form["orderField"].FirstOrDefault();
-
- Expression> orderEx = orderField switch
- {
- "id" => p => p.id,
- "third_cat_id" => p => p.third_cat_id,
- "third_cat_name" => p => p.third_cat_name,
- "qualification" => p => p.qualification,
- "qualification_type" => p => p.qualification_type,
- "product_qualification" => p => p.product_qualification,
- "product_qualification_type" => p => p.product_qualification_type,
- "second_cat_id" => p => p.second_cat_id,
- "second_cat_name" => p => p.second_cat_name,
- "first_cat_id" => p => p.first_cat_id,
- "first_cat_name" => p => p.first_cat_name,
- "createTime" => p => p.createTime,
- _ => p => p.id
- };
-
- //设置排序方式
- var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
- var orderBy = orderDirection switch
- {
- "asc" => OrderByType.Asc,
- "desc" => OrderByType.Desc,
- _ => OrderByType.Desc
- };
- //查询筛选
-
- //序列 int
- var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
- if (id > 0)
- {
- where = where.And(p => p.id == id);
- }
- //类目ID int
- var third_cat_id = Request.Form["third_cat_id"].FirstOrDefault().ObjectToInt(0);
- if (third_cat_id > 0)
- {
- where = where.And(p => p.third_cat_id == third_cat_id);
- }
- //类目名称 nvarchar
- var third_cat_name = Request.Form["third_cat_name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(third_cat_name))
- {
- where = where.And(p => p.third_cat_name.Contains(third_cat_name));
- }
- //类目资质 nvarchar
- var qualification = Request.Form["qualification"].FirstOrDefault();
- if (!string.IsNullOrEmpty(qualification))
- {
- where = where.And(p => p.qualification.Contains(qualification));
- }
- //类目资质类型,0:不需要,1:必填,2:选填 int
- var qualification_type = Request.Form["qualification_type"].FirstOrDefault().ObjectToInt(0);
- if (qualification_type > 0)
- {
- where = where.And(p => p.qualification_type == qualification_type);
- }
- //商品资质 nvarchar
- var product_qualification = Request.Form["product_qualification"].FirstOrDefault();
- if (!string.IsNullOrEmpty(product_qualification))
- {
- where = where.And(p => p.product_qualification.Contains(product_qualification));
- }
- //商品资质类型,0:不需要,1:必填,2:选填 int
- var product_qualification_type = Request.Form["product_qualification_type"].FirstOrDefault().ObjectToInt(0);
- if (product_qualification_type > 0)
- {
- where = where.And(p => p.product_qualification_type == product_qualification_type);
- }
- //二级类目ID int
- var second_cat_id = Request.Form["second_cat_id"].FirstOrDefault().ObjectToInt(0);
- if (second_cat_id > 0)
- {
- where = where.And(p => p.second_cat_id == second_cat_id);
- }
- //二级类目名称 nvarchar
- var second_cat_name = Request.Form["second_cat_name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(second_cat_name))
- {
- where = where.And(p => p.second_cat_name.Contains(second_cat_name));
- }
- //一级类目ID int
- var first_cat_id = Request.Form["first_cat_id"].FirstOrDefault().ObjectToInt(0);
- if (first_cat_id > 0)
- {
- where = where.And(p => p.first_cat_id == first_cat_id);
- }
- //一级类目名称 nvarchar
- var first_cat_name = Request.Form["first_cat_name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(first_cat_name))
- {
- where = where.And(p => p.first_cat_name.Contains(first_cat_name));
- }
- //创建时间 datetime
- var createTime = Request.Form["createTime"].FirstOrDefault();
- if (!string.IsNullOrEmpty(createTime))
- {
- if (createTime.Contains("到"))
- {
- var dts = createTime.Split("到");
- var dtStart = dts[0].Trim().ObjectToDate();
- where = where.And(p => p.createTime > dtStart);
- var dtEnd = dts[1].Trim().ObjectToDate();
- where = where.And(p => p.createTime < dtEnd);
- }
- else
- {
- var dt = createTime.ObjectToDate();
- where = where.And(p => p.createTime > dt);
- }
- }
- //获取数据
- var list = await _weChatTcThirdCatListServices.QueryPageAsync(where, " first_cat_id asc, second_cat_id asc , third_cat_id asc ", pageCurrent, pageSize, false);
- //返回数据
- jm.data = list;
- jm.code = 0;
- jm.count = list.TotalCount;
- jm.msg = "数据调用成功!";
- return jm;
- }
- #endregion
-
- #region 首页数据============================================================
- // POST: Api/WeChatTCThirdCatList/GetIndex
- ///
- /// 首页数据
- ///
- ///
- [HttpPost]
- [Description("首页数据")]
- public AdminUiCallBack GetIndex()
- {
- //返回数据
- var jm = new AdminUiCallBack { code = 0 };
- return jm;
- }
- #endregion
-
- #region 刷新数据============================================================
- // POST: Api/CoreCmsMiNiStoreThirdCatList/DoBatchDelete/10,11,20
- ///
- /// 刷新数据
- ///
- ///
- [HttpPost]
- [Description("刷新数据")]
- public async Task DoRefresh()
- {
- var jm = new AdminUiCallBack { code = 0 };
- var bl = false;
- try
- {
- var dt = DateTime.Now;
- var stime = new DateTime(dt.Year, dt.Month, dt.Day, 0, 0, 0);
- var etime = new DateTime(dt.Year, dt.Month, dt.Day, 23, 59, 59);
-
- var isHave = await _weChatTcThirdCatListServices.ExistsAsync(p => p.createTime > stime && p.createTime < etime);
- if (isHave)
- {
- jm.code = 1;
- jm.msg = "今日已经更新,不要频繁调用";
- return jm;
- }
-
-
- //获取小程序认证
- var accessToken = WeChatCacheAccessTokenHelper.GetWxOpenAccessToken();
- var client = _weChatApiHttpClientFactory.CreateWxOpenClient();
- var request = new ShopCategoryGetRequest { AccessToken = accessToken };
-
- var response = await client.ExecuteShopCategoryGetAsync(request);
- if (response.IsSuccessful())
- {
- if (response.CategoryList.Length > 0)
- {
- var list = new List();
-
- foreach (var item in response.CategoryList)
- {
- list.Add(new WeChatTransactionComponentThirdCategory()
- {
- third_cat_id = item.ThirdCategoryId,
- third_cat_name = item.ThirdCategoryName,
- qualification = item.Qualification,
- qualification_type = item.QualificationType,
- product_qualification = item.ProductQualification,
- product_qualification_type = item.ProductQualificationType,
- second_cat_id = item.SecondCategoryId,
- second_cat_name = item.SecondCategoryName,
- first_cat_id = item.FirstCategoryId,
- first_cat_name = item.FirstCategoryName,
- createTime = DateTime.Now
-
- });
- }
- await _weChatTcThirdCatListServices.DeleteAsync(p => p.id > 0);
- bl = await _weChatTcThirdCatListServices.InsertAsync(list) > 0;
- }
- }
- else
- {
- jm.code = 1;
- jm.msg = response.ErrorMessage;
- jm.otherData = response;
- return jm;
- }
- }
- catch (Exception e)
- {
- jm.code = 1;
- jm.msg = e.ToString();
- return jm;
- }
-
- jm.code = bl ? 0 : 1;
- jm.msg = bl ? "更新成功" : "更新失败";
-
- return jm;
- }
-
- #endregion
-
- #region 预览数据============================================================
- // POST: Api/WeChatTCThirdCatList/GetDetails/10
- ///
- /// 预览数据
- ///
- ///
- ///
- [HttpPost]
- [Description("预览数据")]
- public async Task GetDetails([FromBody] FMIntId entity)
- {
- var jm = new AdminUiCallBack();
-
- var model = await _weChatTcThirdCatListServices.QueryByIdAsync(entity.id, false);
- if (model == null)
- {
- jm.msg = "不存在此信息";
- return jm;
- }
- jm.code = 0;
- jm.data = model;
-
- return jm;
- }
- #endregion
-
- #region 选择导出============================================================
- // POST: Api/WeChatTCThirdCatList/SelectExportExcel/10
- ///
- /// 选择导出
- ///
- ///
- ///
- [HttpPost]
- [Description("选择导出")]
- public async Task SelectExportExcel([FromBody] FMArrayIntIds entity)
- {
- var jm = new AdminUiCallBack();
-
- //创建Excel文件的对象
- var book = new HSSFWorkbook();
- //添加一个sheet
- var mySheet = book.CreateSheet("Sheet1");
- //获取list数据
- var listModel = await _weChatTcThirdCatListServices.QueryListByClauseAsync(p => entity.id.Contains(p.id), p => p.id, OrderByType.Asc, true);
- //给sheet1添加第一行的头部标题
- var headerRow = mySheet.CreateRow(0);
- var headerStyle = ExcelHelper.GetHeaderStyle(book);
-
- var cell0 = headerRow.CreateCell(0);
- cell0.SetCellValue("序列");
- cell0.CellStyle = headerStyle;
- mySheet.SetColumnWidth(0, 10 * 256);
-
- var cell1 = headerRow.CreateCell(1);
- cell1.SetCellValue("类目ID");
- cell1.CellStyle = headerStyle;
- mySheet.SetColumnWidth(1, 10 * 256);
-
- var cell2 = headerRow.CreateCell(2);
- cell2.SetCellValue("类目名称");
- cell2.CellStyle = headerStyle;
- mySheet.SetColumnWidth(2, 10 * 256);
-
- var cell3 = headerRow.CreateCell(3);
- cell3.SetCellValue("类目资质");
- cell3.CellStyle = headerStyle;
- mySheet.SetColumnWidth(3, 10 * 256);
-
- var cell4 = headerRow.CreateCell(4);
- cell4.SetCellValue("类目资质类型,0:不需要,1:必填,2:选填");
- cell4.CellStyle = headerStyle;
- mySheet.SetColumnWidth(4, 10 * 256);
-
- var cell5 = headerRow.CreateCell(5);
- cell5.SetCellValue("商品资质");
- cell5.CellStyle = headerStyle;
- mySheet.SetColumnWidth(5, 10 * 256);
-
- var cell6 = headerRow.CreateCell(6);
- cell6.SetCellValue("商品资质类型,0:不需要,1:必填,2:选填");
- cell6.CellStyle = headerStyle;
- mySheet.SetColumnWidth(6, 10 * 256);
-
- var cell7 = headerRow.CreateCell(7);
- cell7.SetCellValue("二级类目ID");
- cell7.CellStyle = headerStyle;
- mySheet.SetColumnWidth(7, 10 * 256);
-
- var cell8 = headerRow.CreateCell(8);
- cell8.SetCellValue("二级类目名称");
- cell8.CellStyle = headerStyle;
- mySheet.SetColumnWidth(8, 10 * 256);
-
- var cell9 = headerRow.CreateCell(9);
- cell9.SetCellValue("一级类目ID");
- cell9.CellStyle = headerStyle;
- mySheet.SetColumnWidth(9, 10 * 256);
-
- var cell10 = headerRow.CreateCell(10);
- cell10.SetCellValue("一级类目名称");
- cell10.CellStyle = headerStyle;
- mySheet.SetColumnWidth(10, 10 * 256);
-
- var cell11 = headerRow.CreateCell(11);
- cell11.SetCellValue("创建时间");
- cell11.CellStyle = headerStyle;
- mySheet.SetColumnWidth(11, 10 * 256);
-
- headerRow.Height = 30 * 20;
- var commonCellStyle = ExcelHelper.GetCommonStyle(book);
-
- //将数据逐步写入sheet1各个行
- for (var i = 0; i < listModel.Count; i++)
- {
- var rowTemp = mySheet.CreateRow(i + 1);
-
- var rowTemp0 = rowTemp.CreateCell(0);
- rowTemp0.SetCellValue(listModel[i].id.ToString());
- rowTemp0.CellStyle = commonCellStyle;
-
- var rowTemp1 = rowTemp.CreateCell(1);
- rowTemp1.SetCellValue(listModel[i].third_cat_id.ToString());
- rowTemp1.CellStyle = commonCellStyle;
-
- var rowTemp2 = rowTemp.CreateCell(2);
- rowTemp2.SetCellValue(listModel[i].third_cat_name.ToString());
- rowTemp2.CellStyle = commonCellStyle;
-
- var rowTemp3 = rowTemp.CreateCell(3);
- rowTemp3.SetCellValue(listModel[i].qualification.ToString());
- rowTemp3.CellStyle = commonCellStyle;
-
- var rowTemp4 = rowTemp.CreateCell(4);
- rowTemp4.SetCellValue(listModel[i].qualification_type.ToString());
- rowTemp4.CellStyle = commonCellStyle;
-
- var rowTemp5 = rowTemp.CreateCell(5);
- rowTemp5.SetCellValue(listModel[i].product_qualification.ToString());
- rowTemp5.CellStyle = commonCellStyle;
-
- var rowTemp6 = rowTemp.CreateCell(6);
- rowTemp6.SetCellValue(listModel[i].product_qualification_type.ToString());
- rowTemp6.CellStyle = commonCellStyle;
-
- var rowTemp7 = rowTemp.CreateCell(7);
- rowTemp7.SetCellValue(listModel[i].second_cat_id.ToString());
- rowTemp7.CellStyle = commonCellStyle;
-
- var rowTemp8 = rowTemp.CreateCell(8);
- rowTemp8.SetCellValue(listModel[i].second_cat_name.ToString());
- rowTemp8.CellStyle = commonCellStyle;
-
- var rowTemp9 = rowTemp.CreateCell(9);
- rowTemp9.SetCellValue(listModel[i].first_cat_id.ToString());
- rowTemp9.CellStyle = commonCellStyle;
-
- var rowTemp10 = rowTemp.CreateCell(10);
- rowTemp10.SetCellValue(listModel[i].first_cat_name.ToString());
- rowTemp10.CellStyle = commonCellStyle;
-
- var rowTemp11 = rowTemp.CreateCell(11);
- rowTemp11.SetCellValue(listModel[i].createTime.ToString());
- rowTemp11.CellStyle = commonCellStyle;
-
- }
- // 导出excel
- string webRootPath = _webHostEnvironment.WebRootPath;
- string tpath = "/files/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
- string fileName = DateTime.Now.ToString("yyyyMMddHHmmssfff") + "-WeChatTCThirdCatList导出(选择结果).xls";
- string filePath = webRootPath + tpath;
- DirectoryInfo di = new DirectoryInfo(filePath);
- if (!di.Exists)
- {
- di.Create();
- }
- FileStream fileHssf = new FileStream(filePath + fileName, FileMode.Create);
- book.Write(fileHssf);
- fileHssf.Close();
-
- jm.code = 0;
- jm.msg = GlobalConstVars.ExcelExportSuccess;
- jm.data = tpath + fileName;
-
- return jm;
- }
- #endregion
-
- #region 查询导出============================================================
- // POST: Api/WeChatTCThirdCatList/QueryExportExcel/10
- ///
- /// 查询导出
- ///
- ///
- [HttpPost]
- [Description("查询导出")]
- public async Task QueryExportExcel()
- {
- var jm = new AdminUiCallBack();
-
- var where = PredicateBuilder.True();
- //查询筛选
-
- //序列 int
- var id = Request.Form["id"].FirstOrDefault().ObjectToInt(0);
- if (id > 0)
- {
- where = where.And(p => p.id == id);
- }
- //类目ID int
- var third_cat_id = Request.Form["third_cat_id"].FirstOrDefault().ObjectToInt(0);
- if (third_cat_id > 0)
- {
- where = where.And(p => p.third_cat_id == third_cat_id);
- }
- //类目名称 nvarchar
- var third_cat_name = Request.Form["third_cat_name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(third_cat_name))
- {
- where = where.And(p => p.third_cat_name.Contains(third_cat_name));
- }
- //类目资质 nvarchar
- var qualification = Request.Form["qualification"].FirstOrDefault();
- if (!string.IsNullOrEmpty(qualification))
- {
- where = where.And(p => p.qualification.Contains(qualification));
- }
- //类目资质类型,0:不需要,1:必填,2:选填 int
- var qualification_type = Request.Form["qualification_type"].FirstOrDefault().ObjectToInt(0);
- if (qualification_type > 0)
- {
- where = where.And(p => p.qualification_type == qualification_type);
- }
- //商品资质 nvarchar
- var product_qualification = Request.Form["product_qualification"].FirstOrDefault();
- if (!string.IsNullOrEmpty(product_qualification))
- {
- where = where.And(p => p.product_qualification.Contains(product_qualification));
- }
- //商品资质类型,0:不需要,1:必填,2:选填 int
- var product_qualification_type = Request.Form["product_qualification_type"].FirstOrDefault().ObjectToInt(0);
- if (product_qualification_type > 0)
- {
- where = where.And(p => p.product_qualification_type == product_qualification_type);
- }
- //二级类目ID int
- var second_cat_id = Request.Form["second_cat_id"].FirstOrDefault().ObjectToInt(0);
- if (second_cat_id > 0)
- {
- where = where.And(p => p.second_cat_id == second_cat_id);
- }
- //二级类目名称 nvarchar
- var second_cat_name = Request.Form["second_cat_name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(second_cat_name))
- {
- where = where.And(p => p.second_cat_name.Contains(second_cat_name));
- }
- //一级类目ID int
- var first_cat_id = Request.Form["first_cat_id"].FirstOrDefault().ObjectToInt(0);
- if (first_cat_id > 0)
- {
- where = where.And(p => p.first_cat_id == first_cat_id);
- }
- //一级类目名称 nvarchar
- var first_cat_name = Request.Form["first_cat_name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(first_cat_name))
- {
- where = where.And(p => p.first_cat_name.Contains(first_cat_name));
- }
- //创建时间 datetime
- var createTime = Request.Form["createTime"].FirstOrDefault();
- if (!string.IsNullOrEmpty(createTime))
- {
- var dt = createTime.ObjectToDate();
- where = where.And(p => p.createTime > dt);
- }
- //获取数据
- //创建Excel文件的对象
- var book = new HSSFWorkbook();
- //添加一个sheet
- var mySheet = book.CreateSheet("Sheet1");
- //获取list数据
- var listModel = await _weChatTcThirdCatListServices.QueryListByClauseAsync(where, p => p.id, OrderByType.Asc, true);
- //给sheet1添加第一行的头部标题
- var headerRow = mySheet.CreateRow(0);
- var headerStyle = ExcelHelper.GetHeaderStyle(book);
-
- var cell0 = headerRow.CreateCell(0);
- cell0.SetCellValue("序列");
- cell0.CellStyle = headerStyle;
- mySheet.SetColumnWidth(0, 10 * 256);
-
- var cell1 = headerRow.CreateCell(1);
- cell1.SetCellValue("类目ID");
- cell1.CellStyle = headerStyle;
- mySheet.SetColumnWidth(1, 10 * 256);
-
- var cell2 = headerRow.CreateCell(2);
- cell2.SetCellValue("类目名称");
- cell2.CellStyle = headerStyle;
- mySheet.SetColumnWidth(2, 10 * 256);
-
- var cell3 = headerRow.CreateCell(3);
- cell3.SetCellValue("类目资质");
- cell3.CellStyle = headerStyle;
- mySheet.SetColumnWidth(3, 10 * 256);
-
- var cell4 = headerRow.CreateCell(4);
- cell4.SetCellValue("类目资质类型,0:不需要,1:必填,2:选填");
- cell4.CellStyle = headerStyle;
- mySheet.SetColumnWidth(4, 10 * 256);
-
- var cell5 = headerRow.CreateCell(5);
- cell5.SetCellValue("商品资质");
- cell5.CellStyle = headerStyle;
- mySheet.SetColumnWidth(5, 10 * 256);
-
- var cell6 = headerRow.CreateCell(6);
- cell6.SetCellValue("商品资质类型,0:不需要,1:必填,2:选填");
- cell6.CellStyle = headerStyle;
- mySheet.SetColumnWidth(6, 10 * 256);
-
- var cell7 = headerRow.CreateCell(7);
- cell7.SetCellValue("二级类目ID");
- cell7.CellStyle = headerStyle;
- mySheet.SetColumnWidth(7, 10 * 256);
-
- var cell8 = headerRow.CreateCell(8);
- cell8.SetCellValue("二级类目名称");
- cell8.CellStyle = headerStyle;
- mySheet.SetColumnWidth(8, 10 * 256);
-
- var cell9 = headerRow.CreateCell(9);
- cell9.SetCellValue("一级类目ID");
- cell9.CellStyle = headerStyle;
- mySheet.SetColumnWidth(9, 10 * 256);
-
- var cell10 = headerRow.CreateCell(10);
- cell10.SetCellValue("一级类目名称");
- cell10.CellStyle = headerStyle;
- mySheet.SetColumnWidth(10, 10 * 256);
-
- var cell11 = headerRow.CreateCell(11);
- cell11.SetCellValue("创建时间");
- cell11.CellStyle = headerStyle;
- mySheet.SetColumnWidth(11, 10 * 256);
-
-
- headerRow.Height = 30 * 20;
- var commonCellStyle = ExcelHelper.GetCommonStyle(book);
-
- //将数据逐步写入sheet1各个行
- for (var i = 0; i < listModel.Count; i++)
- {
- var rowTemp = mySheet.CreateRow(i + 1);
-
-
- var rowTemp0 = rowTemp.CreateCell(0);
- rowTemp0.SetCellValue(listModel[i].id.ToString());
- rowTemp0.CellStyle = commonCellStyle;
-
-
-
- var rowTemp1 = rowTemp.CreateCell(1);
- rowTemp1.SetCellValue(listModel[i].third_cat_id.ToString());
- rowTemp1.CellStyle = commonCellStyle;
-
-
-
- var rowTemp2 = rowTemp.CreateCell(2);
- rowTemp2.SetCellValue(listModel[i].third_cat_name.ToString());
- rowTemp2.CellStyle = commonCellStyle;
-
-
-
- var rowTemp3 = rowTemp.CreateCell(3);
- rowTemp3.SetCellValue(listModel[i].qualification.ToString());
- rowTemp3.CellStyle = commonCellStyle;
-
-
-
- var rowTemp4 = rowTemp.CreateCell(4);
- rowTemp4.SetCellValue(listModel[i].qualification_type.ToString());
- rowTemp4.CellStyle = commonCellStyle;
-
-
-
- var rowTemp5 = rowTemp.CreateCell(5);
- rowTemp5.SetCellValue(listModel[i].product_qualification.ToString());
- rowTemp5.CellStyle = commonCellStyle;
-
-
-
- var rowTemp6 = rowTemp.CreateCell(6);
- rowTemp6.SetCellValue(listModel[i].product_qualification_type.ToString());
- rowTemp6.CellStyle = commonCellStyle;
-
-
-
- var rowTemp7 = rowTemp.CreateCell(7);
- rowTemp7.SetCellValue(listModel[i].second_cat_id.ToString());
- rowTemp7.CellStyle = commonCellStyle;
-
-
-
- var rowTemp8 = rowTemp.CreateCell(8);
- rowTemp8.SetCellValue(listModel[i].second_cat_name.ToString());
- rowTemp8.CellStyle = commonCellStyle;
-
-
-
- var rowTemp9 = rowTemp.CreateCell(9);
- rowTemp9.SetCellValue(listModel[i].first_cat_id.ToString());
- rowTemp9.CellStyle = commonCellStyle;
-
-
-
- var rowTemp10 = rowTemp.CreateCell(10);
- rowTemp10.SetCellValue(listModel[i].first_cat_name.ToString());
- rowTemp10.CellStyle = commonCellStyle;
-
-
-
- var rowTemp11 = rowTemp.CreateCell(11);
- rowTemp11.SetCellValue(listModel[i].createTime.ToString());
- rowTemp11.CellStyle = commonCellStyle;
-
-
- }
- // 写入到excel
- string webRootPath = _webHostEnvironment.WebRootPath;
- string tpath = "/files/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
- string fileName = DateTime.Now.ToString("yyyyMMddHHmmssfff") + "-WeChatTCThirdCatList导出(查询结果).xls";
- string filePath = webRootPath + tpath;
- DirectoryInfo di = new DirectoryInfo(filePath);
- if (!di.Exists)
- {
- di.Create();
- }
- FileStream fileHssf = new FileStream(filePath + fileName, FileMode.Create);
- book.Write(fileHssf);
- fileHssf.Close();
-
- jm.code = 0;
- jm.msg = GlobalConstVars.ExcelExportSuccess;
- jm.data = tpath + fileName;
-
- return jm;
- }
- #endregion
-
- #region 获取交易组件三级类目====================================================
-
- // POST: Api/Tools/GetGoods
- ///
- /// 获取商品列表
- ///
- ///
- [HttpPost]
- [Description("获取三级类目")]
- public async Task GetThirdCategories()
- {
- var jm = new AdminUiCallBack();
- var pageCurrent = Request.Form["page"].FirstOrDefault().ObjectToInt(1);
- var pageSize = Request.Form["limit"].FirstOrDefault().ObjectToInt(30);
- var where = PredicateBuilder.True();
-
- //商品名称 nvarchar
- var name = Request.Form["name"].FirstOrDefault();
- if (!string.IsNullOrEmpty(name)) where = where.And(p => p.third_cat_name.Contains(name));
-
- //获取数据
- var list = await _weChatTcThirdCatListServices.QueryPageAsync(where, p => p.createTime, OrderByType.Desc,
- pageCurrent, pageSize);
- //返回数据
-
- jm.data = list;
- jm.code = 0;
- jm.count = list.TotalCount;
- jm.msg = "数据调用成功!";
- return jm;
- }
-
- #endregion
-
-
- }
-}
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/order/orders/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/order/orders/index.html
index cbeb8259..93e451bc 100644
--- a/CoreCms.Net.Web.Admin/wwwroot/views/order/orders/index.html
+++ b/CoreCms.Net.Web.Admin/wwwroot/views/order/orders/index.html
@@ -345,9 +345,6 @@
html += d.data.orderStatus[i].description;
}
}
- if (data.tcOrder) {
- html += '';
- }
return html;
}
},
@@ -530,11 +527,6 @@
printExpress(id)
},
//通过接口获取远端交易组件订单信息
- showTcOrder: function () {
- var id = $(this).attr('data-id');
- showTcOrder(id);
- },
- //通过接口获取远端交易组件订单信息
refreshDelivery: function () {
var id = $(this).attr('data-deliveryId');
refreshDelivery(id);
@@ -989,28 +981,6 @@
layer.msg("打印快递单" + orderId);
};
-
- //通过接口获取远端交易组件订单信息
- function showTcOrder(ids) {
- coreHelper.Post("Api/CoreCmsOrder/GetTcOrder", { id: ids }, function (e) {
- if (e.code === 0) {
- admin.popup({
- shadeClose: false,
- title: '查看详情',
- area: ['1200px', '90%'],
- id: 'LAY-popup-CoreCmsOrder-tcorderdetails',
- success: function (layero, index) {
- view(this.id).render('order/orders/tcorderdetails', { data: e.data }).done(function () {
- //监听提交
- });
- }
- });
- } else {
- layer.msg(e.msg);
- }
- });
- }
-
//查看订单
function viewOrder(ids) {
coreHelper.Post("Api/CoreCmsOrder/GetDetails", { id: ids }, function (e) {
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/accountinfo/getinfo.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/accountinfo/getinfo.html
deleted file mode 100644
index ad486fce..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/accountinfo/getinfo.html
+++ /dev/null
@@ -1,226 +0,0 @@
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/create.html
deleted file mode 100644
index ea3e0d74..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/create.html
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/details.html
deleted file mode 100644
index 28bed305..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/details.html
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/edit.html
deleted file mode 100644
index ea732483..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/edit.html
+++ /dev/null
@@ -1,260 +0,0 @@
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/index.html
deleted file mode 100644
index 4363f5fd..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/auditcategory/index.html
+++ /dev/null
@@ -1,347 +0,0 @@
-自定义交易组件上传类目资质
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/create.html
deleted file mode 100644
index 9a0452f5..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/create.html
+++ /dev/null
@@ -1,478 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/details.html
deleted file mode 100644
index 5ea3b78e..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/details.html
+++ /dev/null
@@ -1,189 +0,0 @@
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/edit.html
deleted file mode 100644
index 66415239..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/edit.html
+++ /dev/null
@@ -1,515 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/index.html
deleted file mode 100644
index 1682fc95..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/brandaudit/index.html
+++ /dev/null
@@ -1,430 +0,0 @@
-自定义交易组件上传品牌信息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/deliverycompany/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/deliverycompany/index.html
deleted file mode 100644
index 1301132e..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/deliverycompany/index.html
+++ /dev/null
@@ -1,137 +0,0 @@
-自定义交易组件快递公司
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/create.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/create.html
deleted file mode 100644
index f2c23b12..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/create.html
+++ /dev/null
@@ -1,418 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/details.html
deleted file mode 100644
index 0f5ef6c6..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/details.html
+++ /dev/null
@@ -1,162 +0,0 @@
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/edit.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/edit.html
deleted file mode 100644
index d0d33999..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/edit.html
+++ /dev/null
@@ -1,431 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/getSku.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/getSku.html
deleted file mode 100644
index 4c771f59..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/getSku.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/getThirdCategories.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/getThirdCategories.html
deleted file mode 100644
index d796e222..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/getThirdCategories.html
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/index.html
deleted file mode 100644
index dd397de3..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/goods/index.html
+++ /dev/null
@@ -1,614 +0,0 @@
-自定义交易组件商品列表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/thirdcategory/details.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/thirdcategory/details.html
deleted file mode 100644
index b70bff99..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/thirdcategory/details.html
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
\ No newline at end of file
diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/thirdcategory/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/thirdcategory/index.html
deleted file mode 100644
index bacedde8..00000000
--- a/CoreCms.Net.Web.Admin/wwwroot/views/wechat/transactioncomponent/thirdcategory/index.html
+++ /dev/null
@@ -1,327 +0,0 @@
-自定义交易组件三级类目
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/CoreCms.Net.Web.WebApi/Controllers/WeChatOAuth/WxOpenController.cs b/CoreCms.Net.Web.WebApi/Controllers/WeChatOAuth/WxOpenController.cs
index d7b15613..95c40937 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/WeChatOAuth/WxOpenController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/WeChatOAuth/WxOpenController.cs
@@ -201,33 +201,6 @@ namespace CoreCms.Net.Web.WebApi.Controllers.WeChatOAuth
case EventType.Localtion:
break;
- case EventType.OpenProductSpuAudit:
- var openProductSpuAuditEvent = client.DeserializeEventFromXml(msgXml);
- callBack = await _mediator.Send(new OpenProductSPUAuditEventCommand() { EventObj = openProductSpuAuditEvent });
- break;
- case EventType.OpenProductCategoryAudit:
- var openProductCategoryAuditEvent = client.DeserializeEventFromXml(msgXml);
- callBack = await _mediator.Send(new OpenProductCategoryAuditEventCommand() { EventObj = openProductCategoryAuditEvent });
- break;
- case EventType.OpenProductBrandAudit:
- var openProductBrandAuditEvent = client.DeserializeEventFromXml(msgXml);
- callBack = await _mediator.Send(new OpenProductBrandAuditEventCommand() { EventObj = openProductBrandAuditEvent });
- break;
- //自定义交易组件支付回调
- case EventType.OpenProductOrderPay:
- var openProductOrderPayEvent = client.DeserializeEventFromXml(msgXml);
- callBack = await _mediator.Send(new OpenProductOrderPayEventCommand() { EventObj = openProductOrderPayEvent });
- break;
- //自定交易组件-用户确认收货
- case EventType.OpenProductOrderConfirm:
- var openProductOrderConfirmEvent = client.DeserializeEventFromXml(msgXml);
- callBack = await _mediator.Send(new OpenProductOrderConfirmEventCommand() { EventObj = openProductOrderConfirmEvent });
- break;
- //自定义交易组件-用户取消售后申请
- case EventType.AfterSaleUserCancel:
- var aftersaleUserCancelEvent = client.DeserializeEventFromXml(msgXml);
- callBack = await _mediator.Send(new AftersaleUserCancelEventCommand() { EventObj = aftersaleUserCancelEvent });
- break;
default:
NLogUtil.WriteFileLog(LogLevel.Info, LogType.WxPost, "接收服务器推送(处理xml内容/Event无匹配)", JsonConvert.SerializeObject(sourceXml));