添加修复预订单分拣数量
This commit is contained in:
parent
43802dadc7
commit
ce0dbca714
@ -142,4 +142,11 @@ class BeforehandOrderCartInfoController extends BaseAdminController
|
|||||||
return $this->data($result);
|
return $this->data($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function fix()
|
||||||
|
{
|
||||||
|
$params = $this->request->get();
|
||||||
|
BeforehandOrderCartInfoLogic::fixAcceptNum($params);
|
||||||
|
return $this->data([]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -283,4 +283,15 @@ class BeforehandOrderCartInfoLogic extends BaseLogic
|
|||||||
{
|
{
|
||||||
return BeforehandOrderCartInfo::findOrEmpty($params['id'])->toArray();
|
return BeforehandOrderCartInfo::findOrEmpty($params['id'])->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function fixAcceptNum($params)
|
||||||
|
{
|
||||||
|
$cartInfo = BeforehandOrderCartInfo::where('bhoid', $params['bhoid'])->select();
|
||||||
|
foreach ($cartInfo as $k => $v) {
|
||||||
|
if ($v['cart_num'] != $v['accept_num']) {
|
||||||
|
$v->save(['accept_num' => $v['cart_num']]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user