更改审核
This commit is contained in:
parent
2434e6f2a6
commit
d5851b0eda
@ -2787,18 +2787,16 @@ class StoreOrderRepository extends BaseRepository
|
||||
|
||||
}
|
||||
|
||||
public function dealChangeStatus($img,$status,$id)
|
||||
public function dealChangeStatus($img,$id)
|
||||
{
|
||||
$data = StoreOrder::getDB()->where('order_id',$id)->find();
|
||||
if(empty($data)) return app('json')->fail('没有该订单');
|
||||
$data->financial_voucher = $img;
|
||||
$data->paid = 1;//支付
|
||||
$data->pay_time = date('Y-m-d H:i:s',time());
|
||||
StoreGroupOrder::getDB()->where('group_order_id',$data['group_order_id'])
|
||||
->update(['paid'=>1,'pay_time'=>date('Y-m-d H:i:s',time())]);
|
||||
|
||||
if($status){
|
||||
$data->paid = 1;//支付
|
||||
$data->pay_time = date('Y-m-d H:i:s',time());
|
||||
StoreGroupOrder::getDB()->where('group_order_id',$data['group_order_id'])
|
||||
->update(['paid'=>1,'pay_time'=>date('Y-m-d H:i:s',time())]);
|
||||
}
|
||||
$data->save();
|
||||
return app('json')->success('更新成功');
|
||||
}
|
||||
|
@ -84,9 +84,11 @@ class Order extends BaseController
|
||||
|
||||
public function changeStatus($id)
|
||||
{
|
||||
//图片和状态
|
||||
$data = $this->request->param(['img','status']);
|
||||
$this->repository->dealChangeStatus($data['img'],$data['status'],$id);
|
||||
//图片 不需要状态状态
|
||||
$data = $this->request->param(['img']);
|
||||
if(!$data['img'])
|
||||
return app('json')->fail('请上传凭证');
|
||||
$this->repository->dealChangeStatus($data['img'],$id);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user