From 421eadc84191ded11ddb126eb92cffb6f6edf7ee Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期六, 20 一月 2024 11:40:10 +0800
Subject: [PATCH] 10076 越南sdk接入(充值改美元验证)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
index ac67dc6..497d008 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/CommFunc.py
@@ -592,21 +592,20 @@
         
     return ""
 
-def CoinToYuan(orderCoin):
+def CoinToYuan(orderCoin, rate=1):
     '''coin转化为元
     '''
-    rate = 1
     yuan = orderCoin / float(rate)
     if str(yuan).endswith(".0"):
         return int(yuan)
     return yuan
 
-def RMBToCoin(floatRMB):
+def RMBToCoin(floatRMB, rate=1):
     ''' 元转为coin,统一函数,方便修改及搜索
     @param floatRMB: 单位元,float 类型,支持 RMB 或 美元
+    @param rate: 转化比例,越南版本配表及coin均使用越南盾原值,即比例为1:1,故默认值改1
     @return: 转化为coin数值
     '''
     # 由于float会有不精确的现象出现xxx.9999999或xxx.0000000000001的问题,所以这里计算出的结果向上取整
-    rate = 1 # 越南版本配表及coin均使用越南盾原值,即比例为1:1
     return int(math.ceil(round(floatRMB * rate)))
 

--
Gitblit v1.8.0