Merge branch 'master_test_gn_zf' into master_test_gn
commit
7cdd1afd84
|
@ -14,6 +14,7 @@ import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||||
import com.ljsd.jieling.logic.activity.event.NewWelfareEvent;
|
import com.ljsd.jieling.logic.activity.event.NewWelfareEvent;
|
||||||
import com.ljsd.jieling.logic.activity.event.NewWelfareTypeEnum;
|
import com.ljsd.jieling.logic.activity.event.NewWelfareTypeEnum;
|
||||||
import com.ljsd.jieling.logic.activity.event.Poster;
|
import com.ljsd.jieling.logic.activity.event.Poster;
|
||||||
|
import com.ljsd.jieling.logic.activity.event.SuperBoxEvent;
|
||||||
import com.ljsd.jieling.logic.dao.*;
|
import com.ljsd.jieling.logic.dao.*;
|
||||||
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
import com.ljsd.jieling.logic.dao.root.GlobalSystemControl;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
@ -221,6 +222,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
|
||||||
ReportUtil.onReportEvent(user, ReportEventEnum.APP_LOGIN.getType());
|
ReportUtil.onReportEvent(user, ReportEventEnum.APP_LOGIN.getType());
|
||||||
try {
|
try {
|
||||||
//hotfix
|
//hotfix
|
||||||
|
Poster.getPoster().dispatchEvent(new SuperBoxEvent(user.getId(),-1));
|
||||||
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,0,user);
|
user.getUserMissionManager().onGameEvent(user,GameEvent.DAILY_TASK_TYPE,0,user);
|
||||||
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.WorldLevelIndication_VALUE, PlayerInfoProto.WorldLevelIndication.newBuilder().setWorldLeve(GlobleSystemLogic.getGloableWorldLeveCache()).build(), true);
|
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.WorldLevelIndication_VALUE, PlayerInfoProto.WorldLevelIndication.newBuilder().setWorldLeve(GlobleSystemLogic.getGloableWorldLeveCache()).build(), true);
|
||||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_PLAYERINFO_RESPONSE_VALUE, getPlayerInfoResponse, true);
|
||||||
|
|
|
@ -84,7 +84,11 @@ public class SuperBoxActivity extends AbstractActivity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Integer, ActivityProgressInfo> missionMap = user.getActivityManager().getActivityMissionMap().get(id).getActivityMissionMap();
|
ActivityMission mission = user.getActivityManager().getActivityMissionMap().get(id);
|
||||||
|
if (mission == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Map<Integer, ActivityProgressInfo> missionMap = mission.getActivityMissionMap();
|
||||||
Collection<SSurpriseBox> boxes = SSurpriseBox.map.getOrDefault(id, new HashMap<>(0)).values();
|
Collection<SSurpriseBox> boxes = SSurpriseBox.map.getOrDefault(id, new HashMap<>(0)).values();
|
||||||
|
|
||||||
for (SSurpriseBox box : boxes) {
|
for (SSurpriseBox box : boxes) {
|
||||||
|
@ -161,8 +165,11 @@ public class SuperBoxActivity extends AbstractActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
v.setProgrss(progrss);
|
v.setProgrss(progrss);
|
||||||
|
mission.getActivityMissionMap().put(k,v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOGGER.info("========================惊喜礼盒状态刷新,uid={}",user.getId());
|
||||||
|
|
||||||
// 客户端推送
|
// 客户端推送
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
sendActivityProgress(session, mission, null);
|
sendActivityProgress(session, mission, null);
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class ThreadManager implements IManager {
|
||||||
private static MongoDataHandlerTask mongoDataHandlerTask;
|
private static MongoDataHandlerTask mongoDataHandlerTask;
|
||||||
private static ItemLogTask itemLogTask;
|
private static ItemLogTask itemLogTask;
|
||||||
public static int SLEEP_INTEVAL_TIME = 60; //每1分钟检查一次
|
public static int SLEEP_INTEVAL_TIME = 60; //每1分钟检查一次
|
||||||
private static OnlineUserTapTask onlineUserTapTask;//5分钟上报一次
|
//private static OnlineUserTapTask onlineUserTapTask;//5分钟上报一次
|
||||||
|
|
||||||
private static Set<Future<?>> scheduledFutureSets = new HashSet<>();
|
private static Set<Future<?>> scheduledFutureSets = new HashSet<>();
|
||||||
|
|
||||||
|
@ -42,13 +42,13 @@ public class ThreadManager implements IManager {
|
||||||
mongoDataHandlerTask = ConfigurableApplicationContextManager.getBean(MongoDataHandlerTask.class);
|
mongoDataHandlerTask = ConfigurableApplicationContextManager.getBean(MongoDataHandlerTask.class);
|
||||||
dataReportTask = ConfigurableApplicationContextManager.getBean(DataReportTask.class);
|
dataReportTask = ConfigurableApplicationContextManager.getBean(DataReportTask.class);
|
||||||
itemLogTask = ConfigurableApplicationContextManager.getBean(ItemLogTask.class);
|
itemLogTask = ConfigurableApplicationContextManager.getBean(ItemLogTask.class);
|
||||||
onlineUserTapTask = ConfigurableApplicationContextManager.getBean(OnlineUserTapTask.class);
|
//onlineUserTapTask = ConfigurableApplicationContextManager.getBean(OnlineUserTapTask.class);
|
||||||
|
|
||||||
new RetrySendIndicationThread("retry-indi").start();
|
new RetrySendIndicationThread("retry-indi").start();
|
||||||
mongoDataHandlerTask.start();
|
mongoDataHandlerTask.start();
|
||||||
dataReportTask.start();
|
dataReportTask.start();
|
||||||
itemLogTask.start();
|
itemLogTask.start();
|
||||||
onlineUserTapTask.start();
|
//onlineUserTapTask.start();
|
||||||
|
|
||||||
scheduledExecutor = new ScheduledThreadPoolExecutor(8, new ScheduleThreadFactory());
|
scheduledExecutor = new ScheduledThreadPoolExecutor(8, new ScheduleThreadFactory());
|
||||||
scheduledExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
|
scheduledExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
package com.ljsd.jieling.thread.task;
|
package com.ljsd.jieling.thread.task;
|
||||||
|
|
||||||
import com.ljsd.GameApplication;
|
import com.ljsd.GameApplication;
|
||||||
|
import com.ljsd.jieling.config.reportData.DataMessageUtils;
|
||||||
|
import com.ljsd.jieling.ktbeans.OnlineProp;
|
||||||
|
import com.ljsd.jieling.ktbeans.OnlineUserCalEvent;
|
||||||
import com.ljsd.jieling.ktbeans.ReportUtil;
|
import com.ljsd.jieling.ktbeans.ReportUtil;
|
||||||
import com.ljsd.jieling.ktbeans.sendbeans.ReportServerEvent;
|
import com.ljsd.jieling.ktbeans.sendbeans.ReportServerEvent;
|
||||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||||
|
@ -8,7 +11,7 @@ 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.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import util.TimeUtils;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -30,6 +33,16 @@ public class OnlineUserReportTask extends Thread {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try{
|
try{
|
||||||
|
//5分钟上报一次
|
||||||
|
if(TimeUtils.getMiunte()%5 == 0){
|
||||||
|
int serverId = GameApplication.serverId;
|
||||||
|
Set<Integer> uids = OnlineUserManager.sessionMap.keySet();
|
||||||
|
OnlineUserCalEvent onlineUserCalEvent = new OnlineUserCalEvent();
|
||||||
|
onlineUserCalEvent.setAppid(GameApplication.serverProperties.getAppId()==null?"APPID":GameApplication.serverProperties.getAppId());
|
||||||
|
onlineUserCalEvent.setOnlines(new OnlineProp[]{new OnlineProp(String.valueOf(serverId),uids.size(), TimeUtils.now()/1000)});
|
||||||
|
DataMessageUtils.sendOnlinePost(onlineUserCalEvent);
|
||||||
|
}
|
||||||
|
|
||||||
Set<Integer> uids = OnlineUserManager.sessionMap.keySet();
|
Set<Integer> uids = OnlineUserManager.sessionMap.keySet();
|
||||||
Map<String,Integer> channelMap = new HashMap<>();
|
Map<String,Integer> channelMap = new HashMap<>();
|
||||||
for(int uid:uids){
|
for(int uid:uids){
|
||||||
|
|
|
@ -497,6 +497,7 @@ public class MessageUtil {
|
||||||
if(url == null){
|
if(url == null){
|
||||||
return v3;
|
return v3;
|
||||||
}
|
}
|
||||||
|
LOGGER.info("天眼封禁userId:{},zonId:{},content:{},URL:{}",me.getId(),String.valueOf(GameApplication.serverId),msg,url);
|
||||||
skyEyeExtraMap.put("url",url);
|
skyEyeExtraMap.put("url",url);
|
||||||
v3.setExtra(JSON.toJSONString(skyEyeExtraMap));
|
v3.setExtra(JSON.toJSONString(skyEyeExtraMap));
|
||||||
return v3;
|
return v3;
|
||||||
|
|
Loading…
Reference in New Issue