dos 2 месяцев назад
Родитель
Сommit
6906113f4f
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      game-common/src/main/java/com/game/common/utils/MoneyUtils.java

+ 5 - 4
game-common/src/main/java/com/game/common/utils/MoneyUtils.java

@@ -42,11 +42,12 @@ public class MoneyUtils {
         consumeUserCoin = consumeUserCoin * -1; //转为为正数
 //        }
         if(coin - coinCash == 0){
-            return consumeUserCoin; //可提现等于总额则同步扣除
+            return consumeUserCoin * -1; //可提现等于总额则同步扣除
         }else if(coinCash < consumeUserCoin){
-            return coinCash; //提现余额不足抵扣 则全扣除
+            return coinCash * -1; //提现余额不足抵扣 则全扣除
         }
-        double res = consumeUserCoin - (coin - coinCash);
-        return res*-1; //转回负数
+        return consumeUserCoin * -1;
+        /*double res = consumeUserCoin - (coin - coinCash);
+        return res*-1; //转回负数*/
     }
 }