后台-赠送钻石水晶-提取公共方法并实现对应的机器人推送

This commit is contained in:
2025-09-11 18:36:48 +08:00
parent 158c9786e4
commit db41be407d
8 changed files with 365 additions and 595 deletions

View File

@@ -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; //用户金币清除

View File

@@ -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 ->