邮件定时发送,37上报控制
parent
f0443e1a21
commit
58d3b86212
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.dataReport.reportBeans_37;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.config.json.SDK37Constans;
|
||||
import com.ljsd.jieling.config.json.ServerProperties;
|
||||
import com.ljsd.jieling.config.reportData.DataMessageUtils;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.util.MD5Util;
|
||||
|
@ -76,6 +77,10 @@ public class Repot37EventUtil {
|
|||
|
||||
|
||||
public static boolean Report37Chat(User user,Object... parm){
|
||||
ServerProperties serverProperties = GameApplication.serverProperties;
|
||||
if(!serverProperties.isSendlog37()){
|
||||
return true;
|
||||
}
|
||||
final ExecutorService exec = Executors.newFixedThreadPool(1);
|
||||
Callable<Report37Response> call = new Callable<Report37Response>() {
|
||||
@Override
|
||||
|
|
|
@ -335,9 +335,6 @@ public class GuildFightLogic {
|
|||
|
||||
/**
|
||||
* 战斗之后数据更新
|
||||
*
|
||||
* @param userAttack
|
||||
* @param userDefend
|
||||
*/
|
||||
public static void familyFightResult(ISession session, int defendUid, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User userAttack = UserManager.getUser(session.getUid());
|
||||
|
@ -531,6 +528,7 @@ public class GuildFightLogic {
|
|||
} else if (hour > FamilyRound.FAMILY_FIGHT_END || hour < FamilyRound.FAMILY_FIGHT_START) {
|
||||
status = 0;
|
||||
removeMatchingInfo();
|
||||
startMatching = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,7 +570,7 @@ public class GuildFightLogic {
|
|||
// redisUtil.removeZSetRangeByRank(matchingKey,0,redisUtil.getZsetSize(matchingKey));
|
||||
}
|
||||
/**
|
||||
* 公会战结算
|
||||
* 公会战结算(Redis中数据同到mongo)
|
||||
*/
|
||||
public void accountFamilyFightResult() {
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
|
|
|
@ -272,13 +272,16 @@ public class MailLogic {
|
|||
*每分钟检测是否有需要发的邮件
|
||||
*/
|
||||
public void checkReadyToMail() throws Exception {
|
||||
Map<String, MailCache> mails = RedisUtil.getInstence().getMapValues(RedisKey.READY_TO_USER_MAIL, "", String.class, MailCache.class);
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
Map<String, MailCache> mails =redisUtil.getMapValues(RedisKey.READY_TO_USER_MAIL, "", String.class, MailCache.class);
|
||||
if (mails.size()<0){
|
||||
return;
|
||||
}
|
||||
for(Map.Entry<String, MailCache> mail:mails.entrySet()){
|
||||
sendMail(Integer.parseInt(mail.getKey()),mail.getValue().getTitle(),mail.getValue().getContent(),mail.getValue().getReward(),mail.getValue().getTime(),0);
|
||||
}
|
||||
|
||||
redisUtil.del(RedisKey.getKey(RedisKey.READY_TO_USER_MAIL,"",false));
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue