上传付款凭证

This commit is contained in:
liu 2024-03-13 17:19:07 +08:00 committed by mkm
parent d62ab0fa87
commit 6a12146f91
3 changed files with 28 additions and 0 deletions

View File

@ -192,4 +192,12 @@ class StoreOrderOther extends BaseModel
return $this->pay_type == StoreGroupOrder::PAY_TYPE_CREDIT_BUY && $this->status == self::STATUS_WAIT_PAY;
}
public function chageVoucher(int $id,string $voucher)
{
return $this->getModel()::getDB()->where('order_id',$id)->update(['payment_voucher' => $voucher]);
}
}

View File

@ -301,4 +301,23 @@ class StoreOrderOther extends BaseController
return app('json')->fail('操作失败');
}
/**
*上传付款凭证
*/
public function upload($id)
{
$name = $this->request->param('url');
Db::transaction(function()use($id,$name){
$make = \app()->make(\app\common\model\store\order\StoreOrderOther::class);
$make->chageVoucher($id,$name);
});
return app('json')->success('更新成功');
}
}

View File

@ -142,6 +142,7 @@ Route::group('api/', function () {
Route::post('create', '/otherOrder'); //创建其他订单
Route::get('number', '/number');
Route::post('take/:id', '/take');
Route::post('upload/:id', '/upload');
})->prefix('api.store.order.StoreOrderOther');
// 预售
Route::group('presell', function () {