Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn
commit
b3df483ef8
|
@ -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 {
|
||||
|
|
|
@ -157,18 +157,15 @@ public class StartHardStageRequestHandler extends BaseHandler<PlayerInfoProto.Ha
|
|||
//战斗回放
|
||||
int force = HeroLogic.getInstance().calTeamTotalForce(user, teamId, false);
|
||||
// 首次通关记录
|
||||
/* Criteria criteria = new Criteria().andOperator(
|
||||
Criteria.where("id").is("1_"+nodeId)
|
||||
);
|
||||
Query query = new Query(criteria);
|
||||
|
||||
Criteria criteria2 = new Criteria().andOperator(
|
||||
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(minForceRecord!=null){
|
||||
if(force< minForceRecord.getAttackForce()){
|
||||
RedisUtil.getInstence().remove(RedisUtil.getInstence().getKey(RedisKey.HARD_STAGE_PASS_MIN_FORCE,String.valueOf(nodeId),true));
|
||||
}
|
||||
}
|
||||
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