更新
This commit is contained in:
parent
d5a52df439
commit
16ee8284db
@ -136,27 +136,11 @@ class StoreOrderBehalf extends BaseController
|
|||||||
$id = $this->request->param('id');
|
$id = $this->request->param('id');
|
||||||
$uid = Db::name('merchant')->where('mer_id', $mer_id)->value('uid');
|
$uid = Db::name('merchant')->where('mer_id', $mer_id)->value('uid');
|
||||||
$res = Db::name('store_order_other')->where('uid', $uid)->where('order_id', $id)->update(['status' => $status]);
|
$res = Db::name('store_order_other')->where('uid', $uid)->where('order_id', $id)->update(['status' => $status]);
|
||||||
$find = Db::name('store_order_other')->where('uid', $uid)->where('order_id', $id)->find();
|
// $find = Db::name('store_order_other')->where('uid', $uid)->where('order_id', $id)->find();
|
||||||
$find_two = Db::name('store_order')->where('order_sn', $find['order_sn'])->find();
|
// $find_two = Db::name('store_order')->where('order_sn', $find['order_sn'])->find();
|
||||||
if($res){
|
if($res){
|
||||||
if($status==3){
|
if($status==3){
|
||||||
//进入市级供应链待分润状态
|
|
||||||
$financialRecordRepository = app()->make(FinancialRecordRepository::class);
|
|
||||||
$financeSn = $financialRecordRepository->getSn();
|
|
||||||
//市级供应链获得
|
|
||||||
$finance[] = [
|
|
||||||
'order_id' =>$find_two['order_id'],
|
|
||||||
'order_sn' => $find_two['order_id'],
|
|
||||||
'user_info' => $find['real_name'],
|
|
||||||
'user_id' => $uid,
|
|
||||||
'financial_type' => 'supply_chain',
|
|
||||||
'financial_pm' =>1,
|
|
||||||
'type' => 0,
|
|
||||||
'number' => $find['procure_price'],
|
|
||||||
'mer_id' => $find['mer_id'],
|
|
||||||
'financial_record_sn' => $financeSn.'1'
|
|
||||||
];
|
|
||||||
$financialRecordRepository->insertAll($finance);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return app('json')->success('设置成功');
|
return app('json')->success('设置成功');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user