mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 19:03:27 +08:00
# 2022-02-19
### 1.3.7 开源社区版: 无 ### 0.2.0 会员专业版: 【调整】拆分下单支付单类型,由【订单,充值,服务订单,表单付款码,表单订单】拆分细则为【普通订单,拼团订单,团购订单,秒杀订单,砍价,赠品,接龙,交易组件,充值,服务订单,表单付款码,表单订单】。 【修复】修复拼团,秒杀,团购下单成功但提示“订单支付参数错误”问题。 【新增】商品详情封面图增加【原图上传】,前【上传图片】按钮改为【裁剪上传】。 【新增】商品详情图集增加【原图上传】,前【上传图片】按钮改为【裁剪上传】。
This commit is contained in:
@@ -116,7 +116,15 @@ namespace CoreCms.Net.Services
|
||||
var dto = new CheckPayDTO();
|
||||
|
||||
//订单
|
||||
if (type == (int)GlobalEnumVars.BillPaymentsType.Order)
|
||||
if (type == (int)GlobalEnumVars.BillPaymentsType.Common
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.PinTuan
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Group
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Skill
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
//如果是订单生成支付单的话,取第一条订单的店铺id,后面的所有订单都要保证是此店铺的id
|
||||
var orderModel = await orderServices.QueryByClauseAsync(p =>
|
||||
@@ -264,7 +272,15 @@ namespace CoreCms.Net.Services
|
||||
var dto = new CheckPayDTO();
|
||||
|
||||
//订单
|
||||
if (type == (int)GlobalEnumVars.BillPaymentsType.Order)
|
||||
if (type == (int)GlobalEnumVars.BillPaymentsType.Common
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.PinTuan
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Group
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Skill
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
//如果是订单生成支付单的话,取第一条订单的店铺id,后面的所有订单都要保证是此店铺的id
|
||||
foreach (var item in sourceStr)
|
||||
@@ -538,7 +554,7 @@ namespace CoreCms.Net.Services
|
||||
/// <param name="type">支付类型</param>
|
||||
/// <param name="params">参数</param>
|
||||
/// <returns></returns>
|
||||
private async Task<WebApiCallBack> ToAdd(string sourceStr, string paymentCode, int userId = 0, int type = (int)GlobalEnumVars.BillPaymentsType.Order, JObject @params = null)
|
||||
private async Task<WebApiCallBack> ToAdd(string sourceStr, string paymentCode, int userId = 0, int type = (int)GlobalEnumVars.BillPaymentsType.Common, JObject @params = null)
|
||||
{
|
||||
var jm = new WebApiCallBack();
|
||||
|
||||
@@ -647,7 +663,15 @@ namespace CoreCms.Net.Services
|
||||
await _dal.UpdateAsync(billPaymentInfo);
|
||||
if (status == (int)GlobalEnumVars.BillPaymentsStatus.Payed)
|
||||
{
|
||||
if (billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Order)
|
||||
if (billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Common
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.PinTuan
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Group
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Skill
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| billPaymentInfo.type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
//如果是订单类型,做支付后处理
|
||||
await orderServices.Pay(billPaymentInfo.sourceId, paymentCode, billPaymentInfo);
|
||||
@@ -725,27 +749,38 @@ namespace CoreCms.Net.Services
|
||||
{
|
||||
|
||||
var res = string.Empty;
|
||||
switch (entity.type)
|
||||
if (entity.type == (int)GlobalEnumVars.BillPaymentsType.Common
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.PinTuan
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Group
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Skill
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| entity.type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent)
|
||||
{
|
||||
case (int)GlobalEnumVars.BillPaymentsType.Order:
|
||||
var orderItem = await _orderItemServices.QueryByClauseAsync(p => p.orderId == entity.sourceId);
|
||||
if (orderItem != null)
|
||||
{
|
||||
res = orderItem.name;
|
||||
}
|
||||
break;
|
||||
case (int)GlobalEnumVars.BillPaymentsType.Recharge:
|
||||
res = "账户充值";
|
||||
break;
|
||||
case (int)GlobalEnumVars.BillPaymentsType.FormPay:
|
||||
break;
|
||||
case (int)GlobalEnumVars.BillPaymentsType.FormOrder:
|
||||
break;
|
||||
case (int)GlobalEnumVars.BillPaymentsType.ServiceOrder:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
var orderItem = await _orderItemServices.QueryByClauseAsync(p => p.orderId == entity.sourceId);
|
||||
if (orderItem != null)
|
||||
{
|
||||
res = orderItem.name;
|
||||
}
|
||||
}
|
||||
else if (entity.type == (int)GlobalEnumVars.BillPaymentsType.Recharge)
|
||||
{
|
||||
res = "账户充值";
|
||||
}
|
||||
else if (entity.type == (int)GlobalEnumVars.BillPaymentsType.FormPay)
|
||||
{
|
||||
}
|
||||
else if (entity.type == (int)GlobalEnumVars.BillPaymentsType.FormOrder)
|
||||
{
|
||||
}
|
||||
else if (entity.type == (int)GlobalEnumVars.BillPaymentsType.ServiceOrder)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(res))
|
||||
{
|
||||
var allConfigs = await _settingServices.GetConfigDictionaries();
|
||||
@@ -774,19 +809,27 @@ namespace CoreCms.Net.Services
|
||||
|
||||
//查支付人id
|
||||
var userId = 0;
|
||||
switch (type)
|
||||
if (type == (int)GlobalEnumVars.BillPaymentsType.Common
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.PinTuan
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Group
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Skill
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Bargain
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Giveaway
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.Solitaire
|
||||
|| type == (int)GlobalEnumVars.BillPaymentsType.TransactionComponent
|
||||
)
|
||||
{
|
||||
case (int)GlobalEnumVars.BillPaymentsType.Order:
|
||||
var orderInfo = await orderServices.QueryByIdAsync(orderId);
|
||||
if (orderInfo == null)
|
||||
{
|
||||
jm.code = 10000;
|
||||
jm.msg = GlobalErrorCodeVars.Code10000;
|
||||
return jm;
|
||||
}
|
||||
userId = orderInfo.userId;
|
||||
break;
|
||||
var orderInfo = await orderServices.QueryByIdAsync(orderId);
|
||||
if (orderInfo == null)
|
||||
{
|
||||
jm.code = 10000;
|
||||
jm.msg = GlobalErrorCodeVars.Code10000;
|
||||
return jm;
|
||||
}
|
||||
|
||||
userId = orderInfo.userId;
|
||||
}
|
||||
|
||||
//::todo 校验支付方式是否存在
|
||||
//生成支付单
|
||||
var result = await ToAdd(orderId, paymentCode, userId, type);
|
||||
|
||||
Reference in New Issue
Block a user