Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
30abfc1d1c
|
@ -40,10 +40,12 @@ public class SGlobalActivity implements BaseConfig {
|
|||
String startTime = sGlobalActivity.getStartTime();
|
||||
String endtime = sGlobalActivity.getEndtime();
|
||||
if(time == ActivityType.OPEN_TYPE_TIME ){
|
||||
if("0".equals(endtime)){
|
||||
continue;
|
||||
if(!"0".equals(startTime)){
|
||||
sGlobalActivity.setStartTimeLong(TimeUtils.parseTimeToMiles(startTime,TimeUtils.Stand_CeHua_Data_format));
|
||||
}
|
||||
if(!"0".equals(endtime)){
|
||||
sGlobalActivity.setEndTimeLong(TimeUtils.parseTimeToMiles(endtime,TimeUtils.Stand_CeHua_Data_format));
|
||||
}
|
||||
sGlobalActivity.setStartTimeLong(TimeUtils.parseTimeToMiles(startTime,"YYYYMMdd hh:mm:ss"));
|
||||
continue;
|
||||
}
|
||||
sGlobalActivity.setStartTimeLong(Long.parseLong(startTime));
|
||||
|
|
|
@ -4,6 +4,8 @@ import com.ljsd.GameApplication;
|
|||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||
import com.ljsd.jieling.util.StringUtil;
|
||||
import com.ljsd.jieling.util.TimeUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -39,6 +41,8 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
|
||||
private int[] openPrivilege;
|
||||
|
||||
private int contiueDays;
|
||||
|
||||
|
||||
|
||||
private int time;
|
||||
|
@ -63,12 +67,35 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
int level = discountType[1];
|
||||
rechargeLevelMapTmp.put(level,sRechargeCommodityConfig);
|
||||
}
|
||||
|
||||
int time = sRechargeCommodityConfig.getTime();
|
||||
String startTime = sRechargeCommodityConfig.getStartTime();
|
||||
String endtime = sRechargeCommodityConfig.getEndtime();
|
||||
if(time == ActivityType.OPEN_TYPE_TIME ){
|
||||
if(!"0".equals(startTime)){
|
||||
sRechargeCommodityConfig.setStartTimeLong(TimeUtils.parseTimeToMiles(startTime,TimeUtils.Stand_CeHua_Data_format));
|
||||
}
|
||||
if(!"0".equals(endtime)){
|
||||
sRechargeCommodityConfig.setEndTimeLong(TimeUtils.parseTimeToMiles(endtime,TimeUtils.Stand_CeHua_Data_format));
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
if(!StringUtil.isEmpty(startTime)){
|
||||
sRechargeCommodityConfig.setStartTimeLong(Long.parseLong(startTime));
|
||||
}
|
||||
if(!StringUtil.isEmpty(endtime)){
|
||||
sRechargeCommodityConfig.setStartTimeLong(Long.parseLong(endtime));
|
||||
}
|
||||
}
|
||||
rechargeCommodityConfigMap = config;
|
||||
rechargeLevelMap = rechargeLevelMapTmp;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public long getTimeLong(long createUserTime,int type) {
|
||||
long baseTime = startTimeLong;
|
||||
if(type == 2){
|
||||
|
@ -154,4 +181,17 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
public String getEndtime() {
|
||||
return endtime;
|
||||
}
|
||||
|
||||
public int getContiueDays() {
|
||||
return contiueDays;
|
||||
}
|
||||
|
||||
|
||||
public void setStartTimeLong(long startTimeLong) {
|
||||
this.startTimeLong = startTimeLong;
|
||||
}
|
||||
|
||||
public void setEndTimeLong(long endTimeLong) {
|
||||
this.endTimeLong = endTimeLong;
|
||||
}
|
||||
}
|
|
@ -51,12 +51,12 @@ public class GuilidManager {
|
|||
}
|
||||
|
||||
public static void removeOneApplyGuildInfos(int guild,int uid){
|
||||
RedisUtil.getInstence().removeMapEntrys("apply-user-guild",Integer.toString(guild),uid);
|
||||
RedisUtil.getInstence().removeMapEntrys("apply-user-play",Integer.toString(uid),guild);
|
||||
RedisUtil.getInstence().removeMapEntrys("apply-user-guild",Integer.toString(guild),Integer.toString(uid));
|
||||
RedisUtil.getInstence().removeMapEntrys("apply-user-play",Integer.toString(uid),Integer.toString(guild));
|
||||
}
|
||||
|
||||
public static void removeMineApplyGuildInfos(int guild,int uid){
|
||||
RedisUtil.getInstence().removeMapEntrys("apply-user-play",Integer.toString(uid),guild);
|
||||
RedisUtil.getInstence().removeMapEntrys("apply-user-play",Integer.toString(uid),Integer.toString(guild));
|
||||
}
|
||||
|
||||
public static void addGuildLog(GuildLog guildLog) throws Exception {
|
||||
|
|
|
@ -298,7 +298,7 @@ public class GuildLogic {
|
|||
int id = guildApply.getId();
|
||||
User userApply = UserManager.getUser(id);
|
||||
if(userApply.getPlayerInfoManager().getGuildId()!=0){
|
||||
GuilidManager.removeOneApplyGuildInfos(guildId,uid);
|
||||
GuilidManager.removeOneApplyGuildInfos(guildId,id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ public class PlayerLogic {
|
|||
}
|
||||
int days =1;
|
||||
int time = nowTime;
|
||||
int remainDays=29;
|
||||
int remainDays=sRechargeCommodityConfig.getContiueDays() -1;
|
||||
if(goodsType == -1){
|
||||
Integer lastSendTime = goodseSendDailyMap.get(type);
|
||||
if(lastSendTime!=null){
|
||||
|
@ -313,6 +313,17 @@ public class PlayerLogic {
|
|||
}
|
||||
user.getPlayerInfoManager().getRechargeInfo().updateGoodsSendTime(type,time);
|
||||
int theIndexByTarget = MathUtils.getTheIndexByTarget(sRechargeCommodityConfig.getPlayerLevel(), level);
|
||||
int[][] rewardTemplates = sRechargeCommodityConfig.getExtraReward()[0];
|
||||
int[][] rewards = new int[rewardTemplates.length][];
|
||||
for(int[] rewardTemplate : rewardTemplates){
|
||||
int typeReward = rewardTemplate[0];
|
||||
|
||||
switch (typeReward){
|
||||
case 1:
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
int[][] extraReward = sRechargeCommodityConfig.getExtraReward()[theIndexByTarget];
|
||||
String mailReward = ItemUtil.getMailReward(extraReward);
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("recharge_"+type+"_daily_title");
|
||||
|
|
|
@ -96,7 +96,7 @@ public class BuyGoodsLogic {
|
|||
}
|
||||
|
||||
int nowTime =(int) (TimeUtils.now()/1000);
|
||||
if(type == GiftGoodsType.MONTHCARD || type == GiftGoodsType.LUXURYMONTHCARD ){
|
||||
if(type == GiftGoodsType.MONTHCARD || type == GiftGoodsType.LUXURYMONTHCARD || type == GiftGoodsType.WEEKCARD){
|
||||
Integer endTime = null;
|
||||
Map<Integer, Integer> goodsDurationMap = rechargeInfo.getGoodsDurationMap();
|
||||
boolean needSendMail = false;
|
||||
|
@ -115,7 +115,7 @@ public class BuyGoodsLogic {
|
|||
resultRes.setResultMsg("不可以过早购买");
|
||||
return resultRes;
|
||||
}
|
||||
endTime += 30 * 24 * 3600;
|
||||
endTime +=sRechargeCommodityConfig.getContiueDays() * 24 * 3600;
|
||||
rechargeInfo.updateGoodsTypeDuration(sRechargeCommodityConfig.getId(),endTime);
|
||||
if(needSendMail){
|
||||
triggerEvent(user,sRechargeCommodityConfig,nowTime);
|
||||
|
@ -222,7 +222,7 @@ public class BuyGoodsLogic {
|
|||
String title = SErrorCodeEerverConfig.getI18NMessage("recharge_6_stars_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("recharge_6_stars_txt");
|
||||
MailLogic.getInstance().sendMail(user.getId(),title,content,rewardStr.toString(),nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
}else if(goodsType == GiftGoodsType.MONTHCARD){
|
||||
}else if(goodsType == GiftGoodsType.MONTHCARD || goodsType == GiftGoodsType.WEEKCARD){
|
||||
PlayerLogic.getInstance().sendDayilyMail(user,goodsType);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,4 +7,5 @@ public interface GiftGoodsType {
|
|||
int GROTHFOUND=4;//4成长基金
|
||||
int DIRECTBAG=5; //5直购礼包
|
||||
int LUXURYMONTHCARD =6;//6豪华月卡
|
||||
int WEEKCARD = 7; //周卡
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue