cid); if ($apply) { $assets = CoinReleaseMember::findOne($apply->uid); if ($assets) { $release = $assets->release; if ($release >= $apply->amount) { //提币 $amount = $apply->amount / 1e8; //获取提币地址 $from = ''; $coin_publish_rule = CoinPublishRule::findOne($assets->rule_id); if ($coin_publish_rule) { $coin_publish = CoinPublish::findOne($coin_publish_rule->pid); if ($coin_publish) { $from = $coin_publish->address; } } if (!empty($from)) { $result = Chain33Business::extractToken($from, $apply->to_address, $amount, '', true, $apply->coin); if ($result['code'] == 0) { $assets->release -= $amount; $assets->output += $amount; if ($assets->save()) { //提币成功 $apply->status = CoinReleaseCheck::STATUS_PADDING;//提币中 if ($apply->save()) { Yii::info("提币成功: [申请id]: $this->cid", __CLASS__); } Yii::warning("提币申请状态修改失败: [申请id]: $this->cid", __CLASS__); } else { Yii::warning("减少用户资产失败: [申请id]: $this->cid, [资产]: $amount", __CLASS__); } } else { Yii::info("提币失败: {$result['msg']}! [申请id]: $this->cid", __CLASS__); } } else { Yii::info("提币失败: 提币地址不存在! [申请id]: $this->cid", __CLASS__); } } else { Yii::info("提币失败: 用户资产不足! [申请id]: $this->cid", __CLASS__); } } else { Yii::info("提币失败: 用户资产信息不存在! [申请id]: $this->cid", __CLASS__); } } else { Yii::info("提币失败: 提币申请不存在! [申请id]: $this->cid", __CLASS__); } return 0; } }