邮件定时发送,37上报控制

back_recharge
lvxinran 2019-08-21 14:45:38 +08:00
parent f0443e1a21
commit 58d3b86212
3 changed files with 12 additions and 6 deletions

View File

@ -3,6 +3,7 @@ package com.ljsd.jieling.dataReport.reportBeans_37;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ljsd.GameApplication; import com.ljsd.GameApplication;
import com.ljsd.jieling.config.json.SDK37Constans; 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.config.reportData.DataMessageUtils;
import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.util.MD5Util; import com.ljsd.jieling.util.MD5Util;
@ -76,6 +77,10 @@ public class Repot37EventUtil {
public static boolean Report37Chat(User user,Object... parm){ public static boolean Report37Chat(User user,Object... parm){
ServerProperties serverProperties = GameApplication.serverProperties;
if(!serverProperties.isSendlog37()){
return true;
}
final ExecutorService exec = Executors.newFixedThreadPool(1); final ExecutorService exec = Executors.newFixedThreadPool(1);
Callable<Report37Response> call = new Callable<Report37Response>() { Callable<Report37Response> call = new Callable<Report37Response>() {
@Override @Override

View File

@ -335,9 +335,6 @@ public class GuildFightLogic {
/** /**
* *
*
* @param userAttack
* @param userDefend
*/ */
public static void familyFightResult(ISession session, int defendUid, MessageTypeProto.MessageType messageType) throws Exception { public static void familyFightResult(ISession session, int defendUid, MessageTypeProto.MessageType messageType) throws Exception {
User userAttack = UserManager.getUser(session.getUid()); 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) { } else if (hour > FamilyRound.FAMILY_FIGHT_END || hour < FamilyRound.FAMILY_FIGHT_START) {
status = 0; status = 0;
removeMatchingInfo(); removeMatchingInfo();
startMatching = true;
} }
} }
@ -572,7 +570,7 @@ public class GuildFightLogic {
// redisUtil.removeZSetRangeByRank(matchingKey,0,redisUtil.getZsetSize(matchingKey)); // redisUtil.removeZSetRangeByRank(matchingKey,0,redisUtil.getZsetSize(matchingKey));
} }
/** /**
* * (Redismongo)
*/ */
public void accountFamilyFightResult() { public void accountFamilyFightResult() {
RedisUtil redisUtil = RedisUtil.getInstence(); RedisUtil redisUtil = RedisUtil.getInstence();

View File

@ -272,13 +272,16 @@ public class MailLogic {
* *
*/ */
public void checkReadyToMail() throws Exception { 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){ if (mails.size()<0){
return; return;
} }
for(Map.Entry<String, MailCache> mail:mails.entrySet()){ 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); 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();
} }
} }