存储结构改变
parent
b9d44ccd3e
commit
c477f8a529
|
@ -128,6 +128,14 @@ public class LjsdMongoTemplate implements MongoUpdateImp {
|
|||
}
|
||||
return otherMonogTemplate.findById(id,clazz,collectionName);
|
||||
}
|
||||
public <T> T findByIdMy(String collectionName, String id, Class<T> clazz) throws Exception {
|
||||
//int serverIdByUid = AreaManager.getInstance().getServerIdByUid(Integer.parseInt(id), GameApplication.serverId);
|
||||
MongoTemplate otherMonogTemplate = getMongoTemplate(GameApplication.serverId);
|
||||
if(otherMonogTemplate==null){
|
||||
return null;
|
||||
}
|
||||
return otherMonogTemplate.findById(id,clazz,collectionName);
|
||||
}
|
||||
|
||||
|
||||
public <T> T findById(String collectionName, int id, Class<T> clazz) throws Exception {
|
||||
|
|
|
@ -166,9 +166,14 @@ public class StartHardStageRequestHandler extends BaseHandler<PlayerInfoProto.Ha
|
|||
Criteria.where("id").is("2_"+ nodeId)
|
||||
);
|
||||
Query query2 = new Query(criteria2);*/
|
||||
/*ArenaRecord minForceRecord = RedisUtil.getInstence().get(RedisKey.HARD_STAGE_PASS_MIN_FORCE,String.valueOf(nodeId),ArenaRecord.class);
|
||||
if(force< minForceRecord.getAttackForce()){
|
||||
|
||||
}*/
|
||||
|
||||
LjsdMongoTemplate ljsdMongoTemplate = MongoUtil.getLjsdMongoTemplate();
|
||||
com.ljsd.jieling.logic.dao.root.ArenaRecord firstPassRecord = ljsdMongoTemplate.findById(com.ljsd.jieling.logic.dao.root.ArenaRecord._COLLECTION_NAME,"1_"+nodeId, com.ljsd.jieling.logic.dao.root.ArenaRecord.class);
|
||||
com.ljsd.jieling.logic.dao.root.ArenaRecord minForcePassRecordList = ljsdMongoTemplate.findById(com.ljsd.jieling.logic.dao.root.ArenaRecord._COLLECTION_NAME,"2_"+nodeId, com.ljsd.jieling.logic.dao.root.ArenaRecord.class);
|
||||
com.ljsd.jieling.logic.dao.root.ArenaRecord firstPassRecord = ljsdMongoTemplate.findByIdMy(com.ljsd.jieling.logic.dao.root.ArenaRecord._COLLECTION_NAME,"1_"+nodeId, com.ljsd.jieling.logic.dao.root.ArenaRecord.class);
|
||||
com.ljsd.jieling.logic.dao.root.ArenaRecord minForcePassRecordList = ljsdMongoTemplate.findByIdMy(com.ljsd.jieling.logic.dao.root.ArenaRecord._COLLECTION_NAME,"2_"+nodeId, com.ljsd.jieling.logic.dao.root.ArenaRecord.class);
|
||||
if(firstPassRecord == null ){
|
||||
com.ljsd.jieling.logic.dao.root.ArenaRecord arenaRecord = new com.ljsd.jieling.logic.dao.root.ArenaRecord();
|
||||
arenaRecord.setId("1_"+ nodeId);
|
||||
|
|
Loading…
Reference in New Issue