|
|
@@ -45,8 +45,8 @@ class TeacLogin
|
|
|
{
|
|
|
|
|
|
$ledgerWalletModel = Loader::model('LedgerWalletModel');
|
|
|
- $total_price = bcmul($chabao, $num, 2); //总价
|
|
|
- $fee = bcmul($total_price, $fee, 2); //手续费
|
|
|
+ $total_price = bcmul($chabao, $num, 4); //总价
|
|
|
+ $fee = bcmul($total_price, $fee, 4); //手续费
|
|
|
|
|
|
//扣除用户茶宝
|
|
|
$ledgerWalletModel->changeWalletAccount($uid, Asset::TOKEN, -$total_price, LedgerTokenChangeModel::BuySellg, $fromUid);
|
|
|
@@ -56,7 +56,7 @@ class TeacLogin
|
|
|
|
|
|
|
|
|
//添加来源茶宝
|
|
|
- $ledgerWalletModel->changeWalletAccount($fromUid, Asset::TOKEN, bcsub($total_price, $fee, 2), LedgerTokenChangeModel::BuySellg, $uid);
|
|
|
+ $ledgerWalletModel->changeWalletAccount($fromUid, Asset::TOKEN, bcsub($total_price, $fee, 4), LedgerTokenChangeModel::BuySellg, $uid);
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
@@ -71,11 +71,11 @@ class TeacLogin
|
|
|
{
|
|
|
|
|
|
$ledgerWalletModel = Loader::model('LedgerWalletModel');
|
|
|
- $total_price = bcmul($chabao, $num, 2); //总价
|
|
|
- $fee = bcmul($total_price, $fee, 2); //手续费
|
|
|
+ $total_price = bcmul($chabao, $num, 4); //总价
|
|
|
+ $fee = bcmul($total_price, $fee, 4); //手续费
|
|
|
|
|
|
//添加用户茶宝
|
|
|
- $ledgerWalletModel->changeWalletAccount($uid, Asset::TOKEN, bcsub($total_price, $fee, 2), LedgerTokenChangeModel::BuySellg, $fromUid);
|
|
|
+ $ledgerWalletModel->changeWalletAccount($uid, Asset::TOKEN, bcsub($total_price, $fee, 4), LedgerTokenChangeModel::BuySellg, $fromUid);
|
|
|
|
|
|
|
|
|
//扣除用户Teac
|