测试充值
parent
459ef26b50
commit
bacd35c48e
|
@ -39,25 +39,27 @@ public class SExchangeRate implements BaseConfig {
|
|||
for (Field field : fields) {
|
||||
field.setAccessible(true);
|
||||
String temp = "price_";
|
||||
if(!field.getName().contains(temp)){
|
||||
continue;
|
||||
if (!field.getName().contains(temp)) {
|
||||
continue;
|
||||
}
|
||||
String substring = field.getName().substring(temp.length());
|
||||
|
||||
Integer integer = Integer.valueOf(substring);
|
||||
doubleIntegerHashMap.putIfAbsent(integer,new HashMap<>());
|
||||
doubleIntegerHashMap.putIfAbsent(integer, new HashMap<>());
|
||||
|
||||
HashMap<Integer, Double> doubleIntegerHashMap = SExchangeRate.doubleIntegerHashMap.get(integer);
|
||||
|
||||
config.entrySet().forEach(integerSExchangeRateEntry -> {
|
||||
try {
|
||||
if(integer==1){
|
||||
doubleIntegerHashMap.put(integerSExchangeRateEntry.getValue().getPrice_1(), Double.valueOf((int)field.get(integerSExchangeRateEntry.getValue())));
|
||||
}else {
|
||||
doubleIntegerHashMap.put(integerSExchangeRateEntry.getValue().getPrice_1(),Double.valueOf((float) field.get(integerSExchangeRateEntry.getValue())));
|
||||
if (integer == 1) {
|
||||
doubleIntegerHashMap.put(integerSExchangeRateEntry.getValue().getPrice_1(), Double.valueOf((int) field.get(integerSExchangeRateEntry.getValue())));
|
||||
} else {
|
||||
float f = (float) field.get(integerSExchangeRateEntry.getValue());
|
||||
double v = Double.parseDouble(Float.toString(f));
|
||||
doubleIntegerHashMap.put(integerSExchangeRateEntry.getValue().getPrice_1(), v);
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue