Commit 0114bc5f authored by rlgy's avatar rlgy

update

parent f47dae56
......@@ -11,6 +11,7 @@ namespace backend\controllers;
use common\models\psources\CoinExtract;
use common\models\psources\CoinPublish;
use common\models\psources\CoinReleaseCheck;
use common\models\psources\CoinReleaseMember;
use Yii;
class CoinReleaseCheckController extends BaseController
......@@ -151,6 +152,16 @@ class CoinReleaseCheckController extends BaseController
if ($model->save(false)) {
if ($step == self::STEP_CHECK_SECOND && CoinReleaseCheck::CHECK_SECOND_STATUS_SUCCEED == $model->check_second_status) {
//TODO 提币
} elseif (self::STEP_CANCEL == $step) {
//返还币
$assets = CoinReleaseMember::findOne($model->mid);
if ($assets) {
$assets->release += $model->amount;
$assets->output -= $model->amount;
if (!$assets->save()) {
//todo loh
}
}
}
return ['code' => 0, 'msg' => '操作成功'];
}
......
......@@ -14,6 +14,7 @@ use Yii;
/**
* @property integer $id
* @property integer $uid
* @property integer $mid
* @property string $mobile
* @property string $coin
* @property double $amount
......
......@@ -88,6 +88,7 @@ class GuodunController extends BaseController
//添加提币申请
$request_coin = new CoinReleaseCheck();
$request_coin->uid = $user_asset->user_id;
$request_coin->mid = $id;
$request_coin->mobile = $user_asset->mobile;
$request_coin->amount = $amount * 1e8;
$request_coin->coin = $user_asset->coin;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment