nili
5 months ago
8 changed files with 54 additions and 92 deletions
@ -1,26 +1,33 @@ |
|||||
package awesome.group.game.service.bo.citrus; |
package awesome.group.game.service.bo.citrus; |
||||
|
|
||||
import awesome.group.game.dao.bean.MatrixApp; |
import awesome.group.game.dao.bean.MatrixApp; |
||||
|
import awesome.group.game.service.bo.matrix.AppNormalConfig; |
||||
|
import com.google.gson.Gson; |
||||
|
import org.springframework.util.StringUtils; |
||||
|
|
||||
public class AppBasicInfo extends AppCashConfig{ |
public class AppBasicInfo extends AppNormalConfig { |
||||
public String name; |
public String name; |
||||
public String code; |
public String code; |
||||
public String img; |
public String img; |
||||
public String url; |
public String url; |
||||
public Integer version; |
public Integer version; |
||||
public boolean enablePangolin = true; |
|
||||
public int pangolinDailyLimit = 10; |
|
||||
public int tencentDailyLimit = 10; |
|
||||
|
|
||||
public AppBasicInfo() { |
public AppBasicInfo() { |
||||
} |
} |
||||
|
|
||||
public AppBasicInfo(MatrixApp app) { |
public static AppBasicInfo getBasic(MatrixApp app) { |
||||
super(app); |
AppBasicInfo res; |
||||
this.name = app.getName(); |
if (StringUtils.hasText(app.getNormalConfig())) { |
||||
this.code = app.getCode(); |
Gson gson = new Gson(); |
||||
this.img = app.getImg(); |
res = gson.fromJson(app.getNormalConfig(), AppBasicInfo.class); |
||||
this.url = app.getUrl(); |
} else { |
||||
this.version = app.getVersion(); |
res = new AppBasicInfo(); |
||||
|
} |
||||
|
res.name = app.getName(); |
||||
|
res.code = app.getCode(); |
||||
|
res.img = app.getImg(); |
||||
|
res.url = app.getUrl(); |
||||
|
res.version = app.getVersion(); |
||||
|
return res; |
||||
} |
} |
||||
} |
} |
||||
|
@ -1,40 +0,0 @@ |
|||||
package awesome.group.game.service.bo.citrus; |
|
||||
|
|
||||
import awesome.group.game.dao.bean.MatrixApp; |
|
||||
import com.google.gson.Gson; |
|
||||
import com.google.gson.reflect.TypeToken; |
|
||||
import org.springframework.util.StringUtils; |
|
||||
|
|
||||
import java.util.Arrays; |
|
||||
import java.util.List; |
|
||||
|
|
||||
public class AppCashConfig { |
|
||||
public List<Integer> moneyLadder;//提现梯度,单位分
|
|
||||
public Integer noAuditMoney;//不需审核的金额,单位分
|
|
||||
public String qqUrl;//qq客服链接
|
|
||||
public Integer dayLimit;//每日提现次数
|
|
||||
|
|
||||
public AppCashConfig() { |
|
||||
} |
|
||||
|
|
||||
public AppCashConfig(MatrixApp app) { |
|
||||
Gson gson = new Gson(); |
|
||||
if (StringUtils.hasText(app.getMoneyLadder())) { |
|
||||
this.moneyLadder = gson.fromJson(app.getMoneyLadder(), new TypeToken<List<Integer>>() { |
|
||||
}.getType()); |
|
||||
} else { |
|
||||
moneyLadder = Arrays.asList(30, 50, 100, 1000, 3000, 5000); |
|
||||
} |
|
||||
if (app.getNoAuditMoney() != null) { |
|
||||
this.noAuditMoney = app.getNoAuditMoney(); |
|
||||
} else { |
|
||||
this.noAuditMoney = 30; |
|
||||
} |
|
||||
this.qqUrl = app.getQqUrl(); |
|
||||
if (app.getDayLimit() != null) { |
|
||||
this.dayLimit = app.getDayLimit(); |
|
||||
} else { |
|
||||
this.dayLimit = 3; |
|
||||
} |
|
||||
} |
|
||||
} |
|
Loading…
Reference in new issue