独联体-兑换金币比例
This commit is contained in:
@@ -2,6 +2,7 @@ package com.accompany.business.constant.guild;
|
||||
|
||||
import com.accompany.core.enumeration.BillObjTypeEnum;
|
||||
import com.accompany.core.enumeration.CurrencyEnum;
|
||||
import com.accompany.core.enumeration.PartitionEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -74,4 +75,11 @@ public enum GuildUsdOperateTypeEnum {
|
||||
public boolean isCanCustom() {
|
||||
return canCustom;
|
||||
}
|
||||
|
||||
public BigDecimal getRatio(Integer partitionId) {
|
||||
if (this == USD_TO_PLATFORM && partitionId == PartitionEnum.SOVIET.getId()) {
|
||||
return new BigDecimal("7350");
|
||||
}
|
||||
return ratio;
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ public class GuildUsdProd {
|
||||
this.partitionId = partitionId;
|
||||
this.type = typeEnum.getType();
|
||||
this.guildUsdNum = guildUsdNum;
|
||||
this.currencyNum = guildUsdNum.multiply(typeEnum.getRatio());
|
||||
this.currencyNum = guildUsdNum.multiply(typeEnum.getRatio(partitionId));
|
||||
this.extraCurrencyNum = BigDecimal.ZERO;
|
||||
this.enable = true;
|
||||
}
|
||||
|
@@ -175,7 +175,7 @@ public class GuildUsdChannelService {
|
||||
GuildUsdProdChannelVo prodPanel = new GuildUsdProdChannelVo();
|
||||
prodPanel.setType(typeEnum.getType());
|
||||
prodPanel.setCanCustom(typeEnum.isCanCustom());
|
||||
prodPanel.setRatio(typeEnum.getRatio());
|
||||
prodPanel.setRatio(typeEnum.getRatio(partitionId));
|
||||
|
||||
List<GuildUsdProd> prodList = guildUsdProdService.listVaildProdByType(partitionId, typeEnum.getType());
|
||||
prodPanel.setProdList(prodList);
|
||||
@@ -193,7 +193,7 @@ public class GuildUsdChannelService {
|
||||
channelVo.setTabKey(typeEnum.getTabKey());
|
||||
channelVo.setType(typeEnum.getType());
|
||||
channelVo.setCanCustom(typeEnum.isCanCustom());
|
||||
channelVo.setRatio(typeEnum.getRatio());
|
||||
channelVo.setRatio(typeEnum.getRatio(partitionId));
|
||||
channelVo.setProdList(prodMap.get(typeEnum.getType()));
|
||||
return channelVo;
|
||||
}).collect(Collectors.groupingBy(GuildUsdProdChannelVo::getTabKey));
|
||||
|
Reference in New Issue
Block a user