where("status",1)->with(['skuSpecs'])->page($nextPage,10)->select(); if ($resp->isEmpty()) { $output->writeln("没有任务啦==".getDateFull()); $nextPage = null; return true; } foreach ($resp as $param) { $store = (new SaasStore)->where("poi_id",$param['poi_id'])->findOrEmpty(); // 获取attr_key_value_map参数 $valMap = (new BaseData)->config([ "appid" => sConf("wechat.appid"), "secret" => sConf("wechat.secret"), "account" => sConf("wechat.shop_id"), ])->token()->getStoreCategoryTemplate($param['category_id'],$param['product_type']); $data = (new BaseData)->config([ "appid" => sConf("wechat.mini_appid"), "secret" => sConf("wechat.mini_secret"), ])->token()->createGoodsData($param->toArray(),[],$store->toArray(),$valMap,"edit"); echo getDateFull()."====修改返回信息\n"; echo json_encode($data)."\n"; } $nextPage = $nextPage+1; $output->writeln("进入下一页=={$nextPage}==".getDateFull()); } } catch (\Throwable $throwable) { echo getDateFull()."==报错啦===".$throwable->getFile()."\n"; echo getDateFull()."==报错啦===".$throwable->getLine()."\n"; echo getDateFull()."==报错啦===".$throwable->getMessage()."\n"; } return self::SUCCESS; } }