dos преди 2 месеца
родител
ревизия
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; //转回负数*/
     }
 }