quanwei
2026-01-17 e1e2fe5710a5b5cd9c19bd3aa99c998a1a613ca8
admin/app/common/model/order/Order.php
@@ -128,7 +128,7 @@
     */
    public function supplier()
    {
        return $this->belongsTo('app\\common\\model\\supplier\\Supplier', 'shop_supplier_id', 'shop_supplier_id')->field(['shop_supplier_id', 'name', 'user_id']);
        return $this->belongsTo('app\\common\\model\\supplier\\Supplier', 'shop_supplier_id', 'shop_supplier_id')->field(['shop_supplier_id', 'name', 'user_id', 'referee_id','supplier_type','gift_type']);
    }
    
    /**
@@ -590,6 +590,8 @@
                }
                $this['advance']->save(['order_status' => 20]);
            }
            // 减少用户购买商品次数
            UserModel::decreasePurchaseCount($this['user_id'], $this['product'], $this['app_id']);
            // 更新订单状态
            return $this->save(['order_status' => 20,'is_refund' => 1,'refund_money' => $this['pay_price'], 'cancel_remark' => $data['cancel_remark']]);
        });
@@ -634,6 +636,8 @@
                    $this['advance']->save(['order_status' => 20]);
                }
            }
            // 减少用户购买商品次数
            UserModel::decreasePurchaseCount($this['user_id'], $this['product'], $this['app_id']);
            // 更新订单状态
            //return $this->save(['order_status' => $data['is_cancel'] ? 20 : 10]);
            return $this->save([
@@ -880,6 +884,7 @@
        return $count;
    }
    public function sendWxExpress($express_id, $express_no)
    {
        //判断后台是否设置了微信发货 by yj 2024.4.10