mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 14:31:04 +00:00
fix: 修改小程序收货bug
This commit is contained in:
parent
852fa790ed
commit
aa39909ab5
@ -978,6 +978,11 @@ class StoreOrderDao extends BaseDao
|
||||
})->field(['uid', 'order_id', 'real_name', 'status', 'pay_price', 'total_num', 'add_time', 'pay_time', 'paid'])->order('add_time desc')->select()->toArray();
|
||||
}
|
||||
|
||||
public function getSubOrderNotSendList(int $pid)
|
||||
{
|
||||
return $this->getModel()->where('pid', $pid)->where('status', 1)->select()->toArray();
|
||||
}
|
||||
|
||||
public function getSubOrderNotSend(int $pid, int $order_id)
|
||||
{
|
||||
return $this->getModel()->where('pid', $pid)->where('status', 0)->where('id', '<>', $order_id)->count();
|
||||
|
||||
@ -60,9 +60,9 @@ class StoreOrderTakeServices extends BaseServices
|
||||
if (!$order) {
|
||||
throw new ApiException(410173);
|
||||
}
|
||||
if ($order == -1) { // 有子订单
|
||||
if ($order['pid'] == -1) { // 有子订单
|
||||
// 查找待收货的子订单
|
||||
$son_order_list = $this->dao->getList(['pid' => $order['id'], 'pay_type' => 'weixin', 'is_channel' => 1, 'status' => 1, 'refund_status' => 0], ['*']);
|
||||
$son_order_list = $this->dao->getSubOrderNotSendList((int)$order['id']);
|
||||
foreach ($son_order_list as $son_order) {
|
||||
$this->takeOrder($son_order['order_id'], $son_order['uid']);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user