Commit d4fa039b authored by wuxiaoli's avatar wuxiaoli

识别生产自提订单

parent 11719bdf
...@@ -13,7 +13,7 @@ use App\Models\BaseModel; ...@@ -13,7 +13,7 @@ use App\Models\BaseModel;
class Order extends BaseModel { class Order extends BaseModel {
protected $table = 'order'; protected $table = 'order';
protected $fillable = ['order_no', 'store_id', 'member_id', 'invite_uid', 'amount', 'pay_type', 'pay_no', 'delivery_type', 'delivery_no', 'delivery_info', 'status', 'pay_time', 'confirm_time', 'comment_time', 'close_time', 'refund_time', 'refund_no']; protected $fillable = ['order_no', 'store_id', 'member_id', 'invite_uid', 'amount', 'pay_type', 'pay_no', 'delivery_type', 'delivery_no', 'delivery_info', 'status', 'pay_time', 'confirm_time', 'comment_time', 'close_time', 'refund_time', 'refund_no','delivery_type'];
// protected $hidden = ['deleted_at']; // protected $hidden = ['deleted_at'];
protected function casts(): array { protected function casts(): array {
......
...@@ -370,6 +370,7 @@ class OrderService { ...@@ -370,6 +370,7 @@ class OrderService {
$order->member_id = auth('api')->user()['uid']; $order->member_id = auth('api')->user()['uid'];
$order->invite_uid = $request->input('invite_uid') ?? 0; $order->invite_uid = $request->input('invite_uid') ?? 0;
$order->pay_type = $request->input('pay_type') ?? 'wechat'; $order->pay_type = $request->input('pay_type') ?? 'wechat';
$order->delivery_type = $request->input('delivery_type') ?? 1;
$order->amount = $amount; $order->amount = $amount;
$order->integral = $integral; $order->integral = $integral;
$order->status = 0; $order->status = 0;
......
...@@ -45,6 +45,7 @@ return new class extends Migration ...@@ -45,6 +45,7 @@ return new class extends Migration
$table->string('refund_no')->nullable()->comment('退款单号'); $table->string('refund_no')->nullable()->comment('退款单号');
$table->timestamp('created_at')->nullable()->comment('创建时间'); $table->timestamp('created_at')->nullable()->comment('创建时间');
$table->timestamp('updated_at')->nullable()->comment('更新时间'); $table->timestamp('updated_at')->nullable()->comment('更新时间');
$table->string('delivery_type')->nullable()->comment('配送方式');
$table->softDeletes(); $table->softDeletes();
$table->engine = 'InnoDB'; $table->engine = 'InnoDB';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment