Merge branch 'develop' of gitee.com:zi-chunsheng-e-commerce/mall-server into 1.x
commit
2e70dec895
|
|
@ -88,8 +88,9 @@ class DealerController extends AdminController
|
||||||
$grid->filter(function (Grid\Filter $filter) {
|
$grid->filter(function (Grid\Filter $filter) {
|
||||||
$filter->panel();
|
$filter->panel();
|
||||||
$filter->equal('user.phone')->width(3);
|
$filter->equal('user.phone')->width(3);
|
||||||
$filter->equal('userInfo.nickname')->width(3);
|
|
||||||
$filter->equal('userInfo.inviterInfo.user.phone')->width(3);
|
$filter->equal('userInfo.inviterInfo.user.phone')->width(3);
|
||||||
|
$filter->equal('userInfo.realInviterInfo.user.phone')->width(3);
|
||||||
|
$filter->equal('userInfo.nickname')->width(4);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ use App\Admin\Actions\Show\DealerOrderRemark;
|
||||||
use App\Admin\Repositories\DealerOrder;
|
use App\Admin\Repositories\DealerOrder;
|
||||||
use App\Enums\DealerOrderStatus;
|
use App\Enums\DealerOrderStatus;
|
||||||
use App\Models\DealerChannelSubsidyLog;
|
use App\Models\DealerChannelSubsidyLog;
|
||||||
use App\Models\DealerOrder as DealerOrderModel;
|
|
||||||
use App\Models\DealerOrderProduct;
|
use App\Models\DealerOrderProduct;
|
||||||
use Dcat\Admin\Admin;
|
use Dcat\Admin\Admin;
|
||||||
use Dcat\Admin\Form;
|
use Dcat\Admin\Form;
|
||||||
|
|
@ -24,13 +23,6 @@ use Illuminate\Support\Facades\Request;
|
||||||
|
|
||||||
class DealerOrderController extends AdminController
|
class DealerOrderController extends AdminController
|
||||||
{
|
{
|
||||||
protected $payWayDots = [
|
|
||||||
DealerOrderModel::PAY_WAY_WALLET=>'warning',
|
|
||||||
DealerOrderModel::PAY_WAY_OFFLINE=>'danger',
|
|
||||||
DealerOrderModel::PAY_WAY_WXPAY=>'success',
|
|
||||||
'none'=>'#b3b9bf',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a grid builder.
|
* Make a grid builder.
|
||||||
*
|
*
|
||||||
|
|
@ -57,7 +49,12 @@ class DealerOrderController extends AdminController
|
||||||
$grid->column('total_amount')->prepend('¥');
|
$grid->column('total_amount')->prepend('¥');
|
||||||
$statusTexts = DealerOrderStatus::texts();
|
$statusTexts = DealerOrderStatus::texts();
|
||||||
|
|
||||||
$grid->column('pay_way')->using(DealerOrderModel::$payWayText)->label($this->payWayDots);
|
$grid->column('pay_way')->display(function ($v) {
|
||||||
|
if ($v) {
|
||||||
|
return '<i class="fa fa-circle" style="font-size: 13px;color: '.$v->color().'"></i> '.$v->getDealerOrderText();
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
});
|
||||||
|
|
||||||
$grid->column('order_status')->display(function ($v) {
|
$grid->column('order_status')->display(function ($v) {
|
||||||
return $this->order_status;
|
return $this->order_status;
|
||||||
|
|
@ -107,7 +104,11 @@ class DealerOrderController extends AdminController
|
||||||
$actions->append(new DealerOrderShipping());
|
$actions->append(new DealerOrderShipping());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($actions->row->isPending() && Admin::user()->can('dcat.admin.dealer_orders.cancel')) {
|
if ((
|
||||||
|
$actions->row->isPending() //待确认
|
||||||
|
|| $actions->row->isPay() //待付款
|
||||||
|
|| $actions->row->isPaid() //待收款
|
||||||
|
) && Admin::user()->can('dcat.admin.dealer_orders.cancel')) {
|
||||||
$actions->append(new DealerOrderCancel());
|
$actions->append(new DealerOrderCancel());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -154,20 +155,34 @@ class DealerOrderController extends AdminController
|
||||||
$show->field('consignor.phone')->as(function ($value) {
|
$show->field('consignor.phone')->as(function ($value) {
|
||||||
return $value ?? '系统';
|
return $value ?? '系统';
|
||||||
});
|
});
|
||||||
|
$show->html(function () {
|
||||||
|
$content = '';
|
||||||
|
|
||||||
$show->field('pay_way', '支付方式')->using(DealerOrderModel::$payWayText)->dot($this->payWayDots);
|
if ($this->pay_way) {
|
||||||
|
$content = '<i class="fa fa-circle" style="font-size: 13px;color: '.$this->pay_way->color().'"></i> '.$this->pay_way->getDealerOrderText();
|
||||||
|
}
|
||||||
|
|
||||||
|
return <<<HTML
|
||||||
|
<div class="show-field form-group row">
|
||||||
|
<div class="col-sm-2 control-label">
|
||||||
|
<span>支付方式</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="box box-solid box-default no-margin box-show">
|
||||||
|
<div class="box-body">{$content} </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
HTML;
|
||||||
|
});
|
||||||
$show->field('pay_sn', '支付流水号');
|
$show->field('pay_sn', '支付流水号');
|
||||||
$show->field('pay_time', '支付时间');
|
$show->field('pay_time', '支付时间');
|
||||||
$show->field('paied_time');
|
$show->field('paied_time');
|
||||||
|
if ($show->model()->isPayWayWxpay()) {
|
||||||
switch ($show->model()->pay_way) {
|
$show->field('out_trade_no', '外部交易号');
|
||||||
case DealerOrderModel::PAY_WAY_OFFLINE:
|
} elseif ($show->model()->isPayWayOffline()) {
|
||||||
$show->field('pay_image')->image();
|
$show->field('pay_image')->image();
|
||||||
break;
|
|
||||||
|
|
||||||
case DealerOrderModel::PAY_WAY_WXPAY:
|
|
||||||
$show->field('out_trade_no', '外部交易号');
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
$show->field('remark');
|
$show->field('remark');
|
||||||
$show->divider();
|
$show->divider();
|
||||||
|
|
@ -178,7 +193,7 @@ class DealerOrderController extends AdminController
|
||||||
});
|
});
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$show->model()->pay_way === DealerOrderModel::PAY_WAY_OFFLINE &&
|
$show->model()->isPayWayOffline() &&
|
||||||
!in_array($show->model()->order_status, [
|
!in_array($show->model()->order_status, [
|
||||||
DealerOrderStatus::Pending->value, DealerOrderStatus::Cancelled->value,
|
DealerOrderStatus::Pending->value, DealerOrderStatus::Cancelled->value,
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,10 @@ class DealerOrderRefuse extends Form
|
||||||
|
|
||||||
$order->update([
|
$order->update([
|
||||||
'status' => DealerOrderStatus::Paying,
|
'status' => DealerOrderStatus::Paying,
|
||||||
|
//置空已支付的信息
|
||||||
|
'pay_way'=> null,
|
||||||
|
'pay_image'=> null,
|
||||||
|
'pay_info' => null,
|
||||||
'pay_time' => null,
|
'pay_time' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -67,7 +71,7 @@ class DealerOrderRefuse extends Form
|
||||||
*/
|
*/
|
||||||
public function form()
|
public function form()
|
||||||
{
|
{
|
||||||
$this->textarea('reason', '原因')->rules('required|max:255');
|
$this->textarea('reason', '原因')->required()->rules('required|max:255');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Admin\Metrics;
|
namespace App\Admin\Metrics;
|
||||||
|
|
||||||
use App\Models\Balance;
|
use App\Models\Balance;
|
||||||
|
use App\Models\DealerWallet;
|
||||||
use App\Models\DistributionPreIncome;
|
use App\Models\DistributionPreIncome;
|
||||||
use App\Models\UserInfo;
|
use App\Models\UserInfo;
|
||||||
use App\Models\Wallet;
|
use App\Models\Wallet;
|
||||||
|
|
@ -40,6 +41,7 @@ class StatisticsTotal extends RadialBar
|
||||||
'total_distribution'=> DistributionPreIncome::unsettlement()->sum('total_revenue'),
|
'total_distribution'=> DistributionPreIncome::unsettlement()->sum('total_revenue'),
|
||||||
'total_quota_v2' => UserInfo::sum('quota_v2'),
|
'total_quota_v2' => UserInfo::sum('quota_v2'),
|
||||||
'total_quota_v1' => UserInfo::sum('quota_v1'),
|
'total_quota_v1' => UserInfo::sum('quota_v1'),
|
||||||
|
'total_dealer_wallet' => bcdiv(DealerWallet::sum('balance'), 1, 2),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,6 +84,10 @@ class StatisticsTotal extends RadialBar
|
||||||
<h1 class="font-lg-1 mt-2 mb-0">{$content['total_quota_v1']}</h1>
|
<h1 class="font-lg-1 mt-2 mb-0">{$content['total_quota_v1']}</h1>
|
||||||
老配额
|
老配额
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<h1 class="font-lg-1 mt-2 mb-0">{$content['total_dealer_wallet']}</h1>
|
||||||
|
批零余额
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
HTML
|
HTML
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ namespace App\Endpoint\Api\Http\Controllers\Dealer;
|
||||||
use App\Endpoint\Api\Http\Controllers\Controller;
|
use App\Endpoint\Api\Http\Controllers\Controller;
|
||||||
use App\Endpoint\Api\Http\Resources\Dealer\OrderResource;
|
use App\Endpoint\Api\Http\Resources\Dealer\OrderResource;
|
||||||
use App\Endpoint\Api\Http\Resources\Dealer\OrderSimpleResource;
|
use App\Endpoint\Api\Http\Resources\Dealer\OrderSimpleResource;
|
||||||
|
use App\Enums\PayWay;
|
||||||
use App\Exceptions\BizException;
|
use App\Exceptions\BizException;
|
||||||
use App\Exceptions\PayPasswordIncorrectException;
|
use App\Exceptions\PayPasswordIncorrectException;
|
||||||
use App\Helpers\Paginator as PaginatorHelper;
|
use App\Helpers\Paginator as PaginatorHelper;
|
||||||
|
|
@ -224,17 +225,30 @@ class OrderController extends Controller
|
||||||
'pay_password' => '支付密码',
|
'pay_password' => '支付密码',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$payWay = PayWay::tryFrom($input['pay_way'] ?? 'offline');
|
||||||
|
|
||||||
|
if (! in_array($payWay, [PayWay::Offline, PayWay::Wallet, PayWay::WxpayH5])) {
|
||||||
|
throw new BizException('支付方式 非法');
|
||||||
|
}
|
||||||
|
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
|
|
||||||
$order = $user->dealerOrders()->findOrFail($id);
|
$order = $user->dealerOrders()->findOrFail($id);
|
||||||
|
|
||||||
$payWay = $input['pay_way'] ?? 'offline';
|
switch ($payWay) {
|
||||||
|
case PayWay::Wallet:
|
||||||
|
if (! $user->wallet?->verifyPassword($input['pay_password'])) {
|
||||||
|
throw new PayPasswordIncorrectException();
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
break;
|
||||||
$payWay === DealerOrder::PAY_WAY_WALLET &&
|
|
||||||
!$user->wallet?->verifyPassword($input['pay_password'])
|
case PayWay::WxpayH5:
|
||||||
) {
|
if ($order->consignor !== null) {
|
||||||
throw new PayPasswordIncorrectException();
|
throw new BizException('订单不是签约订单');
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Enums;
|
||||||
|
|
||||||
|
enum PayWay: string {
|
||||||
|
case Offline = 'offline';
|
||||||
|
case Balance = 'balance';
|
||||||
|
case Wallet = 'wallet';
|
||||||
|
// 微信支付
|
||||||
|
case WxpayApp = 'wxpay_app';
|
||||||
|
case WxpayH5 = 'wxpay_h5';
|
||||||
|
case WxpayJs = 'wxpay_jsapi';
|
||||||
|
case WxpayMp = 'wxpay_mp';
|
||||||
|
// 阿里支付
|
||||||
|
case AlipayApp = 'alipay_app';
|
||||||
|
|
||||||
|
public function color()
|
||||||
|
{
|
||||||
|
return match ($this) {
|
||||||
|
static::Offline => '#5b69bc',
|
||||||
|
static::Wallet => '#ff8acc',
|
||||||
|
static::WxpayH5 => '#21b978',
|
||||||
|
default => '#ea5455',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDealerOrderText()
|
||||||
|
{
|
||||||
|
return match ($this) {
|
||||||
|
static::Offline => '线下打款',
|
||||||
|
static::Wallet => '余额支付',
|
||||||
|
static::WxpayH5 => '微信支付',
|
||||||
|
default => 'Unknown',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,7 @@ namespace App\Models;
|
||||||
use App\Casts\JsonArray;
|
use App\Casts\JsonArray;
|
||||||
use App\Enums\DealerOrderSettleState;
|
use App\Enums\DealerOrderSettleState;
|
||||||
use App\Enums\DealerOrderStatus;
|
use App\Enums\DealerOrderStatus;
|
||||||
|
use App\Enums\PayWay;
|
||||||
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
use Dcat\Admin\Traits\HasDateTimeFormatter;
|
||||||
use EloquentFilter\Filterable;
|
use EloquentFilter\Filterable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
@ -14,10 +15,6 @@ class DealerOrder extends Model
|
||||||
use Filterable;
|
use Filterable;
|
||||||
use HasDateTimeFormatter;
|
use HasDateTimeFormatter;
|
||||||
|
|
||||||
public const PAY_WAY_WALLET = 'wallet'; // 余额
|
|
||||||
public const PAY_WAY_OFFLINE = 'offline'; // 线下支付
|
|
||||||
public const PAY_WAY_WXPAY = 'wxpay'; // 微信支付
|
|
||||||
|
|
||||||
protected $attributes = [
|
protected $attributes = [
|
||||||
'status' => DealerOrderStatus::Pending,
|
'status' => DealerOrderStatus::Pending,
|
||||||
'settle_state' => DealerOrderSettleState::Pending,
|
'settle_state' => DealerOrderSettleState::Pending,
|
||||||
|
|
@ -27,6 +24,7 @@ class DealerOrder extends Model
|
||||||
'status' => DealerOrderStatus::class,
|
'status' => DealerOrderStatus::class,
|
||||||
'settle_state' => DealerOrderSettleState::class,
|
'settle_state' => DealerOrderSettleState::class,
|
||||||
'pay_info'=>JsonArray::class,
|
'pay_info'=>JsonArray::class,
|
||||||
|
'pay_way' => PayWay::class,
|
||||||
'pay_time'=> 'datetime',
|
'pay_time'=> 'datetime',
|
||||||
'paied_time'=>'datetime',
|
'paied_time'=>'datetime',
|
||||||
'shipping_time'=>'datetime',
|
'shipping_time'=>'datetime',
|
||||||
|
|
@ -55,12 +53,6 @@ class DealerOrder extends Model
|
||||||
'out_trade_no',
|
'out_trade_no',
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $payWayText = [
|
|
||||||
self::PAY_WAY_WALLET => '余额支付',
|
|
||||||
self::PAY_WAY_OFFLINE => '线下打款',
|
|
||||||
self::PAY_WAY_WXPAY => '微信支付',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仅获取待结算的已付款订单
|
* 仅获取待结算的已付款订单
|
||||||
*/
|
*/
|
||||||
|
|
@ -255,7 +247,29 @@ class DealerOrder extends Model
|
||||||
*/
|
*/
|
||||||
public function isPayWayOffline(): bool
|
public function isPayWayOffline(): bool
|
||||||
{
|
{
|
||||||
return $this->pay_way === static::PAY_WAY_OFFLINE;
|
return $this->pay_way === PayWay::Offline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付方式是否是余额支付
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isPayWayWallet(): bool
|
||||||
|
{
|
||||||
|
return $this->pay_way === PayWay::Wallet;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付方式是否是微信支付
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isPayWayWxpay(): bool
|
||||||
|
{
|
||||||
|
return in_array($this->pay_way, [
|
||||||
|
PayWay::WxpayH5,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ namespace App\Services\Dealer;
|
||||||
use App\Enums\DealerLvl;
|
use App\Enums\DealerLvl;
|
||||||
use App\Enums\DealerOrderStatus;
|
use App\Enums\DealerOrderStatus;
|
||||||
use App\Enums\DealerWalletAction;
|
use App\Enums\DealerWalletAction;
|
||||||
|
use App\Enums\PayWay;
|
||||||
use App\Exceptions\BizException;
|
use App\Exceptions\BizException;
|
||||||
use App\Models\DealerOrder;
|
use App\Models\DealerOrder;
|
||||||
use App\Models\DealerOrderAllocateLog;
|
use App\Models\DealerOrderAllocateLog;
|
||||||
|
|
@ -238,7 +239,7 @@ class OrderService
|
||||||
throw new BizException('无法付款:订单状态异常,请刷新后再试');
|
throw new BizException('无法付款:订单状态异常,请刷新后再试');
|
||||||
}
|
}
|
||||||
switch ($payWay) {
|
switch ($payWay) {
|
||||||
case DealerOrder::PAY_WAY_WALLET:
|
case PayWay::Wallet->value:
|
||||||
/** 付款以及完成确认收款动作 **/
|
/** 付款以及完成确认收款动作 **/
|
||||||
$walletService = new WalletService();
|
$walletService = new WalletService();
|
||||||
//付款
|
//付款
|
||||||
|
|
@ -246,7 +247,7 @@ class OrderService
|
||||||
$order->update([
|
$order->update([
|
||||||
'status'=>DealerOrderStatus::Confirming,
|
'status'=>DealerOrderStatus::Confirming,
|
||||||
'pay_time' => now(),
|
'pay_time' => now(),
|
||||||
'pay_way' => DealerOrder::PAY_WAY_WALLET,
|
'pay_way' => PayWay::Wallet,
|
||||||
]);
|
]);
|
||||||
//收款
|
//收款
|
||||||
if ($order->consignor) {
|
if ($order->consignor) {
|
||||||
|
|
@ -254,13 +255,13 @@ class OrderService
|
||||||
}
|
}
|
||||||
$this->paidOrder($order);
|
$this->paidOrder($order);
|
||||||
break;
|
break;
|
||||||
case DealerOrder::PAY_WAY_OFFLINE:
|
case PayWay::Offline->value:
|
||||||
$order->update([
|
$order->update([
|
||||||
'status' => DealerOrderStatus::Confirming,
|
'status' => DealerOrderStatus::Confirming,
|
||||||
'pay_image' => $payImage,
|
'pay_image' => $payImage,
|
||||||
'pay_info' => $order->getConsignorPayInfo() ?? null,
|
'pay_info' => $order->getConsignorPayInfo() ?? null,
|
||||||
'pay_time' => now(),
|
'pay_time' => now(),
|
||||||
'pay_way' => DealerOrder::PAY_WAY_OFFLINE,
|
'pay_way' => PayWay::Offline,
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -271,13 +272,13 @@ class OrderService
|
||||||
* 支付订单
|
* 支付订单
|
||||||
*
|
*
|
||||||
* @param DealerOrder $order
|
* @param DealerOrder $order
|
||||||
* @param string $payWay
|
* @param \App\Enums\PayWay $payWay
|
||||||
* @param string|null $payImage
|
* @param string|null $payImage
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
* @throws \App\Exceptions\BizException
|
* @throws \App\Exceptions\BizException
|
||||||
*/
|
*/
|
||||||
public function pay(DealerOrder $order, string $payWay, ?string $payImage = null): array
|
public function pay(DealerOrder $order, PayWay $payWay, ?string $payImage = null): array
|
||||||
{
|
{
|
||||||
if (! $order->isPendinged()) {
|
if (! $order->isPendinged()) {
|
||||||
throw new BizException('订单状态不是待付款');
|
throw new BizException('订单状态不是待付款');
|
||||||
|
|
@ -289,7 +290,7 @@ class OrderService
|
||||||
try {
|
try {
|
||||||
$payLog = $order->payLogs()->create([
|
$payLog = $order->payLogs()->create([
|
||||||
'pay_sn' => serial_number(),
|
'pay_sn' => serial_number(),
|
||||||
'pay_way' => $payWay,
|
'pay_way' => $payWay->value,
|
||||||
]);
|
]);
|
||||||
} catch (QueryException $e) {
|
} catch (QueryException $e) {
|
||||||
if (strpos($e->getMessage(), 'Duplicate entry') === false) {
|
if (strpos($e->getMessage(), 'Duplicate entry') === false) {
|
||||||
|
|
|
||||||
|
|
@ -107,19 +107,13 @@ class PayService
|
||||||
$payable->pay_sn = $payLog->pay_sn;
|
$payable->pay_sn = $payLog->pay_sn;
|
||||||
$payable->pay_time = $payLog->pay_at;
|
$payable->pay_time = $payLog->pay_at;
|
||||||
$payable->out_trade_no = $payLog->out_trade_no;
|
$payable->out_trade_no = $payLog->out_trade_no;
|
||||||
|
$payable->pay_way = $payLog->pay_way;
|
||||||
|
|
||||||
if ($payLog->isOffline()) {
|
if ($payLog->isOffline()) {
|
||||||
$payable->pay_image = $params['pay_image'] ?? null;
|
$payable->pay_image = $params['pay_image'] ?? null;
|
||||||
$payable->pay_info = $params['pay_info'] ?? null;
|
$payable->pay_info = $params['pay_info'] ?? null;
|
||||||
$payable->pay_way = DealerOrder::PAY_WAY_OFFLINE;
|
|
||||||
$payable->status = DealerOrderStatus::Confirming;
|
$payable->status = DealerOrderStatus::Confirming;
|
||||||
} else {
|
} else {
|
||||||
if ($payLog->isWallet()) {
|
|
||||||
$payable->pay_way = DealerOrder::PAY_WAY_WALLET;
|
|
||||||
} elseif ($payLog->isWxpay()) {
|
|
||||||
$payable->pay_way = DealerOrder::PAY_WAY_WXPAY;
|
|
||||||
}
|
|
||||||
|
|
||||||
$payable->paied_time = $payLog->pay_at;
|
$payable->paied_time = $payLog->pay_at;
|
||||||
$payable->status = DealerOrderStatus::Paid;
|
$payable->status = DealerOrderStatus::Paid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue