getRewardUnitPrice(); //奖励金额,不记录 if (empty($this->reward_unit_price)) return 0; //扣库存数量为0;没有奖励 if (empty($this->goods_num)) return 0; if($this->is_job) return $this->reward_unit_price; //投递到资产队列 $insert_wallet = $this->getInsertWallet(UserWalletEnum::FILL); if ($insert_wallet) CloudStockAgent::sendUserWalletQueue($insert_wallet); return $this->reward_unit_price; } /** * 获取对应等级商品奖励金额单价 */ 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 = !empty($value['price']) ? $value['price'] : 0; return; } } } $this->reward_unit_price = 0; } }