getRewardUnitPrice(); //奖励金额,不记录 if (empty($this->reward_unit_price)) return false; //扣库存数量为0;没有奖励 if (empty($this->goods_num)) return false; //投递到资产队列 $insert_wallet = $this->getInsertWallet(UserWalletEnum::FILL); if ($insert_wallet) CloudStockTwoAgent::sendUserWalletQueue($insert_wallet); } /** * 获取对应等级商品奖励金额单价 */ protected function getRewardUnitPrice() { $fill_level_list = json_decode($this->stock_goods['fill_level_list'], true); if (!empty($fill_level_list)) { foreach ($fill_level_list as $value) { if ($value['level'] == $this->bonus_agent['level']) { $this->reward_unit_price = $value['price']; return; } } } $this->reward_unit_price = 0; } }