修复
This commit is contained in:
parent
e18df5eff1
commit
27a043caeb
@ -12,6 +12,7 @@ use app\common\model\goods\Goods;
|
||||
use app\common\model\opurchase\OpurchaseGoodsOffer;
|
||||
use app\common\model\opurchase\Opurchaseinfo;
|
||||
use app\common\model\supplier\Supplier;
|
||||
use Webman\RedisQueue\Redis;
|
||||
|
||||
/**
|
||||
* 采购订单控制器
|
||||
@ -117,11 +118,11 @@ class OpurchaseclassController extends BaseAdminController
|
||||
$id = $this->request->get('id');
|
||||
$page_no = $this->request->get('page_no', 1);
|
||||
$is_push = $this->request->get('is_push');
|
||||
$where=['pid'=> $id];
|
||||
$where['pid']=$id;
|
||||
if($is_push){
|
||||
$where['is_push'] = $is_push;
|
||||
}
|
||||
$res = Opurchaseinfo::where()->page($page_no, 25)->select()->each(function ($item) {
|
||||
$res = Opurchaseinfo::where($where)->page($page_no, 25)->select()->each(function ($item) {
|
||||
$find = Goods::where('id', $item['goods'])->with('unitName')->find();
|
||||
$item['goods_name'] = $find['name'];
|
||||
$item['unit_name'] = $find['unit_name'];
|
||||
@ -150,13 +151,14 @@ class OpurchaseclassController extends BaseAdminController
|
||||
*/
|
||||
public function createSupplierGoods()
|
||||
{
|
||||
return $this->success('禁止后台推送');
|
||||
$params = $this->request->post();
|
||||
$result = OpurchaseclassLogic::createSupplierGoods($params);
|
||||
if (true === $result) {
|
||||
return $this->success('推送成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OpurchaseclassLogic::getError());
|
||||
$id = $this->request->post('id');
|
||||
Redis::send('push-supplier-products', ['order_id'=>$id]);
|
||||
|
||||
// $result = OpurchaseclassLogic::createSupplierGoods($params);
|
||||
// if (true === $result) {
|
||||
return $this->success('已推送,请刷新后查看', [], 1, 1);
|
||||
// }
|
||||
// return $this->fail(OpurchaseclassLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user