nili
7 months ago
8 changed files with 54 additions and 92 deletions
@ -1,26 +1,33 @@ |
|||
package awesome.group.game.service.bo.citrus; |
|||
|
|||
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 code; |
|||
public String img; |
|||
public String url; |
|||
public Integer version; |
|||
public boolean enablePangolin = true; |
|||
public int pangolinDailyLimit = 10; |
|||
public int tencentDailyLimit = 10; |
|||
|
|||
public AppBasicInfo() { |
|||
} |
|||
|
|||
public AppBasicInfo(MatrixApp app) { |
|||
super(app); |
|||
this.name = app.getName(); |
|||
this.code = app.getCode(); |
|||
this.img = app.getImg(); |
|||
this.url = app.getUrl(); |
|||
this.version = app.getVersion(); |
|||
public static AppBasicInfo getBasic(MatrixApp app) { |
|||
AppBasicInfo res; |
|||
if (StringUtils.hasText(app.getNormalConfig())) { |
|||
Gson gson = new Gson(); |
|||
res = gson.fromJson(app.getNormalConfig(), AppBasicInfo.class); |
|||
} else { |
|||
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