上传付款凭证
This commit is contained in:
parent
d62ab0fa87
commit
6a12146f91
@ -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]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -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('更新成功');
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -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 () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user