Merge branch 'master_dev' into master_haizei
commit
0946d5e953
|
@ -9,7 +9,7 @@ import com.ljsd.jieling.hotfix.HotfixUtil;
|
|||
import com.ljsd.jieling.logic.GlobleSystemLogic;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.dao.ServerConfig;
|
||||
import com.ljsd.jieling.logic.rank.CrossRankManager;
|
||||
import com.ljsd.jieling.logic.family.GuildLogic;
|
||||
import com.ljsd.jieling.network.NetManager;
|
||||
import com.ljsd.jieling.util.ConfigurableApplicationContextManager;
|
||||
import config.SGameSetting;
|
||||
|
@ -60,7 +60,7 @@ public class GameApplication {
|
|||
SkyEyeService.getInstance().onStart();
|
||||
CrossServiceLogic.serverInit();
|
||||
GlobleSystemLogic.getInstence().getCrossGroup();
|
||||
CrossRankManager.getInstance().guildCacheHandle();
|
||||
GuildLogic.getInstance().guildCacheHandle();
|
||||
HotfixUtil.getInstance();
|
||||
//控制台gm
|
||||
Scanner sc = new Scanner(System.in);
|
||||
|
|
|
@ -163,7 +163,7 @@ public class ChatLogic {
|
|||
case 1:
|
||||
//0|content需要解字符串
|
||||
String s = message;
|
||||
String[] strs = message.split("|",3);
|
||||
String[] strs = message.split("//|",3);
|
||||
if(strs.length==3){
|
||||
s = strs[2];
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class GuilidManager {
|
|||
public static GuildInfo getGuildInfoByName(String guildName){
|
||||
Map<String, GuildInfo> guildInfoMap = RedisUtil.getInstence().getmapvaluekeyclass(getFamilyKey(), String.class, GuildInfo.class);
|
||||
for (GuildInfo value : guildInfoMap.values()) {
|
||||
if (value.getName().equals(guildName) && value.getServerId() == GameApplication.serverId){
|
||||
if (value.getName().equals(guildName)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ public class GuildFightLogic {
|
|||
public static void quickSetDefend(ISession session, int buildId, int uid, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
User user = UserManager.getUser(uid);
|
||||
TeamPosManager teamPosManager = user.getTeamPosManager();
|
||||
if (teamPosManager.getTeamPosForHero().get(501) == null || teamPosManager.getTeamPosForHero().get(501).size() < 1) {
|
||||
if (teamPosManager.getTeamPosForHero().get(501) == null || teamPosManager.getTeamPosForHero().get(501).isEmpty()) {
|
||||
teamPosManager.updateTeamPosByTeamId(501, teamPosManager.getTeamPosForHero().get(1));
|
||||
}
|
||||
if (buildId == 0) {
|
||||
|
@ -976,7 +976,7 @@ public class GuildFightLogic {
|
|||
if(status==0){
|
||||
LOGGER.info("阶段变为布防");
|
||||
Map<Integer, GuildInfo> guildInfoMap = GuilidManager.getAllGuildInfos();
|
||||
if(guildInfoMap.size()>0){
|
||||
if(!guildInfoMap.isEmpty()){
|
||||
for(Map.Entry<Integer, GuildInfo> entry:guildInfoMap.entrySet()){
|
||||
int build = 0;
|
||||
Map<Integer, Set<Integer>> members = entry.getValue().getMembers();
|
||||
|
|
|
@ -50,6 +50,7 @@ import config.*;
|
|||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.Family;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
@ -61,7 +62,7 @@ import java.util.*;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
public class GuildLogic {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GuildLogic.class);
|
||||
static GuildLogic guildLogicInstance = new GuildLogic();
|
||||
public static GuildLogic getInstance(){
|
||||
return guildLogicInstance;
|
||||
|
@ -126,8 +127,6 @@ public class GuildLogic {
|
|||
MailLogic.getInstance().sendMail(user.getId(), title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
}
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GuildLogic.class);
|
||||
|
||||
public static int getMemberType(int targetUid, Map<Integer, Set<Integer>> members ){
|
||||
for(Map.Entry<Integer,Set<Integer>> memberEntry : members.entrySet()){
|
||||
Integer position = memberEntry.getKey();
|
||||
|
@ -1727,4 +1726,25 @@ public class GuildLogic {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工会缓存处理
|
||||
*/
|
||||
public void guildCacheHandle(){
|
||||
int serverId = GameApplication.serverId;
|
||||
MongoTemplate mongoTemplate = MongoUtil.getInstence().getMonogTemplate(serverId);
|
||||
List<GuildInfo> all = mongoTemplate.findAll(GuildInfo.class);
|
||||
if (all == null || all.isEmpty()){
|
||||
return;
|
||||
}
|
||||
for (GuildInfo info : all) {
|
||||
if (info.getServerId() == serverId){
|
||||
continue;
|
||||
}
|
||||
info.setServerId(serverId);
|
||||
GuilidManager.saveOrUpdateGuildInfo(info);
|
||||
LOGGER.info("================合服后处理公会区服id, guildid:{}, guildname:{}", info.getId(), info.getName());
|
||||
}
|
||||
LOGGER.info("================工会缓存处理完成=============");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -93,13 +93,4 @@ public class CrossRankManager {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工会缓存处理
|
||||
*/
|
||||
public void guildCacheHandle(){
|
||||
// Map<String, GuildInfo> mapValues = RedisUtil.getInstence().getMapValues(RedisKey.FAMILY_INFO, "", String.class, GuildInfo.class);
|
||||
|
||||
LOGGER.info("==================工会缓存处理=============");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,12 +23,11 @@ public class ShieldedWordUtils {
|
|||
result = validateUserName(name);
|
||||
}
|
||||
// 校验违禁字符
|
||||
if (result == true){
|
||||
if (result){
|
||||
try {
|
||||
result = !SensitivewordFilter.isContaintSensitiveWord(name,1);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("检查名称,报错:"+e.getMessage());
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue