Merge branch 'master_test_gn_zf' into master_test_gn
commit
12600a3bed
|
@ -1560,6 +1560,9 @@ public class TimeUtils {
|
|||
}
|
||||
}
|
||||
|
||||
public static long getNextTimeByDay(long time,int day){
|
||||
return time+day*24*60*60*1000;
|
||||
}
|
||||
|
||||
|
||||
public static long getLastOrUnderHour(long time,int week,int hour,int minute,boolean lastOrUnder) {
|
||||
|
|
|
@ -172,6 +172,10 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
}
|
||||
|
||||
public int getType() {
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(modId);
|
||||
if (config != null && config.getId() == 1120){
|
||||
return config.getOtype();
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
|
@ -203,7 +207,13 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
updateString("endTime",endTime);
|
||||
}
|
||||
|
||||
public int getDailyUpdate() { return dailyUpdate; }
|
||||
public int getDailyUpdate() {
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(modId);
|
||||
if (config != null && config.getId() == 1120){
|
||||
return config.getDailyUpdate();
|
||||
}
|
||||
return dailyUpdate;
|
||||
}
|
||||
|
||||
public void setDailyUpdate(int dailyUpdate) {
|
||||
this.dailyUpdate = dailyUpdate;
|
||||
|
@ -238,14 +248,22 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
updateString("continueDays",continueDays);
|
||||
}
|
||||
|
||||
public long getRefreshTime() { return refreshTime; }
|
||||
public long getRefreshTime() {
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(modId);
|
||||
if (config != null && config.getId() == 1120){
|
||||
return lastBuyTime + config.getDailyUpdate()*24*60*60*1000L;
|
||||
}
|
||||
return refreshTime;
|
||||
}
|
||||
|
||||
public void setRefreshTime(long refreshTime) {
|
||||
this.refreshTime = refreshTime;
|
||||
updateString("refreshTime",refreshTime);
|
||||
}
|
||||
|
||||
public long getLastBuyTime() { return lastBuyTime; }
|
||||
public long getLastBuyTime() {
|
||||
return lastBuyTime;
|
||||
}
|
||||
|
||||
public void setLastBuyTime(long lastBuyTime) {
|
||||
this.lastBuyTime = lastBuyTime;
|
||||
|
@ -253,6 +271,10 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
}
|
||||
|
||||
public int[] getPrivilege() {
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(modId);
|
||||
if (config != null && config.getId() == 1120){
|
||||
return config.getOpenPrivilege();
|
||||
}
|
||||
return privilege;
|
||||
}
|
||||
|
||||
|
@ -262,6 +284,10 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
}
|
||||
|
||||
public int getTimeType() {
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(modId);
|
||||
if (config != null && config.getId() == 1120){
|
||||
return config.getTime();
|
||||
}
|
||||
return timeType;
|
||||
}
|
||||
|
||||
|
@ -271,6 +297,17 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
}
|
||||
|
||||
public boolean isUserBuyRefresh() {
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.configMap.get(modId);
|
||||
if (config != null && config.getId() == 1120){
|
||||
String[] onSaleRule = config.getOnSaleRule().split("\\|");
|
||||
for (String saleRule : onSaleRule) {
|
||||
String[] rule = saleRule.split("#");
|
||||
if(rule[0].equals("7")){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return isUserBuyRefresh;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue