mirror of
https://gitee.com/wxd-gaming/wxdgaming.spring.boot.git
synced 2026-05-07 01:00:44 +08:00
【调试】可运行
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.bag;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package wxdgaming.game.message.bag;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
@@ -13,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("null")
|
||||
public class ItemBean extends PojoBase {
|
||||
public class ItemBean extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.bag;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("请求背包信息")
|
||||
public class ReqBagInfo extends PojoBase {
|
||||
public class ReqBagInfo extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.bag;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("响应背包信息")
|
||||
public class ResBagInfo extends PojoBase {
|
||||
public class ResBagInfo extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.bag;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("背包更新")
|
||||
public class ResUpdateBagInfo extends PojoBase {
|
||||
public class ResUpdateBagInfo extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.cdkey;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("请求使用cdkey")
|
||||
public class ReqUseCdKey extends PojoBase {
|
||||
public class ReqUseCdKey extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.cdkey;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("响应使用cdkey")
|
||||
public class ResUseCdKey extends PojoBase {
|
||||
public class ResUseCdKey extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
package wxdgaming.game.message.chat;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
|
||||
import java.util.Map;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
/** 导出包名 */
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.chat;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("请求聊天")
|
||||
public class ReqChatMessage extends PojoBase {
|
||||
public class ReqChatMessage extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.chat;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("聊天响应")
|
||||
public class ResChatMessage extends PojoBase {
|
||||
public class ResChatMessage extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.global;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("属性")
|
||||
public class AttrBean extends PojoBase {
|
||||
public class AttrBean extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package wxdgaming.game.message.global;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
@@ -13,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("null")
|
||||
public class MapBean extends PojoBase {
|
||||
public class MapBean extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.global;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("更新属性")
|
||||
public class ResUpdateAttr extends PojoBase {
|
||||
public class ResUpdateAttr extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
package wxdgaming.game.message.inner;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
/** 请求转发消息 */
|
||||
@@ -18,7 +20,9 @@ import java.util.Map;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("请求转发消息")
|
||||
public class InnerForwardMessage extends PojoBase {
|
||||
public class InnerForwardMessage extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.inner;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("注册服务")
|
||||
public class InnerRegisterServer extends PojoBase {
|
||||
public class InnerRegisterServer extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.inner;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("玩家离线")
|
||||
public class InnerUserOffline extends PojoBase {
|
||||
public class InnerUserOffline extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.inner;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** 选择角色 */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("选择角色")
|
||||
public class ReqChooseRole extends PojoBase {
|
||||
public class ReqChooseRole extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** 创建角色 */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("创建角色")
|
||||
public class ReqCreateRole extends PojoBase {
|
||||
public class ReqCreateRole extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** 心跳包 */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("心跳包")
|
||||
public class ReqHeartbeat extends PojoBase {
|
||||
public class ReqHeartbeat extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.MapBean;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/** 登录请求 */
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("登录请求")
|
||||
public class ReqLogin extends PojoBase {
|
||||
public class ReqLogin extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** null */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("null")
|
||||
public class ReqLogout extends PojoBase {
|
||||
public class ReqLogout extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** 选择角色响应 */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("选择角色响应")
|
||||
public class ResChooseRole extends PojoBase {
|
||||
public class ResChooseRole extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
@@ -13,7 +21,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("创建角色响应")
|
||||
public class ResCreateRole extends PojoBase {
|
||||
public class ResCreateRole extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** 心跳包响应 */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("心跳包响应")
|
||||
public class ResHeartbeat extends PojoBase {
|
||||
public class ResHeartbeat extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,22 +1,29 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/** 登录响应 */
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("登录响应")
|
||||
public class ResLogin extends PojoBase {
|
||||
public class ResLogin extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** 更新经验 */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("更新经验")
|
||||
public class ResUpdateExp extends PojoBase {
|
||||
public class ResUpdateExp extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
@@ -13,7 +21,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("更新战斗力")
|
||||
public class ResUpdateFightValue extends PojoBase {
|
||||
public class ResUpdateFightValue extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -8,10 +10,10 @@ import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
import wxdgaming.game.message.global.*;
|
||||
|
||||
|
||||
/** 更新等级 */
|
||||
@@ -19,7 +21,9 @@ import wxdgaming.game.message.global.*;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("更新等级")
|
||||
public class ResUpdateLevel extends PojoBase {
|
||||
public class ResUpdateLevel extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
package wxdgaming.game.message.role;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.game.message.global.*;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
@@ -13,7 +21,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("角色信息")
|
||||
public class RoleBean extends PojoBase {
|
||||
public class RoleBean extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("接受任务")
|
||||
public class ReqAcceptTask extends PojoBase {
|
||||
public class ReqAcceptTask extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
@@ -13,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("提交任务")
|
||||
public class ReqSubmitTask extends PojoBase {
|
||||
public class ReqSubmitTask extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("任务列表")
|
||||
public class ReqTaskList extends PojoBase {
|
||||
public class ReqTaskList extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
@@ -13,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("接受任务")
|
||||
public class ResAcceptTask extends PojoBase {
|
||||
public class ResAcceptTask extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("提交任务")
|
||||
public class ResSubmitTask extends PojoBase {
|
||||
public class ResSubmitTask extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/** 任务列表 */
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("任务列表")
|
||||
public class ResTaskList extends PojoBase {
|
||||
public class ResTaskList extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("更新任务列表")
|
||||
public class ResUpdateTaskList extends PojoBase {
|
||||
public class ResUpdateTaskList extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/** null */
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("null")
|
||||
public class TaskBean extends PojoBase {
|
||||
public class TaskBean extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
package wxdgaming.game.message.task;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
|
||||
import java.util.Map;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
/** 任务类型 */
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package wxdgaming.game.message.tips;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -18,7 +20,9 @@ import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@Comment("提示内容")
|
||||
public class ResTips extends PojoBase {
|
||||
public class ResTips extends PojoBase implements Serializable {
|
||||
|
||||
@Serial private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
package wxdgaming.game.message.tips;
|
||||
package wxdgaming.game.message.tips;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import wxdgaming.spring.boot.core.ann.Comment;
|
||||
import wxdgaming.spring.boot.core.collection.MapOf;
|
||||
|
||||
import java.util.Map;
|
||||
import wxdgaming.spring.boot.net.pojo.PojoBase;
|
||||
|
||||
|
||||
/** 导出包名 */
|
||||
@@ -13,16 +20,16 @@ import java.util.Map;
|
||||
@Comment("导出包名")
|
||||
public enum TipsType {
|
||||
|
||||
/** 普通提示 */
|
||||
/** 普通提示 */
|
||||
@Tag(0)
|
||||
TIP_TYPE_NONE(0, " 普通提示"),
|
||||
/** 错误提示 */
|
||||
/** 错误提示 */
|
||||
@Tag(1)
|
||||
TIP_TYPE_ERROR(1, " 错误提示"),
|
||||
/** 成功提示 */
|
||||
/** 成功提示 */
|
||||
@Tag(2)
|
||||
TIP_TYPE_SUCCESS(2, " 成功提示"),
|
||||
/** 警告提示 */
|
||||
/** 警告提示 */
|
||||
@Tag(3)
|
||||
TIP_TYPE_WARNING(3, " 警告提示"),
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import wxdgaming.game.login.AppPlatformParams;
|
||||
import wxdgaming.game.login.LoginBootstrapConfig;
|
||||
import wxdgaming.game.login.bean.UserData;
|
||||
import wxdgaming.game.login.sdk.AbstractSdkLoginApi;
|
||||
import wxdgaming.spring.boot.core.chatset.StringUtils;
|
||||
import wxdgaming.spring.boot.core.lang.RunResult;
|
||||
import wxdgaming.spring.boot.core.util.GlobalUtil;
|
||||
|
||||
/**
|
||||
* 本地服
|
||||
@@ -20,13 +20,20 @@ import wxdgaming.spring.boot.core.util.GlobalUtil;
|
||||
@Service
|
||||
public class LocalSdkLoginApi extends AbstractSdkLoginApi {
|
||||
|
||||
final LoginBootstrapConfig bootstrapConfig;
|
||||
|
||||
public LocalSdkLoginApi(LoginBootstrapConfig bootstrapConfig) {
|
||||
this.bootstrapConfig = bootstrapConfig;
|
||||
}
|
||||
|
||||
|
||||
@Override public AppPlatformParams.Platform platform() {
|
||||
return AppPlatformParams.Platform.LOCAL;
|
||||
}
|
||||
|
||||
@Override public RunResult login(HttpServletRequest request, AppPlatformParams appPlatformParams) {
|
||||
|
||||
if (!GlobalUtil.DEBUG.get()) {
|
||||
if (!bootstrapConfig.isDebug()) {
|
||||
return RunResult.fail("not debug ban login");
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class InnerForwardMessageHandler extends HoldRunApplication {
|
||||
ThreadContext.cleanup();
|
||||
ThreadContext.putContent("forwardMessage", req);
|
||||
String clientIp = req.getKvBeansMap().get("clientIp");
|
||||
ThreadContext.putContent("clientIp", Long.parseLong(clientIp));
|
||||
ThreadContext.putContent("clientIp", clientIp);
|
||||
String clientSessionId = req.getKvBeansMap().get("clientSessionId");
|
||||
ThreadContext.putContent("clientSessionId", Long.parseLong(clientSessionId));
|
||||
String account = req.getKvBeansMap().get("account");
|
||||
|
||||
@@ -2,7 +2,7 @@ package wxdgaming.game.server.api.role.impl;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import wxdgaming.spring.boot.net.SocketSession;
|
||||
import wxdgaming.spring.boot.net.module.inner.RpcService;
|
||||
import wxdgaming.spring.boot.net.module.rpc.RpcService;
|
||||
import wxdgaming.game.global.bean.role.PlayerSnap;
|
||||
import wxdgaming.game.server.api.role.GetPlayerStrategy;
|
||||
import wxdgaming.game.server.bean.role.Player;
|
||||
|
||||
@@ -11,7 +11,6 @@ import wxdgaming.game.server.api.role.impl.DatabaseGetPlayerStrategy;
|
||||
import wxdgaming.game.server.api.role.impl.RpcGetPlayerStrategy;
|
||||
import wxdgaming.game.server.bean.role.Player;
|
||||
import wxdgaming.game.server.bean.role.RoleEntity;
|
||||
import wxdgaming.spring.boot.batis.sql.SqlDataHelper;
|
||||
import wxdgaming.spring.boot.batis.sql.SqlQueryResult;
|
||||
import wxdgaming.spring.boot.batis.sql.mysql.MysqlDataHelper;
|
||||
import wxdgaming.spring.boot.core.HoldRunApplication;
|
||||
@@ -19,7 +18,7 @@ import wxdgaming.spring.boot.core.ann.Start;
|
||||
import wxdgaming.spring.boot.core.collection.concurrent.ConcurrentTable;
|
||||
import wxdgaming.spring.boot.core.format.HexId;
|
||||
import wxdgaming.spring.boot.core.keywords.KeywordsMapping;
|
||||
import wxdgaming.spring.boot.net.module.inner.RpcService;
|
||||
import wxdgaming.spring.boot.net.module.rpc.RpcService;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package wxdgaming.spring.boot.core;
|
||||
|
||||
import jakarta.servlet.*;
|
||||
import jakarta.servlet.FilterChain;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.ServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.boot.web.servlet.filter.OrderedFilter;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -13,6 +16,7 @@ import java.io.IOException;
|
||||
* @author wxd-gaming(無心道, 15388152619)
|
||||
* @version 2025-08-12 16:19
|
||||
*/
|
||||
@Component
|
||||
public class ContentCachingRequestWrapperFilter implements OrderedFilter {
|
||||
|
||||
@Override
|
||||
@@ -29,12 +33,17 @@ public class ContentCachingRequestWrapperFilter implements OrderedFilter {
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
|
||||
//传递包装类下去。这样后面的servlet等可以拿到这个包装后的request
|
||||
ContentCachingRequestWrapperNew requestWrapperNew = new ContentCachingRequestWrapperNew((HttpServletRequest) request);
|
||||
ServletInputStream inputStream = requestWrapperNew.getInputStream();
|
||||
/*TODO 这个代码不能删除,必须强制读取一次才行*/
|
||||
// String string = requestWrapperNew.getReader().readLine();
|
||||
chain.doFilter(requestWrapperNew, response);
|
||||
if (request instanceof HttpServletRequest httpServletRequest) {
|
||||
if ("POST".equalsIgnoreCase(httpServletRequest.getMethod()) && request.getContentType().contains("application/json")) {
|
||||
//传递包装类下去。这样后面的servlet等可以拿到这个包装后的request
|
||||
ContentCachingRequestWrapperNew requestWrapperNew = new ContentCachingRequestWrapperNew(httpServletRequest);
|
||||
/*TODO 这个代码不能删除,必须强制读取一次才行*/
|
||||
String string = requestWrapperNew.getReader().readLine();
|
||||
chain.doFilter(requestWrapperNew, response);
|
||||
return;
|
||||
}
|
||||
}
|
||||
chain.doFilter(request, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,9 +5,12 @@ import jakarta.servlet.ServletInputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.web.util.ContentCachingRequestWrapper;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/**
|
||||
@@ -43,6 +46,34 @@ public class ContentCachingRequestWrapperNew extends ContentCachingRequestWrappe
|
||||
return new ServletInputStreamNew(super.getContentAsByteArray());
|
||||
}
|
||||
|
||||
@Override public BufferedReader getReader() throws IOException {
|
||||
return super.getReader();
|
||||
}
|
||||
|
||||
@Override public String getParameter(String name) {
|
||||
return super.getParameter(name);
|
||||
}
|
||||
|
||||
@Override public Map<String, String[]> getParameterMap() {
|
||||
return super.getParameterMap();
|
||||
}
|
||||
|
||||
@Override public Enumeration<String> getParameterNames() {
|
||||
return super.getParameterNames();
|
||||
}
|
||||
|
||||
@Override public String[] getParameterValues(String name) {
|
||||
return super.getParameterValues(name);
|
||||
}
|
||||
|
||||
@Override public byte[] getContentAsByteArray() {
|
||||
return super.getContentAsByteArray();
|
||||
}
|
||||
|
||||
@Override public String getContentAsString() {
|
||||
return super.getContentAsString();
|
||||
}
|
||||
|
||||
//参考自 DelegatingServletInputStream
|
||||
static class ServletInputStreamNew extends ServletInputStream {
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ public class SpringUtil implements InitPrint {
|
||||
// 处理 POST JSON 请求体
|
||||
if ("POST".equalsIgnoreCase(request.getMethod()) && request.getContentType().contains("application/json")) {
|
||||
ContentCachingRequestWrapper wrapper = (ContentCachingRequestWrapper) request;
|
||||
wrapper.getReader().readLine();
|
||||
String body = new String(wrapper.getContentAsByteArray(), wrapper.getCharacterEncoding());
|
||||
JSONObject bodyParams = JSONObject.parseObject(body);
|
||||
reqParams.putAll(bodyParams);
|
||||
|
||||
@@ -14,8 +14,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
**/
|
||||
public class GlobalUtil {
|
||||
|
||||
/** 当前服务器的debug状态 */
|
||||
public static final AtomicBoolean DEBUG = new AtomicBoolean();
|
||||
public static final AtomicBoolean Exiting = new AtomicBoolean();
|
||||
|
||||
public static Consumer2<Object, Throwable> exceptionCall = null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner.message;
|
||||
package wxdgaming.spring.boot.net.message.inner;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
@@ -26,7 +26,7 @@ public class ReqRemote extends PojoBase implements Serializable {
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
return 65581918;
|
||||
return 57643521;
|
||||
}
|
||||
|
||||
/** 消息ID */
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner.message;
|
||||
package wxdgaming.spring.boot.net.message.inner;
|
||||
|
||||
import io.protostuff.Tag;
|
||||
import java.io.Serial;
|
||||
@@ -26,7 +26,7 @@ public class ResRemote extends PojoBase implements Serializable {
|
||||
|
||||
/** 消息ID */
|
||||
public static int _msgId() {
|
||||
return 65602206;
|
||||
return 57663808;
|
||||
}
|
||||
|
||||
/** 消息ID */
|
||||
@@ -10,8 +10,8 @@ import wxdgaming.spring.boot.core.lang.RunResult;
|
||||
import wxdgaming.spring.boot.core.zip.GzipUtil;
|
||||
import wxdgaming.spring.boot.net.SocketSession;
|
||||
import wxdgaming.spring.boot.net.ann.ProtoRequest;
|
||||
import wxdgaming.spring.boot.net.module.inner.*;
|
||||
import wxdgaming.spring.boot.net.module.inner.message.ReqRemote;
|
||||
import wxdgaming.spring.boot.net.message.inner.ReqRemote;
|
||||
import wxdgaming.spring.boot.net.module.rpc.*;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -8,8 +8,8 @@ import wxdgaming.spring.boot.core.chatset.json.FastJsonUtil;
|
||||
import wxdgaming.spring.boot.core.zip.GzipUtil;
|
||||
import wxdgaming.spring.boot.net.SocketSession;
|
||||
import wxdgaming.spring.boot.net.ann.ProtoRequest;
|
||||
import wxdgaming.spring.boot.net.module.inner.RpcService;
|
||||
import wxdgaming.spring.boot.net.module.inner.message.ResRemote;
|
||||
import wxdgaming.spring.boot.net.message.inner.ResRemote;
|
||||
import wxdgaming.spring.boot.net.module.rpc.RpcService;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner;
|
||||
package wxdgaming.spring.boot.net.module.rpc;
|
||||
|
||||
/**
|
||||
* http 请求接口过滤器
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner;
|
||||
package wxdgaming.spring.boot.net.module.rpc;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner;
|
||||
package wxdgaming.spring.boot.net.module.rpc;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner;
|
||||
package wxdgaming.spring.boot.net.module.rpc;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner;
|
||||
package wxdgaming.spring.boot.net.module.rpc;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import wxdgaming.spring.boot.core.assist.JavassistProxy;
|
||||
@@ -1,4 +1,4 @@
|
||||
package wxdgaming.spring.boot.net.module.inner;
|
||||
package wxdgaming.spring.boot.net.module.rpc;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Getter;
|
||||
@@ -12,8 +12,8 @@ import wxdgaming.spring.boot.core.format.HexId;
|
||||
import wxdgaming.spring.boot.core.util.Md5Util;
|
||||
import wxdgaming.spring.boot.core.zip.GzipUtil;
|
||||
import wxdgaming.spring.boot.net.SocketSession;
|
||||
import wxdgaming.spring.boot.net.module.inner.message.ReqRemote;
|
||||
import wxdgaming.spring.boot.net.module.inner.message.ResRemote;
|
||||
import wxdgaming.spring.boot.net.message.inner.ReqRemote;
|
||||
import wxdgaming.spring.boot.net.message.inner.ResRemote;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -103,7 +103,7 @@ public class ProtoBuf2Pojo {
|
||||
} else if (line.contains("}")) {
|
||||
String p1 = filePath.getFileName().toString().replace(".proto", "").replace("Message", "");
|
||||
p1 = StringUtils.lowerFirst(p1);
|
||||
comment.get().packageName = " %s.%s.message".formatted(packageName.get(), p1);
|
||||
comment.get().packageName = " %s.%s".formatted(packageName.get(), p1);
|
||||
String to = "package %s;".formatted(comment.get().packageName);
|
||||
to += "\n";
|
||||
for (String anImport : imports) {
|
||||
|
||||
@@ -2,7 +2,7 @@ syntax = "proto3";
|
||||
//把文件拆分
|
||||
option java_multiple_files = true;
|
||||
//导出包名
|
||||
option java_package = "wxdgaming.spring.boot.net.module";
|
||||
option java_package = "wxdgaming.spring.boot.net.message";
|
||||
|
||||
//执行同步等待消息
|
||||
message ReqRemote {
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ProtoTest {
|
||||
"src/main/java",
|
||||
"wxdgaming.spring.boot.net.module",
|
||||
"Req",
|
||||
"wxdgaming.spring.boot.net.module",
|
||||
"wxdgaming.spring.boot.net.message.inner",
|
||||
null,
|
||||
null,
|
||||
null
|
||||
@@ -33,7 +33,7 @@ public class ProtoTest {
|
||||
"src/main/java",
|
||||
"wxdgaming.spring.boot.net.module",
|
||||
"Res",
|
||||
"wxdgaming.spring.boot.net.module",
|
||||
"wxdgaming.spring.boot.net.message.inner",
|
||||
null,
|
||||
null,
|
||||
null
|
||||
|
||||
Reference in New Issue
Block a user