back_recharge
parent
39a340d99a
commit
87c2649232
|
@ -2,6 +2,7 @@ package com.ljsd.common.mogodb;
|
|||
|
||||
import com.mongodb.*;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Field;
|
||||
|
@ -37,6 +38,10 @@ public class LjsdMongoTemplate {
|
|||
return mongoTemplate.findAll(clazz,collectionName);
|
||||
}
|
||||
|
||||
public <T> List<T> findAllByCondition(Query query, Class<T> entityClass) throws Exception {
|
||||
return mongoTemplate.find(query, entityClass);
|
||||
}
|
||||
|
||||
public <T> T findById(String collectionName, String id, Class<T> clazz) throws Exception {
|
||||
return mongoTemplate.findById(id,clazz,collectionName);
|
||||
/* DBCollection coll = mongoTemplate.getCollection(collectionName);
|
||||
|
|
|
@ -11,6 +11,8 @@ import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
|||
import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
package com.ljsd.jieling.chat.messge;
|
||||
|
||||
import com.ljsd.jieling.protocols.ChatProto;
|
||||
|
||||
public class ChatWorldMessage {
|
||||
private long messsageId;
|
||||
private ChatProto.ChatInfo msg;
|
||||
|
||||
public ChatWorldMessage(long messsageId, ChatProto.ChatInfo msg) {
|
||||
this.messsageId = messsageId;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public long getMesssageId() {
|
||||
return messsageId;
|
||||
}
|
||||
|
||||
public void setMesssageId(long messsageId) {
|
||||
this.messsageId = messsageId;
|
||||
}
|
||||
|
||||
public ChatProto.ChatInfo getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(ChatProto.ChatInfo msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
|
@ -4,13 +4,11 @@ import com.ljsd.GameApplication;
|
|||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.protocols.ChatProto;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class MessageCache {
|
||||
private static final int capuatiy =200;
|
||||
private static final int capuatiy =20;
|
||||
private static final int msgInterval = 24*3600*1000;
|
||||
private static final int perCaught= 50;
|
||||
private static final int perCaught= 20;
|
||||
|
||||
public static LoopQueue worldMsg = new LoopQueue(capuatiy,perCaught,msgInterval);
|
||||
public static LoopQueue sysMsg = new LoopQueue(capuatiy,perCaught,msgInterval);
|
||||
|
|
|
@ -35,4 +35,6 @@ public class MongoKey {
|
|||
public final static String storeManager = "storeManager";
|
||||
|
||||
public final static String userMissionManager = "userMissionManager";
|
||||
|
||||
public final static String friendManager = "friendManager";
|
||||
}
|
||||
|
|
|
@ -2,14 +2,32 @@ package com.ljsd.jieling.db.mongo;
|
|||
|
||||
import com.google.gson.Gson;
|
||||
import com.ljsd.common.mogodb.LjsdMongoTemplate;
|
||||
import com.ljsd.common.mogodb.test.pojo.PlayerForTest;
|
||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.mongodb.DBObject;
|
||||
import com.mongodb.MongoClientURI;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Field;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class MongoUtil {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MongoUtil.class);
|
||||
|
||||
private static final long BEFOR_3_DAY = 1000 * 60 * 60 * 24 * 3; //3天前的时间
|
||||
private Gson gson = new Gson();
|
||||
|
||||
private static int MAX_TRY_TIMES = 3; //最大尝试次数,保障获取/存储成功
|
||||
|
@ -41,4 +59,58 @@ public class MongoUtil {
|
|||
this.myMongoTemplate.lastUpdate();
|
||||
}
|
||||
|
||||
public static LjsdMongoTemplate getLjsdMongoTemplate() throws UnknownHostException {
|
||||
SimpleMongoDbFactory simpleMongoDbFactory = new SimpleMongoDbFactory(new MongoClientURI("mongodb://60.1.1.14:27017/jieling_10212"));
|
||||
DefaultDbRefResolver dbRefResolver = new DefaultDbRefResolver(simpleMongoDbFactory);
|
||||
MappingMongoConverter converter = new MappingMongoConverter(dbRefResolver, new MongoMappingContext());
|
||||
converter.setTypeMapper(new DefaultMongoTypeMapper(null));
|
||||
// MongoTemplate mongoTemplate = new MongoTemplate(simpleMongoDbFactory, converter);
|
||||
/* MappingMongoConverter mongoMapping = (MappingMongoConverter) mongoTemplate.getConverter();
|
||||
mongoMapping.setCustomConversions(customConversions()); // tell mongodb to use the custom converters
|
||||
mongoMapping.afterPropertiesSet();*/
|
||||
return new LjsdMongoTemplate(new MongoTemplate(simpleMongoDbFactory, converter));
|
||||
}
|
||||
public List<User> getRandomUsers(int size, int uid, int level) throws Exception {
|
||||
Criteria criatira = new Criteria();
|
||||
Random random = new Random();
|
||||
int minLevel = random.nextInt(level) - 10;
|
||||
minLevel = minLevel <= 5 ? 5 : minLevel;
|
||||
int maxLevel = random.nextInt(level) + 10;
|
||||
long befor3Day = System.currentTimeMillis() - BEFOR_3_DAY;
|
||||
|
||||
criatira.andOperator(Criteria.where("id").nin(uid),
|
||||
Criteria.where("level").gte(minLevel), Criteria.where("level").lte(maxLevel),
|
||||
Criteria.where("lastLoginTime").gte(befor3Day));//不包含自己
|
||||
Query query = new Query(criatira).limit(size);
|
||||
query.fields().include("playerManager");
|
||||
return this.myMongoTemplate.findAllByCondition(query, User.class) ;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
LjsdMongoTemplate ljsdMongoTemplate = getLjsdMongoTemplate();
|
||||
Criteria criatira = new Criteria();
|
||||
Random random = new Random();
|
||||
int minLevel = random.nextInt(10) - 5;
|
||||
minLevel = minLevel <= 5 ? 5 : minLevel;
|
||||
int maxLevel = random.nextInt(10) + 20;
|
||||
long befor3Day = 1558332518379l - 3;
|
||||
// criatira.andOperator(Criteria.where("id").nin(10003770),
|
||||
// Criteria.where("level").gte(minLevel), Criteria.where("level").lte(maxLevel),
|
||||
// Criteria.where("lastLoginTime").gte(befor3Day));//不包含自己
|
||||
// Criteria.where("level").is(1);
|
||||
Query query = new Query(criatira).limit(100);
|
||||
query.fields().include("playerManager");
|
||||
long startTime = System.currentTimeMillis();
|
||||
List<User> allByCondition = ljsdMongoTemplate.findAllByCondition(query, User.class);
|
||||
System.out.println((System.currentTimeMillis() - startTime));
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package com.ljsd.jieling.handler.friend;
|
||||
|
||||
import com.ljsd.jieling.handler.BaseHandler;
|
||||
import com.ljsd.jieling.logic.arena.ArenaLogic;
|
||||
import com.ljsd.jieling.logic.friend.FriendLogic;
|
||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.ArenaInfoProto;
|
||||
import com.ljsd.jieling.protocols.ChatProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
@Component
|
||||
public class getFriendInfoHandler extends BaseHandler {
|
||||
@Override
|
||||
public MessageTypeProto.MessageType getMessageCode() {
|
||||
return MessageTypeProto.MessageType.GET_FRIEND_INFO_REQUEST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||
PlayerInfoProto.GetFriendInfoRequest getFriendInfoRequest = PlayerInfoProto.GetFriendInfoRequest.parseFrom(netData.parseClientProtoNetData());
|
||||
int type = getFriendInfoRequest.getType();
|
||||
switch (type) {
|
||||
case 1: //好友列表
|
||||
FriendLogic.getInstance().getFriendInfos(iSession);
|
||||
break;
|
||||
case 2: //推荐列表
|
||||
FriendLogic.getInstance().getRecommendFriends(iSession);
|
||||
break;
|
||||
case 3: //申请列表
|
||||
FriendLogic.getInstance().getApplyFriends(iSession);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,9 +4,12 @@ import com.google.common.collect.Sets;
|
|||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
public class OnlineUserManager {
|
||||
|
||||
|
@ -20,6 +23,16 @@ public class OnlineUserManager {
|
|||
sessionMap.put(uid, session);
|
||||
}
|
||||
|
||||
public static Object[] getSessionList() {
|
||||
List<Integer> onlineList = new CopyOnWriteArrayList<>();
|
||||
for (Map.Entry<Integer, ISession> entry :sessionMap.entrySet()){
|
||||
Integer uid = entry.getKey();
|
||||
onlineList.add(uid);
|
||||
}
|
||||
Object[] objects = onlineList.toArray();
|
||||
return objects;
|
||||
}
|
||||
|
||||
public static void userOffline(int uid) {
|
||||
sessionMap.remove(uid);
|
||||
orderAdventureUids.remove(uid);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FriendManager extends MongoBase {
|
||||
private int uid;
|
||||
|
||||
private List<Integer> friends;
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public List<Integer> getFriends() {
|
||||
return friends;
|
||||
}
|
||||
|
||||
public void setFriends(List<Integer> friends) {
|
||||
updateString("friends", friends);
|
||||
this.friends = friends;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
public class RecommendFriend {
|
||||
public int id; // 好友的id
|
||||
public String name; // 名字
|
||||
public int lv; // 等级
|
||||
public int onLineTime;
|
||||
}
|
|
@ -43,6 +43,7 @@ public class User {
|
|||
private StoreManager storeManager;
|
||||
|
||||
private UserMissionManager userMissionManager;
|
||||
private FriendManager friendManager;
|
||||
|
||||
//构造函数必须要声明,否则从mongodb读出来反编译成类不通过
|
||||
public User(){
|
||||
|
@ -66,6 +67,7 @@ public class User {
|
|||
this.secretBoxManager = new SecretBoxManager();
|
||||
this.storeManager = new StoreManager();
|
||||
this.userMissionManager = new UserMissionManager();
|
||||
this.friendManager = new FriendManager();
|
||||
|
||||
//綁定关系
|
||||
this.playerManager.init(id, MongoKey.playerManager);
|
||||
|
@ -84,6 +86,7 @@ public class User {
|
|||
this.secretBoxManager.init(id, MongoKey.secretBoxManager);
|
||||
this.storeManager.init(id,MongoKey.storeManager);
|
||||
this.userMissionManager.init(id,MongoKey.userMissionManager);
|
||||
this.friendManager.init(id,MongoKey.friendManager);
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
@ -189,4 +192,8 @@ public class User {
|
|||
public UserMissionManager getUserMissionManager() {
|
||||
return userMissionManager;
|
||||
}
|
||||
|
||||
public FriendManager getFriendManager() {
|
||||
return friendManager;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
package com.ljsd.jieling.logic.friend;
|
||||
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.FriendManager;
|
||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
||||
import com.ljsd.jieling.logic.dao.RecommendFriend;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.ChatProto;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
import com.ljsd.jieling.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.protocols.PlayerInfoProto;
|
||||
import com.ljsd.jieling.util.CBean2Proto;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
public class FriendLogic {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(FriendLogic.class);
|
||||
|
||||
private FriendLogic(){}
|
||||
|
||||
public static class Instance {
|
||||
public final static FriendLogic instance = new FriendLogic();
|
||||
}
|
||||
|
||||
public static FriendLogic getInstance() {
|
||||
return FriendLogic.Instance.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取好友信息
|
||||
*/
|
||||
public void getFriendInfos(ISession iSession) throws Exception {
|
||||
int uid = iSession.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
FriendManager friendManager = user.getFriendManager();
|
||||
List<Integer> friends = friendManager.getFriends();
|
||||
List<CommonProto.Friend> friendList = new CopyOnWriteArrayList<>();
|
||||
for (Integer friendId :friends){
|
||||
CommonProto.Friend friend = CBean2Proto.getFriendInfo(friendId);
|
||||
friendList.add(friend);
|
||||
}
|
||||
PlayerInfoProto.GetFriendInfoResponse getFriendInfoResponse = PlayerInfoProto.GetFriendInfoResponse
|
||||
.newBuilder().addAllFriends(friendList)
|
||||
.build();
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.GET_FRIEND_INFO_REPONSE_VALUE, getFriendInfoResponse, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取推荐列表
|
||||
* @param iSession
|
||||
* @throws Exception
|
||||
*/
|
||||
public void getRecommendFriends(ISession iSession) throws Exception {
|
||||
int uid = iSession.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
FriendManager friendManager = user.getFriendManager();
|
||||
int selectSize = 10;
|
||||
Set<Integer> recommondIds = new HashSet<>();
|
||||
List<RecommendFriend> friends = new CopyOnWriteArrayList<>();
|
||||
long now = System.currentTimeMillis();
|
||||
List<User> cUsers = MongoUtil.getInstence().getRandomUsers(selectSize, uid, playerInfoManager.getLevel());
|
||||
if (cUsers != null){
|
||||
for (User cUser1 : cUsers) {
|
||||
int recommandId = Integer.parseInt(cUser1.getId());
|
||||
PlayerManager playerInfoManager1 = cUser1.getPlayerInfoManager();
|
||||
if (!checkIsAllowRecommandFriend(friendManager,playerInfoManager1, recommandId,recommondIds)){
|
||||
continue;
|
||||
}
|
||||
int beforLoginTime = (int) ((now - playerInfoManager1.getOffLineTime()) / 1000);
|
||||
if (!addRecommondFriend(friends, cUser1, Math.abs(beforLoginTime))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean addRecommondFriend(List<RecommendFriend> friends, User cUser, int onLineTime) {
|
||||
PlayerManager playerInfoManager = cUser.getPlayerInfoManager();
|
||||
if (playerInfoManager == null){
|
||||
return false;
|
||||
}
|
||||
RecommendFriend friend = new RecommendFriend();
|
||||
friend.id = Integer.parseInt(cUser.getId());
|
||||
friend.lv =playerInfoManager.getLevel();
|
||||
friend.name= playerInfoManager.getNickName();
|
||||
friend.onLineTime = onLineTime;
|
||||
friends.add(friend);
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean checkIsAllowRecommandFriend(FriendManager friendManager, PlayerManager playerInfoManager1,int commandUserId,Set<Integer> recommondIds ) {
|
||||
List<Integer> friends = friendManager.getFriends();
|
||||
if (friends.contains(commandUserId)){
|
||||
return false;
|
||||
}
|
||||
if (recommondIds.contains(commandUserId)){
|
||||
return false;
|
||||
}
|
||||
// todo 走配置
|
||||
int maxSize = 200;
|
||||
if (friends.size() >= maxSize) { //用户已达上限不推荐好友信息
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取申请列表
|
||||
* @param iSession
|
||||
*/
|
||||
public void getApplyFriends(ISession iSession) {
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -348,13 +348,6 @@ public class StoreLogic {
|
|||
LOGGER.info("automaticRefreStore==>uid={},storeid={},type={}",uid,storeId,type);
|
||||
return;
|
||||
}
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
int refreshPrivilege = sStoreTypeConfig.getRefreshPrivilege();
|
||||
if(!playerInfoManager.check(refreshPrivilege,1)){
|
||||
MessageUtil.sendErrorResponse(iSession,0,msgId,"over limmit");
|
||||
return;
|
||||
}
|
||||
playerInfoManager.updateVipPrivilage(refreshPrivilege,1);
|
||||
storeInfo.setItemNumMap(itemNumMap);
|
||||
CommonProto.StoreInfo.Builder storeBuilder = getBuilder(storeInfo);
|
||||
PlayerInfoProto.StoreGoodsRefreshResponse builder = PlayerInfoProto.StoreGoodsRefreshResponse.newBuilder().setStoreInfo(storeBuilder).build();
|
||||
|
|
|
@ -244,6 +244,20 @@ public class CBean2Proto {
|
|||
chatInfo.setFrequency(frequency);
|
||||
}
|
||||
return chatInfo.build();
|
||||
|
||||
}
|
||||
public static CommonProto.Friend getFriendInfo(int friendId) throws Exception {
|
||||
User user = UserManager.getUser(friendId);
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
CommonProto.Friend.Builder friend = CommonProto.Friend.newBuilder();
|
||||
friend.setId(Integer.parseInt(user.getId()));
|
||||
friend.setName(playerInfoManager.getNickName());
|
||||
friend.setLv(playerInfoManager.getLevel());
|
||||
friend.setOffLineTime(playerInfoManager.getOffLineTime());
|
||||
friend.setHaveReward(0);
|
||||
friend.setHaveFriendPoint(1);
|
||||
friend.setHead(playerInfoManager.getHead());
|
||||
friend.setFrame(playerInfoManager.getFamilyId());
|
||||
friend.setSoulVal(1000);
|
||||
return friend.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,8 +43,10 @@ public class NettyClient {
|
|||
//---------------------------------------------------------------------------------------------------------
|
||||
|
||||
handler.sendRequest_jieling(makeFinalMessage(gameMessage, MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE));
|
||||
for (int i= 0; i < 1000; i++){
|
||||
handler.sendRequest_jieling(makeFinalMessage(sendChatInfo(i), MessageTypeProto.MessageType.SEND_CHAT_INFO_REQUEST_VALUE));
|
||||
}
|
||||
handler.sendRequest_jieling(makeFinalMessage(getChatInfo(), MessageTypeProto.MessageType.GET_CHAT_MESSAGE_REQUEST_VALUE));
|
||||
handler.sendRequest_jieling(makeFinalMessage(sendChatInfo(), MessageTypeProto.MessageType.SEND_CHAT_INFO_REQUEST_VALUE));
|
||||
//获取商店信息
|
||||
// handler.sendRequest_jieling(makeFinalMessage(gameMessage, MessageTypeProto.MessageType.GET_STARE_INFOS_REQUEST_VALUE));
|
||||
// handler.sendRequest_jieling(makeFinalMessage(buyStoreItem(), MessageTypeProto.MessageType.BUY_STORE_ITEM_REQUEST_VALUE));
|
||||
|
@ -83,10 +85,10 @@ public class NettyClient {
|
|||
|
||||
}
|
||||
|
||||
private static MessageLite sendChatInfo() {
|
||||
private static MessageLite sendChatInfo(int index) {
|
||||
ChatProto.SendChatInfoReqest sendChatInfoReqest = ChatProto.SendChatInfoReqest.newBuilder()
|
||||
.setChatType(1)
|
||||
.setMessage("lalalaal")
|
||||
.setMessage("lalalaal"+index)
|
||||
.setFriendId(1)
|
||||
.build();
|
||||
return sendChatInfoReqest;
|
||||
|
|
Loading…
Reference in New Issue