Commit 7b3a0c13 authored by ZhuChunYang's avatar ZhuChunYang

增加代扣

parent 32da7fcb
......@@ -14,6 +14,7 @@ use common\business\BrowerBusiness;
use common\business\CoinBusiness;
use common\business\ExchangeBusiness;
use common\models\psources\Coin;
use common\models\psources\CoinPlatformWithHold;
use common\models\psources\CoinRecommend;
use common\models\psources\MinerFee;
use Yii;
......@@ -308,4 +309,23 @@ class CoinController extends BaseController
return ['code' => 1,'data' => [],'msg' => '平台参数不能为空'];
}
}
/**
*获取代扣信息
*/
public function actionGetWithHold()
{
$request = Yii::$app->request;
$platform = $request->get('platform', '');
if($platform){
$platform_with_hold = CoinPlatformWithHold::getRecord($platform);
if($platform_with_hold){
return ['code' => 0,'data' => $platform_with_hold];
}else{
return ['code' => 0, 'data' => []];
}
}else{
return ['code' => 1,'data' => [],'msg' => '平台参数不能为空'];
}
}
}
<?php
/**
* Created by PhpStorm.
* User: ZCY
* Date: 2019/3/1
* Time: 17:37
*/
namespace common\models\psources;
use Yii;
class CoinPlatformWithHold extends BaseActiveRecord
{
public static function tableName()
{
return 'coin_platform_withhold';
}
public static function getRecord($platform)
{
return self::find()->where(['platform' => $platform])->asArray()->one();
}
}
\ No newline at end of file
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