Merge branch 'master_test_hw' of http://60.1.1.230/backend/jieling_server into master_test_hw
commit
324a93d144
|
@ -186,27 +186,27 @@ public class ChatLogic {
|
||||||
break;
|
break;
|
||||||
case 3: //好友
|
case 3: //好友
|
||||||
List<Integer> friends = friendManager.getFriends();
|
List<Integer> friends = friendManager.getFriends();
|
||||||
if (!friends.contains(friendId)){
|
if (!friends.contains(friendId)) {
|
||||||
throw new ErrorCodeException(ErrorCode.CHAT_NOT_FRIENDS);
|
throw new ErrorCodeException(ErrorCode.CHAT_NOT_FRIENDS);
|
||||||
}
|
}
|
||||||
//现在好友推送
|
//现在好友推送
|
||||||
if (OnlineUserManager.checkUidOnline(friendId)){
|
if (OnlineUserManager.checkUidOnline(friendId)) {
|
||||||
ISession sessionByUid = OnlineUserManager.getSessionByUid(friendId);
|
ISession sessionByUid = OnlineUserManager.getSessionByUid(friendId);
|
||||||
chatInfo = CBean2Proto.getChatInfoBuilder(user,message,nowTime,0);
|
chatInfo = CBean2Proto.getChatInfoBuilder(user, message, nowTime, 0);
|
||||||
sendChatInfoIndication = ChatProto.SendChatInfoIndication.newBuilder()
|
sendChatInfoIndication = ChatProto.SendChatInfoIndication.newBuilder()
|
||||||
.setChatInfo(chatInfo)
|
.setChatInfo(chatInfo)
|
||||||
.setType(1)
|
.setType(1)
|
||||||
.build();
|
.build();
|
||||||
assert sessionByUid != null;
|
assert sessionByUid != null;
|
||||||
MessageUtil.sendIndicationMessage(sessionByUid, 1, MessageTypeProto.MessageType.SEND_CHAT_INFO_INDICATION_VALUE, sendChatInfoIndication, true);
|
MessageUtil.sendIndicationMessage(sessionByUid, 1, MessageTypeProto.MessageType.SEND_CHAT_INFO_INDICATION_VALUE, sendChatInfoIndication, true);
|
||||||
}else{
|
} else {
|
||||||
RedisUtil.getInstence().hset(GameApplication.serverId +RedisKey.CUser_Chat+friendId,uid +"#"+ nowTime,message, -1);
|
RedisUtil.getInstence().hset(GameApplication.serverId + RedisKey.CUser_Chat + friendId, uid + "#" + nowTime, message, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:{
|
default: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onSendChatSuccess(user,chatType,message);
|
onSendChatSuccess(user,chatType,message);
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.SEND_MESSAGE.getType(),String.valueOf(chatType),message);
|
ReportUtil.onReportEvent(user, ReportEventEnum.SEND_MESSAGE.getType(),String.valueOf(chatType),message);
|
||||||
|
|
|
@ -2,13 +2,15 @@ package com.ljsd.jieling.db.mongo;
|
||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
import com.ljsd.jieling.util.SysUtil;
|
import com.ljsd.jieling.util.SysUtil;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
|
||||||
public class MongoUtiltest {
|
public class MongoUtiltest {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(MongoUtiltest.class);
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -30,7 +32,7 @@ public class MongoUtiltest {
|
||||||
StringBuilder stringBuilder2 = new StringBuilder();
|
StringBuilder stringBuilder2 = new StringBuilder();
|
||||||
if (MongoUtil.equill(obj1, obj, stringBuilder,stringBuilder2)) {
|
if (MongoUtil.equill(obj1, obj, stringBuilder,stringBuilder2)) {
|
||||||
|
|
||||||
System.out.println("匹配");
|
LOGGER.info("匹配");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
File file3 = new File(SysUtil.getPath("conf/checkout_diffmem__" +dbf3.getName()+ ".txt"));
|
File file3 = new File(SysUtil.getPath("conf/checkout_diffmem__" +dbf3.getName()+ ".txt"));
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class FamilyFeteRequestHandler extends BaseHandler<Family.FamilyFeteReque
|
||||||
}
|
}
|
||||||
|
|
||||||
//check cost
|
//check cost
|
||||||
boolean enough = ItemUtil.itemCost(user, sGuildSacrificeConfig.getExpend(), BIReason.FETE_CONSUME, 0);
|
boolean enough = ItemUtil.itemCost(user, sGuildSacrificeConfig.getExpend(), BIReason.FETE_CONSUME, type);
|
||||||
if (!enough) {
|
if (!enough) {
|
||||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,12 +349,12 @@ public class EndlessMap extends AbstractMap{
|
||||||
mapManager.updateEndlessConsumeExecution(mapManager.getEndlessMapInfo().getConsumeExecution()+costNum);
|
mapManager.updateEndlessConsumeExecution(mapManager.getEndlessMapInfo().getConsumeExecution()+costNum);
|
||||||
int [] cost1 = new int[]{costId,costNum};
|
int [] cost1 = new int[]{costId,costNum};
|
||||||
cost[0] = cost1;
|
cost[0] = cost1;
|
||||||
boolean costResult = ItemUtil.itemCost(user, cost, BIReason.ENDLESS_CONSUME_EXECUTION, 1);
|
boolean costResult = ItemUtil.itemCost(user, cost, BIReason.ENDLESS_CONSUME_EXECUTION, mapManager.getCurMapId());
|
||||||
if(!costResult) {
|
if(!costResult) {
|
||||||
costNum = user.getItemManager().getItem(costId).getItemNum();
|
costNum = user.getItemManager().getItem(costId).getItemNum();
|
||||||
cost1[1]= costNum;
|
cost1[1]= costNum;
|
||||||
cost[0] = cost1;
|
cost[0] = cost1;
|
||||||
ItemUtil.itemCost(user,cost,BIReason.ENDLESS_CONSUME_EXECUTION,1);
|
ItemUtil.itemCost(user,cost,BIReason.ENDLESS_CONSUME_EXECUTION,mapManager.getCurMapId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ljsd.jieling.kefu;
|
package com.ljsd.jieling.kefu;
|
||||||
|
|
||||||
import com.ljsd.jieling.core.Lockeys;
|
import com.ljsd.jieling.core.Lockeys;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -11,6 +13,7 @@ import java.util.Set;
|
||||||
* CreateDate: 2020/6/11 11:48
|
* CreateDate: 2020/6/11 11:48
|
||||||
*/
|
*/
|
||||||
public class Cmd_test_lock extends GmAbstract {
|
public class Cmd_test_lock extends GmAbstract {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(Cmd_test_lock.class);
|
||||||
@Override
|
@Override
|
||||||
public boolean exec(String[] args) throws Exception {
|
public boolean exec(String[] args) throws Exception {
|
||||||
Set<Integer> sendUids = new HashSet<>();
|
Set<Integer> sendUids = new HashSet<>();
|
||||||
|
@ -20,7 +23,7 @@ public class Cmd_test_lock extends GmAbstract {
|
||||||
while (i++<10){
|
while (i++<10){
|
||||||
String name = Thread.currentThread().getName();
|
String name = Thread.currentThread().getName();
|
||||||
Thread.currentThread().sleep(1000);
|
Thread.currentThread().sleep(1000);
|
||||||
System.out.println("name"+name+" = [" + i + "]");
|
LOGGER.info("name=>{}, i=>{}",name, i);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -909,8 +909,8 @@ public class ActivityLogic implements IEventHandler{
|
||||||
temp[0] = costConfig[0][0];
|
temp[0] = costConfig[0][0];
|
||||||
temp[1] = (int) MathUtils.calABX(activityProgressInfoMap.get(BlessInfoConfig.BLESS_PROGRESS_STATUS).getProgrss(), costConfig[1]);
|
temp[1] = (int) MathUtils.calABX(activityProgressInfoMap.get(BlessInfoConfig.BLESS_PROGRESS_STATUS).getProgrss(), costConfig[1]);
|
||||||
cost[0] = temp;
|
cost[0] = temp;
|
||||||
LOGGER.info("本次为第{}次抽取,消耗{}个数为{}", activityProgressInfoMap.get(BlessInfoConfig.BLESS_PROGRESS_STATUS).getProgrss(), temp[0], temp[1]);
|
LOGGER.info("blessChoose uid=>{} 本次为第{}次抽取,消耗{}个数为{}", user.getId(), activityProgressInfoMap.get(BlessInfoConfig.BLESS_PROGRESS_STATUS).getProgrss(), temp[0], temp[1]);
|
||||||
boolean costResult = ItemUtil.itemCost(user, cost, BIReason.BLESS_CHOOSE_CONSUME, 1);
|
boolean costResult = ItemUtil.itemCost(user, cost, BIReason.BLESS_CHOOSE_CONSUME, locationId);
|
||||||
if (!costResult) {
|
if (!costResult) {
|
||||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||||
}
|
}
|
||||||
|
@ -930,7 +930,7 @@ public class ActivityLogic implements IEventHandler{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOGGER.info("本次抽取的Id为{}", resultRewardId);
|
LOGGER.info("blessChoose uid=>{}本次抽取的Id为{}", user.getId(), resultRewardId);
|
||||||
Map<Integer, SBlessingRewardPool> poolMap = STableManager.getConfig(SBlessingRewardPool.class);
|
Map<Integer, SBlessingRewardPool> poolMap = STableManager.getConfig(SBlessingRewardPool.class);
|
||||||
int[][] dropItem = new int[1][];
|
int[][] dropItem = new int[1][];
|
||||||
for (Integer count : SBlessingConfig.blessingConfigMap.get(blessActivityId).getCounts()) {
|
for (Integer count : SBlessingConfig.blessingConfigMap.get(blessActivityId).getCounts()) {
|
||||||
|
@ -1266,7 +1266,7 @@ public class ActivityLogic implements IEventHandler{
|
||||||
int[][] costItems = new int[1][];
|
int[][] costItems = new int[1][];
|
||||||
int[] costTemp = {cost[0][0],num};
|
int[] costTemp = {cost[0][0],num};
|
||||||
costItems[0]=costTemp;
|
costItems[0]=costTemp;
|
||||||
boolean result = ItemUtil.itemCost(user,costItems,BIReason.TREASURE_BUY_LEVEL_CONSUME,1);
|
boolean result = ItemUtil.itemCost(user,costItems,BIReason.TREASURE_BUY_LEVEL_CONSUME, level);
|
||||||
if(result) {
|
if(result) {
|
||||||
user.getPlayerInfoManager().setTreasureLevel(level);
|
user.getPlayerInfoManager().setTreasureLevel(level);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -391,7 +391,7 @@ public class ChampionshipLogic {
|
||||||
MailLogic.getInstance().sendMail(user.getId(), title, content, ItemUtil.getMailReward(sChampionshipReward.getSeasonReward()), nowTime, Global.MAIL_EFFECTIVE_TIME);
|
MailLogic.getInstance().sendMail(user.getId(), title, content, ItemUtil.getMailReward(sChampionshipReward.getSeasonReward()), nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
System.out.println("Exception e = "+"size"+ arenaRankInfo.size()+ e.toString());
|
LOGGER.info("Exception e = "+"size"+ arenaRankInfo.size()+ e.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||||
|
@ -411,7 +411,7 @@ public class ChampionshipLogic {
|
||||||
costs[0] = new int[2];
|
costs[0] = new int[2];
|
||||||
costs[0][0] = arenaItemId;
|
costs[0][0] = arenaItemId;
|
||||||
costs[0][1] = itemNum;
|
costs[0][1] = itemNum;
|
||||||
ItemUtil.itemCost(user, costs, BIReason.CHAMPIONM_EXCHANGE_CONSUME, 0);
|
ItemUtil.itemCost(user, costs, BIReason.CHAMPIONM_EXCHANGE_CONSUME, sendId);
|
||||||
Map<Integer, Integer> itemReward = new HashMap<>(1);
|
Map<Integer, Integer> itemReward = new HashMap<>(1);
|
||||||
itemReward.put(rewardItemId, itemNum / sChampionshipSetting.getExchangeItem());
|
itemReward.put(rewardItemId, itemNum / sChampionshipSetting.getExchangeItem());
|
||||||
ItemUtil.addItem(user, itemReward, null, BIReason.CHAMPIONM_EXCHANGE_REWARD);
|
ItemUtil.addItem(user, itemReward, null, BIReason.CHAMPIONM_EXCHANGE_REWARD);
|
||||||
|
|
|
@ -1230,7 +1230,7 @@ public class GuildFightLogic {
|
||||||
public static Family.CarDelayProgressIndication carDelayProgressIndication;
|
public static Family.CarDelayProgressIndication carDelayProgressIndication;
|
||||||
|
|
||||||
public static void minuteCheckForCarFight() throws Exception {
|
public static void minuteCheckForCarFight() throws Exception {
|
||||||
LOGGER.info("车迟斗法progress={}",carProgress);
|
LOGGER.info("minuteCheckForCarFight 车迟斗法progress={}",carProgress);
|
||||||
int carProgressTmp =carProgress;
|
int carProgressTmp =carProgress;
|
||||||
int id =1;
|
int id =1;
|
||||||
|
|
||||||
|
@ -1288,7 +1288,7 @@ public class GuildFightLogic {
|
||||||
}else{
|
}else{
|
||||||
carProgressTmp = -1;
|
carProgressTmp = -1;
|
||||||
}
|
}
|
||||||
System.out.println("当前状态"+carProgressTmp);
|
LOGGER.info("minuteCheckForCarFight 当前状态=>{}", carProgressTmp);
|
||||||
if(carProgressTmp!=carProgress){
|
if(carProgressTmp!=carProgress){
|
||||||
int battleStartTime = 0;
|
int battleStartTime = 0;
|
||||||
int grapStartTime = 0;
|
int grapStartTime = 0;
|
||||||
|
@ -1318,7 +1318,7 @@ public class GuildFightLogic {
|
||||||
|
|
||||||
public static void sendAllProgressUpdate(){
|
public static void sendAllProgressUpdate(){
|
||||||
//向全服玩家广播进度变更信息
|
//向全服玩家广播进度变更信息
|
||||||
System.out.println("状态更改发送推送");
|
LOGGER.info("sendAllProgressUpdate 状态更改发送推送");
|
||||||
for(ISession session : OnlineUserManager.sessionMap.values()){
|
for(ISession session : OnlineUserManager.sessionMap.values()){
|
||||||
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.CAR_DELAY_PROGRESS_INDICATION_VALUE,carDelayProgressIndication,true);
|
MessageUtil.sendIndicationMessage(session,1, MessageTypeProto.MessageType.CAR_DELAY_PROGRESS_INDICATION_VALUE,carDelayProgressIndication,true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -406,7 +406,7 @@ public class HeroLogic{
|
||||||
for(int mustId:mustSet){
|
for(int mustId:mustSet){
|
||||||
maxId = mustId>maxId?mustId:maxId;
|
maxId = mustId>maxId?mustId:maxId;
|
||||||
}
|
}
|
||||||
System.out.println("触发必出"+maxId);
|
LOGGER.info("randomOne uid=>{} 触发必出=>{}", user.getId(), maxId);
|
||||||
SLotterySpecialConfig onConfig = null;
|
SLotterySpecialConfig onConfig = null;
|
||||||
for(SLotterySpecialConfig everyConfig:specialConfigs){
|
for(SLotterySpecialConfig everyConfig:specialConfigs){
|
||||||
if(everyConfig.getDifferentType()!=maxId){
|
if(everyConfig.getDifferentType()!=maxId){
|
||||||
|
@ -783,6 +783,9 @@ public class HeroLogic{
|
||||||
}
|
}
|
||||||
for(;oldLevel<targetLevel;oldLevel++){
|
for(;oldLevel<targetLevel;oldLevel++){
|
||||||
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(oldLevel);
|
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(oldLevel);
|
||||||
|
if (sHeroLevlConfig == null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
consume = sHeroLevlConfig.getConsume();
|
consume = sHeroLevlConfig.getConsume();
|
||||||
combinedAttribute(consume,consumeMap);
|
combinedAttribute(consume,consumeMap);
|
||||||
}
|
}
|
||||||
|
@ -1863,8 +1866,11 @@ public class HeroLogic{
|
||||||
for(String equipId : equipIds){
|
for(String equipId : equipIds){
|
||||||
int equip = Integer.parseInt(equipId);
|
int equip = Integer.parseInt(equipId);
|
||||||
SEquipConfig sEquipConfig = STableManager.getConfig(SEquipConfig.class).get(equip);
|
SEquipConfig sEquipConfig = STableManager.getConfig(SEquipConfig.class).get(equip);
|
||||||
|
if (sEquipConfig == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
int position = sEquipConfig.getPosition();
|
int position = sEquipConfig.getPosition();
|
||||||
boolean itemCost = ItemUtil.itemCost(user, new int[][]{{equip, 1}}, BIReason.EQUIP_WEAR_CONSUME, 1);
|
boolean itemCost = ItemUtil.itemCost(user, new int[][]{{equip, 1}}, BIReason.EQUIP_WEAR_CONSUME, equip);
|
||||||
if(!itemCost){
|
if(!itemCost){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2020,6 +2026,9 @@ public class HeroLogic{
|
||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
int itemNum = item.getItemNum();
|
int itemNum = item.getItemNum();
|
||||||
SItem sItem = SItem.getsItemMap().get(itemId);
|
SItem sItem = SItem.getsItemMap().get(itemId);
|
||||||
|
if (sItem == null || itemNum <= 0 || itemNum >= Integer.MAX_VALUE) {
|
||||||
|
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||||
|
}
|
||||||
int composeNum = itemNum/sItem.getUsePerCount();
|
int composeNum = itemNum/sItem.getUsePerCount();
|
||||||
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
||||||
if (composeNum <= 0 || composeNum > gameSetting.getHeroCompoundLimit()){
|
if (composeNum <= 0 || composeNum > gameSetting.getHeroCompoundLimit()){
|
||||||
|
@ -2028,7 +2037,7 @@ public class HeroLogic{
|
||||||
if (hasHeroNum + composeNum > gameSetting.getHeroNumlimit()){
|
if (hasHeroNum + composeNum > gameSetting.getHeroNumlimit()){
|
||||||
throw new ErrorCodeException(ErrorCode.HERO_HERO_MAX);
|
throw new ErrorCodeException(ErrorCode.HERO_HERO_MAX);
|
||||||
}
|
}
|
||||||
boolean result = ItemUtil.checkCost(user, sItem, itemNum,BIReason.COMPOS_HERO_CONSUME,0);
|
boolean result = ItemUtil.checkCost(user, sItem, itemNum,BIReason.COMPOS_HERO_CONSUME,itemId);
|
||||||
if (!result){
|
if (!result){
|
||||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ import com.ljsd.jieling.ktbeans.sendbeans.ReportServerEvent;
|
||||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||||
import com.ljsd.jieling.logic.dao.UserManager;
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -18,6 +20,9 @@ import java.util.Set;
|
||||||
* @discribe
|
* @discribe
|
||||||
*/
|
*/
|
||||||
public class OnlineUserReportTask extends Thread {
|
public class OnlineUserReportTask extends Thread {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(OnlineUserReportTask.class);
|
||||||
|
|
||||||
public OnlineUserReportTask(){
|
public OnlineUserReportTask(){
|
||||||
setName("OnlineUserReportTask");
|
setName("OnlineUserReportTask");
|
||||||
}
|
}
|
||||||
|
@ -53,7 +58,7 @@ public class OnlineUserReportTask extends Thread {
|
||||||
properties.put("platform","DEFAULT_platform");
|
properties.put("platform","DEFAULT_platform");
|
||||||
properties.put("#time",new Date());
|
properties.put("#time",new Date());
|
||||||
ReportServerEvent reportServerEvent = new ReportServerEvent("online_user_amount",properties);
|
ReportServerEvent reportServerEvent = new ReportServerEvent("online_user_amount",properties);
|
||||||
System.out.println(reportServerEvent.toString());
|
LOGGER.info("OnlineUserReportTask reportServerEvent=>{}", reportServerEvent.toString());
|
||||||
ReportUtil.doReport(reportServerEvent);
|
ReportUtil.doReport(reportServerEvent);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -1261,7 +1261,10 @@ public class ItemUtil {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (entry.getValue() <= 0) {
|
||||||
|
LOGGER.info("checkCost uid=>{} use negative item itemId=>{} count=>{}", user.getId(), entry.getKey(), entry.getValue());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (temporaryItem == null && item.getItemNum() < entry.getValue()) {
|
if (temporaryItem == null && item.getItemNum() < entry.getValue()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class MessageUtil {
|
||||||
} else {
|
} else {
|
||||||
backMessage = generatedMessage.toByteArray();
|
backMessage = generatedMessage.toByteArray();
|
||||||
if (backMessage.length != 0)
|
if (backMessage.length != 0)
|
||||||
LOGGER.info("\r\n" + "uid:" + uid + ":\r\n" + JsonFormat.printToString(generatedMessage));
|
LOGGER.info("wrappedBuffer uid=>{}, generatedMessage=>{}", uid, JsonFormat.printToString(generatedMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
int length = PackageConstant.UID_FIELD_LEN + PackageConstant.TOKEN_LEN
|
int length = PackageConstant.UID_FIELD_LEN + PackageConstant.TOKEN_LEN
|
||||||
|
@ -64,7 +64,7 @@ public class MessageUtil {
|
||||||
int[] secretKey = Tea.KEY;
|
int[] secretKey = Tea.KEY;
|
||||||
byte[] bytes1 = Tea.encrypt2(bytes, secretKey);
|
byte[] bytes1 = Tea.encrypt2(bytes, secretKey);
|
||||||
if (backMessage.length != 0) {
|
if (backMessage.length != 0) {
|
||||||
LOGGER.info("sendbyte"+bytes1.length);
|
LOGGER.info("wrappedBuffer uid=>{} sendbyte=>{}", uid, bytes1.length);
|
||||||
}
|
}
|
||||||
return bytes1;
|
return bytes1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,9 +67,6 @@ public class SExchangeRate implements BaseConfig {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
System.out.println("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -124,9 +124,9 @@ public class NettyTCPClientHandler extends SimpleChannelInboundHandler<Object> {
|
||||||
if(msgId == RECONNECT_RESPONSE_VALUE){
|
if(msgId == RECONNECT_RESPONSE_VALUE){
|
||||||
rec =true;
|
rec =true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
System.out.println("back hartbeat id : "+msgId);
|
|
||||||
|
LOGGER.info("channelRead0 back hartbeat id : {}", msgId);
|
||||||
|
|
||||||
//System.out.println(JsonFormat.printToString());
|
//System.out.println(JsonFormat.printToString());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue