generated from root/miduo_server
修改F5礼包接口
parent
95d2554aa1
commit
860a7e7edb
|
@ -484,7 +484,8 @@ public class RedisKey {
|
|||
public static final String CROSS_CAMPWAR_DAILY_MARK = "CROSS_CAMPWAR_DAILY_MARK";
|
||||
public static final String CROSS_CAMPWAR_SEASON_MARK = "CROSS_CAMPWAR_SEASON_MARK";//混乱之治赛季结束个人排名奖励
|
||||
public static final String CROSS_CAMPWAR_SEASON_CAMP_MARK = "CROSS_CAMPWAR_SEASON_CAMP_MARK";//混乱之治赛季结束阵营排名奖励
|
||||
public static final String RANK_REWARD_SLAVE_GROUPS = "RANK_REWARD_SLAVE_GROUPS";//存储合服后的从服的老跨服分组id,用于加载合服后的用户老跨服榜单奖励
|
||||
public static final String RANK_REWARD_SLAVE_GROUPS = "RANK_REWARD_SLAVE_GROUPS";
|
||||
public static final String F5_GIFT = "F5_GIFT";//F5浮窗礼包
|
||||
//public static Set<String> worldDeathPathCacChe = new HashSet<>();
|
||||
|
||||
static {
|
||||
|
|
|
@ -1585,7 +1585,8 @@ public class RedisUtil {
|
|||
||RedisKey.WORLD_ARENA_RANK_MY_MATH.equals(type)||RedisKey.WORLD_ARENA_MY_PRON.equals(type)
|
||||
||RedisKey.WORLD_ARENA_RRECORD.equals(type)||RedisKey.GLOBAL_DEATH_PATH_WORLD.equals(type)
|
||||
||RedisKey.CUser_ServerId_Key.equals(type) || RedisKey.DEATH_PATH_STATUS.equals(type)
|
||||
||RedisKey.CROSS_SERVER_GROUP.equals(type)||RedisKey.SERVER_OLD_SPLIT_INFO.equals(type)) {
|
||||
||RedisKey.CROSS_SERVER_GROUP.equals(type)||RedisKey.SERVER_OLD_SPLIT_INFO.equals(type)
|
||||
||RedisKey.F5_GIFT.equals(type)) {
|
||||
return type + RedisKey.Delimiter_colon + key;
|
||||
}
|
||||
// if(RedisKey.familyKey.contains(type)){
|
||||
|
|
|
@ -1937,7 +1937,7 @@ public class PlayerLogic {
|
|||
}
|
||||
|
||||
public Result sendF5Gift(String transactionId, String goodsId, int uid) throws Exception {
|
||||
String key = GameApplication.serverId + RedisKey.Delimiter_colon + uid;
|
||||
String key = "F5_GIFT" + RedisKey.Delimiter_colon + uid;
|
||||
Map<String, String> map = RedisUtil.getInstence().getSimpleStringMapValues(key);
|
||||
Result resultRes = new Result();
|
||||
//商品不存在,直接返回失败
|
||||
|
@ -1969,7 +1969,7 @@ public class PlayerLogic {
|
|||
giftInfo = goodsId + ",1";
|
||||
}
|
||||
map.put(transactionId,giftInfo);
|
||||
RedisUtil.getInstence().set(key,map);
|
||||
RedisUtil.getInstence().putMapEntrys(RedisKey.F5_GIFT,String.valueOf(uid),map);
|
||||
resultRes.setResultCode(1);
|
||||
resultRes.setResultMsg("SUCCESS");
|
||||
return resultRes;
|
||||
|
@ -1981,7 +1981,7 @@ public class PlayerLogic {
|
|||
* @throws Exception
|
||||
*/
|
||||
public void dealF5Gift(User user) throws Exception {
|
||||
String key = GameApplication.serverId + RedisKey.Delimiter_colon + user.getId();
|
||||
String key = "F5_GIFT" + RedisKey.Delimiter_colon + user.getId();
|
||||
Map<String, String> map = RedisUtil.getInstence().getSimpleStringMapValues(key);
|
||||
if(map == null||map.size() == 0){
|
||||
return;
|
||||
|
@ -2013,7 +2013,7 @@ public class PlayerLogic {
|
|||
}
|
||||
//有变化,更新redis
|
||||
if(change) {
|
||||
RedisUtil.getInstence().set(key, map);
|
||||
RedisUtil.getInstence().putMapEntrys(RedisKey.F5_GIFT,String.valueOf(user.getId()),map);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue