绑定user

back_recharge
wangyuan 2019-03-14 14:37:04 +08:00
parent 96abec7248
commit 1262ac5fda
4 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package com.ljsd.jieling.logic.dao;
import com.ljsd.common.mogodb.MongoBase;
import com.ljsd.jieling.logic.dao.root.User;
import java.util.List;
@ -10,9 +11,12 @@ public class AdventureStateInfo extends MongoBase {
private int startTime;
private int hourDuration;
public AdventureStateInfo(){}
public AdventureStateInfo(){
this.setRootCollection(User._COLLECTION_NAME);
}
public AdventureStateInfo(int position,List<String> heroIds, int startTime, int hourDuration) {
this.setRootCollection(User._COLLECTION_NAME);
this.heroIds = heroIds;
this.startTime = startTime;
this.hourDuration = hourDuration;

View File

@ -3,6 +3,7 @@ package com.ljsd.jieling.logic.dao;
import com.ljsd.common.mogodb.MongoBase;
import com.ljsd.jieling.config.*;
import com.ljsd.jieling.core.GlobalsDef;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.util.KeyGenUtils;
import com.ljsd.jieling.util.MathUtils;
import com.ljsd.jieling.util.UUIDEnum;
@ -29,10 +30,11 @@ public class Equip extends MongoBase {
public Equip() {
this.setRootCollection(User._COLLECTION_NAME);
}
public Equip(String uid, int equipTid) {
this.setRootCollection(User._COLLECTION_NAME);
this.id = KeyGenUtils.produceIdByModule(UUIDEnum.EQUIP, uid);
this.equipId = equipTid;
this.propertyValueByIdMap = new HashMap<>();
@ -50,6 +52,7 @@ public class Equip extends MongoBase {
//锻造
public Equip(String uid, int equipTid,int workShopLevle,List<Integer> runneIds) {
this.setRootCollection(User._COLLECTION_NAME);
this.id =KeyGenUtils.produceIdByModule(UUIDEnum.EQUIP,uid);
this.equipId = equipTid;
this.propertyValueByIdMap = new HashMap<>();

View File

@ -18,6 +18,7 @@ public class Item extends MongoBase {
}
public Item(int itemId,int itemNum){
this.setRootCollection(User._COLLECTION_NAME);
this.itemId = itemId;
this.itemNum = itemNum;
this.endingTime = (int)(System.currentTimeMillis()/1000);

View File

@ -20,6 +20,7 @@ public class Pokemon extends MongoBase {
}
public Pokemon(int id){
this.setRootCollection(User._COLLECTION_NAME);
this.id = id;
this.comonpentsLevelMap = new HashMap<>();
}