巅峰赛ErrorCode添加,日志添加

lvxinran 2021-06-23 15:25:50 +08:00
parent 62f880ce59
commit 9baf176021
3 changed files with 8 additions and 4 deletions

View File

@ -170,6 +170,7 @@ public enum ErrorCode implements IErrorCode {
LOCK_FILL(140,"锁定数量已满,无法刷新"),
REDPACKET_DAILY_LIMIT(141,"今日福利红包已达领取上限"),
CHAMPION_BET_GUESS_OVER_TIME(142,"巅峰赛竞猜超时,请重新进入页面")
;
private static final Set<Integer> CodeSet = new HashSet<>();

View File

@ -23,6 +23,8 @@ import com.ljsd.jieling.util.ItemUtil;
import com.ljsd.jieling.util.MessageUtil;
import config.SArenaRobotConfig;
import manager.STableManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rpc.protocols.ArenaInfoProto;
import rpc.protocols.CommonProto;
import rpc.protocols.MessageTypeProto;
@ -36,6 +38,9 @@ import java.util.Map;
* 0 1 ChampionBetInfo
*/
public class ChampionBetInfoHandler extends BaseHandler<ArenaInfoProto.ChampionGetBetRequest> {
private static final Logger LOGGER = LoggerFactory.getLogger(ChampionBetInfoHandler.class);
@Override
public MessageTypeProto.MessageType getMessageCode() {
return MessageTypeProto.MessageType.CHAMPION_BET_INFO_REQUEST;
@ -247,9 +252,7 @@ public class ChampionBetInfoHandler extends BaseHandler<ArenaInfoProto.ChampionG
.build());
builder.setWinUid(myGuessID);
builder.setMyBetCoins(mineBetCoins);
LOGGER.info("竞猜1uid=>{},竞猜2uid{}",builder.getChampionBattleInfo().getMyInfo().getUid(),builder.getChampionBattleInfo().getEnemyInfo().getUid());
}
}

View File

@ -67,7 +67,7 @@ public class ChampionGuessHandler extends BaseHandler<ArenaInfoProto.ChampionBet
ArenaRecord arenaRecord = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", selectUid, ArenaRecord.class);
if(arenaRecord.getAttackId()!=winUid && arenaRecord.getDefUid()!=winUid){
LOGGER.error("the uid={} guess winner={} is not exists,recordId={}",uid,winUid,arenaRecord.getId());
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
throw new ErrorCodeException(ErrorCode.CHAMPION_BET_GUESS_OVER_TIME);
}
User user = UserManager.getUser(uid);
int[] arenaItem = STableManager.getFigureConfig(CommonStaticConfig.class).getsChampionshipSetting().getArenaItem();