mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 06:20:50 +00:00
修复删除退款订单问题
This commit is contained in:
parent
82b4cf0b5f
commit
f17cec8f39
@ -40,7 +40,6 @@ class RefundOrder extends AuthController
|
||||
['refund_type', 0]
|
||||
]);
|
||||
$where['is_cancel'] = 0;
|
||||
$where['is_del'] = 0;
|
||||
return app('json')->success($this->services->refundList($where));
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +87,6 @@ class StoreOrderController
|
||||
['field_key', ''],
|
||||
['field_value', ''],
|
||||
]);
|
||||
$where['shipping_type'] = 1;
|
||||
$where['is_system_del'] = 0;
|
||||
if (!in_array($where['status'], [-1, -2, -3])) {
|
||||
$where['pid'] = 0;
|
||||
|
||||
@ -4,6 +4,7 @@ namespace app\api\controller\v1\order;
|
||||
|
||||
use app\Request;
|
||||
use app\services\order\StoreOrderRefundServices;
|
||||
use app\services\order\StoreOrderServices;
|
||||
|
||||
class StoreOrderRefundController
|
||||
{
|
||||
@ -102,7 +103,11 @@ class StoreOrderRefundController
|
||||
*/
|
||||
public function delRefund(Request $request, $uni)
|
||||
{
|
||||
$oid = $this->services->value(['order_id' => $uni, 'uid' => $request->uid()], 'store_order_id');
|
||||
$res = $this->services->update(['order_id' => $uni, 'uid' => $request->uid()], ['is_del' => 1]);
|
||||
/** @var StoreOrderServices $orderServices */
|
||||
$orderServices = app()->make(StoreOrderServices::class);
|
||||
$orderServices->update($oid, ['is_del' => 1], 'id');
|
||||
if ($res)
|
||||
return app('json')->successful('删除成功');
|
||||
else
|
||||
|
||||
@ -158,8 +158,9 @@ class StoreOrderServices extends BaseServices
|
||||
$refund_where = ['is_cancel' => 0];
|
||||
if ($uid) $refund_where['uid'] = $uid;
|
||||
$data['refunding_count'] = (string)$storeOrderRefundServices->count($refund_where + ['refund_type' => [1, 2, 4, 5]]);
|
||||
$data['no_refund_count'] = (string)$storeOrderRefundServices->count($refund_where + ['refund_type' => 3]);
|
||||
$data['refunded_count'] = (string)$storeOrderRefundServices->count($refund_where + ['refund_type' => 6]);
|
||||
$data['refund_count'] = (string)bcadd($data['refunding_count'], $data['refunded_count'], 0);
|
||||
$data['refund_count'] = bcadd(bcadd($data['refunding_count'], $data['refunded_count'], 0), $data['no_refund_count'], 0);
|
||||
$data['yue_pay_status'] = (int)sys_config('balance_func_status') && (int)sys_config('yue_pay_status') == 1 ? (int)1 : (int)2;//余额支付 1 开启 2 关闭
|
||||
$data['pay_weixin_open'] = (int)sys_config('pay_weixin_open') ?? 0;//微信支付 1 开启 0 关闭
|
||||
$data['ali_pay_status'] = (bool)sys_config('ali_pay_status');//支付包支付 1 开启 0 关闭
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user