Merge branch 'master_dev' into master_otnew

master_0.05_aqlm
grimm 2024-01-16 14:38:16 +08:00
commit 00d24de76e
4 changed files with 20 additions and 6 deletions

View File

@ -1,6 +1,6 @@
package com.ljsd.jieling.exception;
import config.SErrorCodeEerverConfig;
import config.SErrorCodeHint;
import util.StringUtil;
import java.util.ArrayList;
@ -28,10 +28,10 @@ public class ErrorTableException extends Exception {
}
public ErrorTableException(int id) {
String message = SErrorCodeEerverConfig.errorTableMap.get(id);
String message = SErrorCodeHint.errorMap.get(id);
if (StringUtil.isEmpty(message)){
this.id = -1;
this.msg = "操作失败,并未找到错误码:{"+id+"},请联系管理员";
this.msg = "发现异常,并未找到错误码:{"+id+"},请联系管理员";
}else {
this.id = id;
this.msg = message;

View File

@ -87,6 +87,7 @@ public class ContinuousGiftActivity extends AbstractActivity {
Collection<SThemeActivityShop> themeShops = SThemeActivityShop.themeMap.getOrDefault(id, new HashMap<>(0)).values();
for (SThemeActivityShop theme : themeShops) {
LOGGER.info("连续礼包活动日志acid{}uid{}giftid{}num:{}, themeid:{},themegiftid:{},themetype:{}",id,user.getId(),giftId,giftNum,theme.getId(),theme.getGoodId(),theme.getGoodType());
if (theme.getGoodId() == giftId && theme.getGoodType() == type){
// 记录礼包购买次数
ActivityProgressInfo current = missionMap.getOrDefault(theme.getId(),new ActivityProgressInfo());
@ -94,8 +95,8 @@ public class ContinuousGiftActivity extends AbstractActivity {
// 当前礼包状态处理
if (checkBuyGiftLimit(user,theme.getId(),current.getProgrss())){
current.setState(8);
missionMap.put(theme.getId(),current);
}
missionMap.put(theme.getId(),current);
break;
}
}

View File

@ -12,6 +12,7 @@ import com.ljsd.jieling.db.redis.RedisKey;
import com.ljsd.jieling.db.redis.RedisUtil;
import com.ljsd.jieling.exception.ErrorCode;
import com.ljsd.jieling.exception.ErrorCodeException;
import com.ljsd.jieling.exception.ErrorTableException;
import com.ljsd.jieling.globals.BIReason;
import com.ljsd.jieling.globals.Global;
import com.ljsd.jieling.handler.GetPlayerInfoHandler;
@ -939,7 +940,7 @@ public class PlayerLogic {
}
Hero hero = userInMem.getHeroManager().getHero(heroId);
if(hero == null){
throw new ErrorCodeException(ErrorCode.newDefineCode("hero no"));
throw new ErrorTableException(159,"未找到英雄");
}
PlayerInfoProto.ViewHeroInfoResponse.Builder builder = PlayerInfoProto.ViewHeroInfoResponse.newBuilder();
Map<Integer, Long> heroNotBufferAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(userInMem, hero, true, teamId);

View File

@ -3,6 +3,7 @@ package config;
import manager.STableManager;
import manager.Table;
import java.util.HashMap;
import java.util.Map;
@Table(name ="ErrorCodeHint")
@ -11,11 +12,16 @@ public class SErrorCodeHint implements BaseConfig {
private int id;
private int showType;
private String desc;
public static Map<Integer, String> errorMap = new HashMap<>();
@Override
public void init() throws Exception {
Map<Integer, SErrorCodeHint> config = STableManager.getConfig(SErrorCodeHint.class);
for (SErrorCodeHint value : config.values()) {
errorMap.put(value.getId(),value.getDesc());
}
}
@ -27,5 +33,11 @@ public class SErrorCodeHint implements BaseConfig {
return showType;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}