优化推送供应商商品逻辑,循环处理采购信息,并修正获取供应商ID的方式。
This commit is contained in:
parent
ee10e46bd1
commit
da30fd7226
@ -136,8 +136,10 @@ class OpurchaseclassController extends BaseAdminController
|
||||
{
|
||||
$id = $this->request->post('id');
|
||||
Redis::send('push-supplier-products', ['order_id' => $id]);
|
||||
|
||||
// $result = OpurchaseclassLogic::createSupplierGoods($params);
|
||||
// $select=Opurchaseinfo::where('pid',$id)->where('is_push',0)->select();
|
||||
// foreach ($select as $key => $arr) {
|
||||
// $result = OpurchaseclassLogic::createSupplierGoods($arr);
|
||||
// }
|
||||
// if (true === $result) {
|
||||
return $this->success('已推送,请刷新后查看', [], 1, 1);
|
||||
// }
|
||||
|
@ -196,7 +196,7 @@ class OpurchaseclassLogic extends BaseLogic
|
||||
public static function createSupplierGoods($goods)
|
||||
{
|
||||
try {
|
||||
$supplier_arr = SupplierBindGoods::where('goods_id')->column('supplier_id');
|
||||
$supplier_arr = SupplierBindGoods::where('goods_id',$goods['goods'])->column('supplier_id');
|
||||
if ($supplier_arr) {
|
||||
$supplier_arr = array_unique($supplier_arr);
|
||||
$time=strtotime(date('Y-m-d',time()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user