use of com.code.server.game.poker.robot.ResponseRobotVo in project summer by foxsugar.
the class DouDiZhuGoldRobot method jiaoDizhu.
@Override
public void jiaoDizhu(GameDouDiZhu game) {
String roomId = game.getRoom().getRoomId();
int partition = SpringUtil.getBean(ServerConfig.class).getServerId();
KafkaMsgKey msgKey = new KafkaMsgKey();
msgKey.setUserId(game.canJiaoUser);
msgKey.setRoomId(roomId);
msgKey.setPartition(partition);
// 按service的名字 分topic
// {"service":"gameService","method":"jiaoDizhu","params":{"isJiao":true,"score":3}}
Map<String, Object> put = new HashMap<>();
put.put("isJiao", false);
ResponseRobotVo result = new ResponseRobotVo("gameService", "jiaoDizhu", put);
SpringUtil.getBean(MsgProducer.class).send2Partition("gameService", partition, msgKey, result);
}
Aggregations