后台-赠送钻石水晶-提取公共方法并实现对应的机器人推送
This commit is contained in:
@@ -39,7 +39,6 @@ public class Constant {
|
||||
*/
|
||||
public static class OfficialType {
|
||||
public static Byte interSendDiamond = 12; // 官方直接送钻石
|
||||
public static Byte actReward = 17; // 活动奖励
|
||||
public static Byte chargeByCompanyAccount = 20; // 打款至公账充值金币
|
||||
public static Byte officalDiamondReduce = 51; // 官方钻石支出
|
||||
public static Byte clearUserGold = 61; //用户金币清除
|
||||
|
@@ -1,5 +1,9 @@
|
||||
package com.accompany.core.enumeration;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -9,37 +13,21 @@ import java.util.Optional;
|
||||
* @author xiaoyuyou
|
||||
* @date 2019/6/11 18:32
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum CurrencyEnum {
|
||||
|
||||
DIAMOND((byte)1, "金币", 0.0000625),
|
||||
CRYSTAL((byte)2, "水晶", 0.0001),
|
||||
GOLD((byte)3, "钻石", 0.0001),
|
||||
GUILD_USD((byte)4, "公会薪资", 1),
|
||||
GAME_USD((byte)5, "游戏薪资", 1),
|
||||
GUILD_CRYSTAL((byte)6, "公会紫晶", 0.0000625),
|
||||
DIAMOND((byte)1, "金币", BigDecimal.valueOf(7000L)),
|
||||
CRYSTAL((byte)2, "水晶", BigDecimal.valueOf(11200L)),
|
||||
GOLD((byte)3, "钻石", BigDecimal.valueOf(11200L)),
|
||||
GUILD_USD((byte)4, "公会薪资", BigDecimal.ONE),
|
||||
GAME_USD((byte)5, "游戏薪资", BigDecimal.ONE),
|
||||
GUILD_CRYSTAL((byte)6, "公会紫晶", BigDecimal.valueOf(7000L)),
|
||||
;
|
||||
|
||||
CurrencyEnum(byte value, String desc, double exchangeRate) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
this.exchangeRate = exchangeRate;
|
||||
}
|
||||
|
||||
private byte value;
|
||||
private String desc;
|
||||
private double exchangeRate;
|
||||
|
||||
public byte getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public double getExchangeRate() {
|
||||
return exchangeRate;
|
||||
}
|
||||
private BigDecimal exchangeRate;
|
||||
|
||||
public static CurrencyEnum get(byte value) {
|
||||
Optional<CurrencyEnum> result = Arrays.stream(CurrencyEnum.values()).filter(currencyEnum ->
|
||||
|
Reference in New Issue
Block a user