wx_share finish
parent
f2bb712dd5
commit
853e82eae7
|
|
@ -22,7 +22,7 @@ class RowWxShareFinish extends RowAction
|
|||
if (data_get($result, 'result_code') != 'SUCCESS') {
|
||||
return $this->response()->error(data_get($result, 'err_code') . ':' . data_get($result, 'err_code_des'));
|
||||
}
|
||||
$attributes = ['finish_sn' => $sn, 'status' => 'Y'];
|
||||
$attributes = ['finish_sn' => $sn, 'status' => 'N'];
|
||||
$order->update($order->wx_share ? array_merge($order->wx_share, $attributes) : $attributes);
|
||||
return $this->response()->success('成功!');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ class OrderController extends AdminController
|
|||
$actions->append(new OrderSetTag());
|
||||
}
|
||||
|
||||
if (data_get($row->wx_share, 'status') != 'Y') {
|
||||
if ($row->pay_at && data_get($row->wx_share, 'status') != 'N') {
|
||||
$actions->append(new RowWxShareFinish());
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class OrderDistribute
|
|||
else if (data_get($result, 'result_code') != 'SUCCESS') {
|
||||
logger()->error('微信分账-解冻资金失败', $result);
|
||||
} else {
|
||||
$attributes = ['finish_sn' => $sn, 'status' => 'Y'];
|
||||
$attributes = ['finish_sn' => $sn, 'status' => 'N'];
|
||||
$order->update($order->wx_share ? array_merge($order->wx_share, $attributes) : $attributes);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ class Order extends Model
|
|||
'profit_paid' => 'datetime',
|
||||
'status' => 'int',
|
||||
'is_change' => 'bool',
|
||||
// 订单分账
|
||||
// status: Y/N, 分账状态, Y: 开始分账, N: 已经完结(解冻资金)
|
||||
// share_sn: 20230xxxxx, 分账订单号
|
||||
// finish_sn: 20230xxxxx, 完结分账订单号
|
||||
'wx_share' => 'json',
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue