|
|
@@ -14,7 +14,7 @@ use fast\Asset;
|
|
|
use Exception;
|
|
|
use app\common\model\UserModel;
|
|
|
use think\Db;
|
|
|
-use app\api\validate\Chabao as ChabaoValidate;
|
|
|
+use app\common\model\LedgerTeacEcolyChangeModel;
|
|
|
use app\common\library\Token;
|
|
|
use think\Env;
|
|
|
|
|
|
@@ -132,6 +132,19 @@ class Chabao extends Api
|
|
|
$this->success('ok');
|
|
|
}
|
|
|
|
|
|
+ //转入TeaC生态发展
|
|
|
+ public function teacecology(UserModel $userModel, LedgerWalletModel $ledgerWalletModel)
|
|
|
+ {
|
|
|
+ $user = $userModel->getByPhone($this->params['mobile']);
|
|
|
+
|
|
|
+ if(!$user) $this->error('钱包地址不存在');
|
|
|
+
|
|
|
+ //添加Teac
|
|
|
+ $ledgerWalletModel->changeWalletAccount($user['id'], Asset::TEAC_ECOLY, $this->params['teacecology'], LedgerTeacEcolyChangeModel::TransferIn);
|
|
|
+ $this->success('ok');
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|