功能礼包 封禁
parent
7d000190d4
commit
e7f5d7dcfd
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.core;
|
|||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.core.function.FunctionContext;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.db.mongo.core.ServerBanPro;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.exception.ErrorUtil;
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
|
@ -23,6 +24,7 @@ import manager.STableManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
|
@ -132,6 +134,14 @@ public class HandlerLogicThread extends Thread{
|
|||
LOGGER.info("request uid=>{} , msgId=>{}, session is null",userId,msgId);
|
||||
return;
|
||||
}
|
||||
//功能协议开关
|
||||
List<ServerBanPro> banProcoId= MongoUtil.getCoreMongoTemplate().findAll(ServerBanPro.class);
|
||||
if(banProcoId !=null && banProcoId.size() > 0 ){
|
||||
if(banProcoId.get(0).getBanProtoId().contains(msgId)){
|
||||
MessageUtil.sendErrorResponse(session,-1,msgId,"funciton not");
|
||||
return;
|
||||
}
|
||||
}
|
||||
session.setLastMsgId(msgId);
|
||||
SimpleTransaction transaction = SimpleTransaction.setTransaction(session);
|
||||
BaseHandler baseHandler = ProtocolsManager.getInstance().getHandler(msgId);
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package com.ljsd.jieling.db.mongo.core;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
import java.util.List;
|
||||
@Document(collection = "server_ban_function")
|
||||
public class ServerBanPro {
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
@Field(value = "banProtoId")
|
||||
private List<Integer> banProtoId ;
|
||||
|
||||
@Field(value = "banGoodList")
|
||||
private List<Integer> banGoodList ;
|
||||
|
||||
public List<Integer> getBanProtoId() {
|
||||
return banProtoId;
|
||||
}
|
||||
|
||||
public void setBanProtoId(List<Integer> banProtoId) {
|
||||
this.banProtoId = banProtoId;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<Integer> getBanGoodList() {
|
||||
return banGoodList;
|
||||
}
|
||||
|
||||
public void setBanGoodList(List<Integer> banGoodList) {
|
||||
this.banGoodList = banGoodList;
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import com.ljsd.GameApplication;
|
|||
import com.ljsd.jieling.config.reportData.DataMessageUtils;
|
||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.db.mongo.core.ServerBanPro;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
|
@ -859,6 +860,15 @@ private static int judgePushCondition(User user,SPackPushConfig con){
|
|||
if(null ==sRechargeCommodityConfig) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
//礼包功能开关
|
||||
List<ServerBanPro> banProcoId= MongoUtil.getCoreMongoTemplate().findAll(ServerBanPro.class);
|
||||
if(banProcoId !=null && banProcoId.size() > 0 ){
|
||||
if(banProcoId.get(0).getBanGoodList().contains(goodsId)){
|
||||
MessageUtil.sendErrorResponse(session,-1,goodsId,"funciton not");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//todo 这里要加购买礼包的校验,然后把发货时的校验删掉
|
||||
String order ;
|
||||
if(sRechargeCommodityConfig.getPrice()==0){
|
||||
|
|
Loading…
Reference in New Issue